diff options
| author | yallop <yallop@gmail.com> | 2017-08-03 14:19:13 +0100 |
|---|---|---|
| committer | Mark Shinwell <mshinwell@gmail.com> | 2017-08-03 14:19:13 +0100 |
| commit | 65c932253b96651a6d13550a48dd386a89244ed0 (patch) | |
| tree | e06098840d29e15d888c28e7c40238743cb65f7a /asmrun | |
| parent | 3d1a0fba2f64ad82bc3961311d85d8b7f6c48f06 (diff) | |
| download | ocaml-65c932253b96651a6d13550a48dd386a89244ed0.tar.gz | |
String_val: return 'const char *' when -safe-string is globally enabled (#1274)
Diffstat (limited to 'asmrun')
| -rw-r--r-- | asmrun/natdynlink.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/asmrun/natdynlink.c b/asmrun/natdynlink.c index 74dad7c858..d172f44003 100644 --- a/asmrun/natdynlink.c +++ b/asmrun/natdynlink.c @@ -31,7 +31,7 @@ #include "caml/hooks.h" -CAMLexport void (*caml_natdynlink_hook)(void* handle, char* unit) = NULL; +CAMLexport void (*caml_natdynlink_hook)(void* handle, const char* unit) = NULL; #include <stdio.h> #include <string.h> @@ -44,7 +44,7 @@ static value Val_handle(void* handle) { return res; } -static void *getsym(void *handle, char *module, char *name){ +static void *getsym(void *handle, const char *module, const char *name){ char *fullname = caml_stat_strconcat(3, "caml", module, name); void *sym; sym = caml_dlsym (handle, fullname); @@ -103,7 +103,7 @@ CAMLprim value caml_natdynlink_run(value handle_v, value symbol) { struct code_fragment * cf; #define optsym(n) getsym(handle,unit,n) - char *unit; + const char *unit; void (*entrypoint)(void); unit = String_val(symbol); |
