diff options
author | Olly Betts <olly@survex.com> | 2022-02-01 13:29:53 +1300 |
---|---|---|
committer | Olly Betts <olly@survex.com> | 2022-02-01 13:29:53 +1300 |
commit | 9f74955e8d26313c9019a992b03dfa17e17a4cfb (patch) | |
tree | 17fe8cd2da6ba1f5147e23e23a06bef7736de4d6 /Lib/ocaml | |
parent | 6f4adde4b4dccbd31725aeda1c9e17b9178a5550 (diff) | |
download | swig-9f74955e8d26313c9019a992b03dfa17e17a4cfb.tar.gz |
[Ocaml] Fix to work with CAML_SAFE_STRING
CAML_SAFE_STRING is on by default in current Ocaml versions, and was
stopping SWIG-generated wrappers from compiling.
Fixes #2083
Diffstat (limited to 'Lib/ocaml')
-rw-r--r-- | Lib/ocaml/ocamlrun.swg | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/ocaml/ocamlrun.swg b/Lib/ocaml/ocamlrun.swg index 5a923c5fe..53ad952fb 100644 --- a/Lib/ocaml/ocamlrun.swg +++ b/Lib/ocaml/ocamlrun.swg @@ -369,7 +369,7 @@ extern "C" { if( !p || len < 0 ) CAMLreturn(caml_val_ptr( (void *)p, 0 )); vv = caml_swig_alloc(1,C_string); SWIG_Store_field(vv,0,caml_alloc_string(len)); - memcpy(String_val(SWIG_Field(vv,0)),p,len); + memcpy(Bp_val(SWIG_Field(vv,0)),p,len); CAMLreturn(vv); } |