diff options
author | Damien Doligez <damien.doligez-inria.fr> | 2006-09-11 12:12:24 +0000 |
---|---|---|
committer | Damien Doligez <damien.doligez-inria.fr> | 2006-09-11 12:12:24 +0000 |
commit | b21b8dcc8a386cd390dd2e6770bb0d075b75c84e (patch) | |
tree | 69535059b3d41e2b0f695a0860d3027cae53aa25 | |
parent | d37722cc0212ea594456314227ecb96b0cf2673a (diff) |
ajout de "const" au parametre de hash_value_name PR#3178 et PR#3396
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7596 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | byterun/callback.c | 6 | ||||
-rw-r--r-- | byterun/callback.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/byterun/callback.c b/byterun/callback.c index bfafd349d..d76cf108b 100644 --- a/byterun/callback.c +++ b/byterun/callback.c @@ -34,7 +34,7 @@ CAMLexport int caml_callback_depth = 0; #ifndef LOCAL_CALLBACK_BYTECODE static opcode_t callback_code[] = { ACC, 0, APPLY, 0, POP, 1, STOP }; -#endif +#endif #ifdef THREADED_CODE @@ -207,7 +207,7 @@ struct named_value { static struct named_value * named_value_table[Named_value_size] = { NULL, }; -static unsigned int hash_value_name(char *name) +static unsigned int hash_value_name(char const *name) { unsigned int h; for (h = 0; *name != 0; name++) h = h * 19 + *name; @@ -236,7 +236,7 @@ CAMLprim value caml_register_named_value(value vname, value val) return Val_unit; } -CAMLexport value * caml_named_value(char *name) +CAMLexport value * caml_named_value(char const *name) { struct named_value * nv; for (nv = named_value_table[hash_value_name(name)]; diff --git a/byterun/callback.h b/byterun/callback.h index 085516cf8..ffa6cf3b5 100644 --- a/byterun/callback.h +++ b/byterun/callback.h @@ -39,7 +39,7 @@ CAMLextern value caml_callbackN_exn (value closure, int narg, value args[]); #define Is_exception_result(v) (((v) & 3) == 2) #define Extract_exception(v) ((v) & ~3) -CAMLextern value * caml_named_value (char * name); +CAMLextern value * caml_named_value (char const * name); CAMLextern void caml_main (char ** argv); CAMLextern void caml_startup (char ** argv); |