All test cases compile except director_abstract. I clued from what
William Fulton and Dave were talking about regarding the template parameters and (), and this solved a bunch of wierd little problems I was having. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5455 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
234bb62536
commit
08d4b05e03
2 changed files with 26 additions and 14 deletions
|
|
@ -89,6 +89,8 @@ CAMLextern int64 Int64_val(caml_value_t v);
|
||||||
# define SWIGSTATIC static
|
# define SWIGSTATIC static
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define SWIG_NewPointerObj(p,type,flags) caml_val_ptr(p,type)
|
||||||
|
|
||||||
#define SWIG_contract_assert(expr, msg) if(!(expr)) {failwith(msg);} else
|
#define SWIG_contract_assert(expr, msg) if(!(expr)) {failwith(msg);} else
|
||||||
|
|
||||||
SWIGSTATIC int
|
SWIGSTATIC int
|
||||||
|
|
|
||||||
|
|
@ -391,7 +391,7 @@ public:
|
||||||
Delete(SwigType_pop(t));
|
Delete(SwigType_pop(t));
|
||||||
c = Char(t);
|
c = Char(t);
|
||||||
}
|
}
|
||||||
if (strncmp(c,"a(",1)) {
|
if (strncmp(c,"a(",2) == 0) {
|
||||||
Delete(SwigType_pop(t));
|
Delete(SwigType_pop(t));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -728,6 +728,7 @@ public:
|
||||||
"CAMLreturn(%s(args));\n",
|
"CAMLreturn(%s(args));\n",
|
||||||
&maxargs);
|
&maxargs);
|
||||||
|
|
||||||
|
Wrapper_add_local(df, "_v", "int _v = 0");
|
||||||
Wrapper_add_local(df, "argv", "CAML_VALUE *argv");
|
Wrapper_add_local(df, "argv", "CAML_VALUE *argv");
|
||||||
|
|
||||||
Printv(df->def,
|
Printv(df->def,
|
||||||
|
|
@ -1215,19 +1216,28 @@ public:
|
||||||
|
|
||||||
String *normalizeTemplatedClassName( String *name ) {
|
String *normalizeTemplatedClassName( String *name ) {
|
||||||
String *name_normalized = SwigType_typedef_resolve_all(name);
|
String *name_normalized = SwigType_typedef_resolve_all(name);
|
||||||
|
bool took_action;
|
||||||
if( is_a_pointer(name_normalized) )
|
|
||||||
SwigType_del_pointer( name_normalized );
|
do {
|
||||||
|
took_action = false;
|
||||||
if( is_a_reference(name_normalized) )
|
|
||||||
oc_SwigType_del_reference( name_normalized );
|
|
||||||
|
|
||||||
if( is_an_array(name_normalized) )
|
|
||||||
oc_SwigType_del_array( name_normalized );
|
|
||||||
|
|
||||||
Replaceall(name_normalized,"(","");
|
if( is_a_pointer(name_normalized) ) {
|
||||||
Replaceall(name_normalized,")","");
|
SwigType_del_pointer( name_normalized );
|
||||||
return name_normalized;
|
took_action = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( is_a_reference(name_normalized) ) {
|
||||||
|
oc_SwigType_del_reference( name_normalized );
|
||||||
|
took_action = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( is_an_array(name_normalized) ) {
|
||||||
|
oc_SwigType_del_array( name_normalized );
|
||||||
|
took_action = true;
|
||||||
|
}
|
||||||
|
} while( took_action );
|
||||||
|
|
||||||
|
return SwigType_str(name_normalized,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -1286,7 +1296,7 @@ public:
|
||||||
|
|
||||||
Printf( fully_qualified_name, "%s", name );
|
Printf( fully_qualified_name, "%s", name );
|
||||||
|
|
||||||
return fully_qualified_name;
|
return normalizeTemplatedClassName(fully_qualified_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Benedikt Grundmann inspired --> Enum wrap styles */
|
/* Benedikt Grundmann inspired --> Enum wrap styles */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue