Merge branch 'OCaml-caml_named_value-const'
* OCaml-caml_named_value-const: [OCaml] Fix compilation errors with OCaml 4.09.0
This commit is contained in:
commit
5ce839932c
5 changed files with 10 additions and 7 deletions
|
|
@ -28,6 +28,9 @@ Version 4.0.2 (in progress)
|
||||||
2019-12-30: treitmayr
|
2019-12-30: treitmayr
|
||||||
[Ruby] #1653 #1668 Fix code generated when using -globalmodule option.
|
[Ruby] #1653 #1668 Fix code generated when using -globalmodule option.
|
||||||
|
|
||||||
|
2019-12-29: ZackerySpytz
|
||||||
|
[OCaml] #1686 Fix compilation errors with OCaml 4.09.0.
|
||||||
|
|
||||||
2019-12-10: wsfulton
|
2019-12-10: wsfulton
|
||||||
#1679 Fix parsing of C++11 identifiers with special meaning (final and override) when
|
#1679 Fix parsing of C++11 identifiers with special meaning (final and override) when
|
||||||
they are used as part of the scope name of an identifier, such as a namespace name.
|
they are used as part of the scope name of an identifier, such as a namespace name.
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ type _value = c_obj
|
||||||
|
|
||||||
%typemap(out) SWIGTYPE [] {
|
%typemap(out) SWIGTYPE [] {
|
||||||
int i;
|
int i;
|
||||||
CAML_VALUE *fromval = caml_named_value("create_$ntype_from_ptr");
|
const CAML_VALUE *fromval = caml_named_value("create_$ntype_from_ptr");
|
||||||
$result = caml_array_new($1_dim0);
|
$result = caml_array_new($1_dim0);
|
||||||
|
|
||||||
for( i = 0; i < $1_dim0; i++ ) {
|
for( i = 0; i < $1_dim0; i++ ) {
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
%typemap(argout) SWIGTYPE & {
|
%typemap(argout) SWIGTYPE & {
|
||||||
CAML_VALUE *fromval = caml_named_value("create_$ntype_from_ptr");
|
const CAML_VALUE *fromval = caml_named_value("create_$ntype_from_ptr");
|
||||||
if( fromval ) {
|
if( fromval ) {
|
||||||
swig_result =
|
swig_result =
|
||||||
caml_list_append(swig_result,
|
caml_list_append(swig_result,
|
||||||
|
|
@ -75,7 +75,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
%typemap(argout) SWIGTYPE && {
|
%typemap(argout) SWIGTYPE && {
|
||||||
CAML_VALUE *fromval = caml_named_value("create_$ntype_from_ptr");
|
const CAML_VALUE *fromval = caml_named_value("create_$ntype_from_ptr");
|
||||||
if( fromval ) {
|
if( fromval ) {
|
||||||
swig_result =
|
swig_result =
|
||||||
caml_list_append(swig_result,
|
caml_list_append(swig_result,
|
||||||
|
|
|
||||||
|
|
@ -407,7 +407,7 @@ extern "C" {
|
||||||
CAMLreturn((long)SWIG_Int64_val(SWIG_Field(SWIG_Field(v,0),0)));
|
CAMLreturn((long)SWIG_Int64_val(SWIG_Field(SWIG_Field(v,0),0)));
|
||||||
case C_enum: {
|
case C_enum: {
|
||||||
SWIG_CAMLlocal1(ret);
|
SWIG_CAMLlocal1(ret);
|
||||||
CAML_VALUE *enum_to_int = caml_named_value(SWIG_MODULE "_enum_to_int");
|
const CAML_VALUE *enum_to_int = caml_named_value(SWIG_MODULE "_enum_to_int");
|
||||||
if( !name ) caml_failwith( "Not an enum conversion" );
|
if( !name ) caml_failwith( "Not an enum conversion" );
|
||||||
ret = caml_callback2(*enum_to_int,*caml_named_value(name),v);
|
ret = caml_callback2(*enum_to_int,*caml_named_value(name),v);
|
||||||
CAMLreturn(caml_long_val(ret));
|
CAMLreturn(caml_long_val(ret));
|
||||||
|
|
@ -451,7 +451,7 @@ extern "C" {
|
||||||
CAMLparam1(v);
|
CAMLparam1(v);
|
||||||
void *outptr = NULL;
|
void *outptr = NULL;
|
||||||
swig_type_info *outdescr = NULL;
|
swig_type_info *outdescr = NULL;
|
||||||
static CAML_VALUE *func_val = NULL;
|
static const CAML_VALUE *func_val = NULL;
|
||||||
|
|
||||||
if( v == Val_unit ) {
|
if( v == Val_unit ) {
|
||||||
*out = 0;
|
*out = 0;
|
||||||
|
|
@ -574,7 +574,7 @@ extern "C" {
|
||||||
CAMLparam0();
|
CAMLparam0();
|
||||||
SWIG_CAMLlocal1(result);
|
SWIG_CAMLlocal1(result);
|
||||||
|
|
||||||
CAML_VALUE *fromval = caml_named_value(name);
|
const CAML_VALUE *fromval = caml_named_value(name);
|
||||||
if (fromval) {
|
if (fromval) {
|
||||||
result = caml_callback(*fromval, caml_val_ptr(ptr, descriptor));
|
result = caml_callback(*fromval, caml_val_ptr(ptr, descriptor));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -1619,7 +1619,7 @@ public:
|
||||||
/* pass the method call on to the OCaml object */
|
/* pass the method call on to the OCaml object */
|
||||||
Printv(w->code,
|
Printv(w->code,
|
||||||
"swig_result = caml_swig_alloc(1,C_list);\n" "SWIG_Store_field(swig_result,0,args);\n" "args = swig_result;\n" "swig_result = Val_unit;\n", 0);
|
"swig_result = caml_swig_alloc(1,C_list);\n" "SWIG_Store_field(swig_result,0,args);\n" "args = swig_result;\n" "swig_result = Val_unit;\n", 0);
|
||||||
Printf(w->code, "static CAML_VALUE *swig_ocaml_func_val = NULL;\n" "if (!swig_ocaml_func_val) {\n");
|
Printf(w->code, "static const CAML_VALUE *swig_ocaml_func_val = NULL;\n" "if (!swig_ocaml_func_val) {\n");
|
||||||
Printf(w->code, " swig_ocaml_func_val = caml_named_value(\"swig_runmethod\");\n }\n");
|
Printf(w->code, " swig_ocaml_func_val = caml_named_value(\"swig_runmethod\");\n }\n");
|
||||||
Printf(w->code, "swig_result = caml_callback3(*swig_ocaml_func_val,swig_get_self(),caml_copy_string(\"%s\"),args);\n", Getattr(n, "name"));
|
Printf(w->code, "swig_result = caml_callback3(*swig_ocaml_func_val,swig_get_self(),caml_copy_string(\"%s\"),args);\n", Getattr(n, "name"));
|
||||||
/* exception handling */
|
/* exception handling */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue