Ajout de remove_global_root

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1218 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Xavier Leroy 1996-12-10 15:39:51 +00:00
parent 6063edc759
commit 6c76e7e834
1 changed files with 16 additions and 0 deletions

View File

@ -46,6 +46,22 @@ void register_global_root(r)
global_roots = gr;
}
/* Un-register a global C root */
void remove_global_root(r)
value * r;
{
struct global_root ** gp, * gr;
for (gp = &global_roots; *gp != NULL; gp = &(*gp)->next) {
gr = *gp;
if (gr->root == r) {
*gp = gr->next;
stat_free((char *) gr);
return;
}
}
}
/* The hashtable of frame descriptors */
typedef struct {