summaryrefslogtreecommitdiff
path: root/byterun/callback.c
diff options
context:
space:
mode:
authorJun FURUSE / 古瀬 淳 <jun.furuse@gmail.com>2008-01-28 05:29:20 +0000
committerJun FURUSE / 古瀬 淳 <jun.furuse@gmail.com>2008-01-28 05:29:20 +0000
commit3f4a98da0fbf8a87c674d6737d8c6cec7e8567e5 (patch)
treef5aa13505824d708414ece1f00219b811315c44a /byterun/callback.c
parent30f3fa2c5bc27f8c59930741aa1b6dd5a34a6b40 (diff)
downloadocaml-gcaml3090.tar.gz
3.09.1 updategcaml3090
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gcaml3090@8792 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'byterun/callback.c')
-rw-r--r--byterun/callback.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/byterun/callback.c b/byterun/callback.c
index a960df5448..bfafd349d5 100644
--- a/byterun/callback.c
+++ b/byterun/callback.c
@@ -220,6 +220,12 @@ CAMLprim value caml_register_named_value(value vname, value val)
char * name = String_val(vname);
unsigned int h = hash_value_name(name);
+ for (nv = named_value_table[h]; nv != NULL; nv = nv->next) {
+ if (strcmp(name, nv->name) == 0) {
+ nv->val = val;
+ return Val_unit;
+ }
+ }
nv = (struct named_value *)
caml_stat_alloc(sizeof(struct named_value) + strlen(name));
strcpy(nv->name, name);