Fixes for $wrapname to work in %exception
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10265 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
69771aa3aa
commit
b67e0a28a3
9 changed files with 18 additions and 14 deletions
|
|
@ -166,7 +166,6 @@ int CFFI::top(Node *n) {
|
|||
Printf(f_lisp, "%s\n", f_cl);
|
||||
Printf(f_lisp, "%s\n", f_clwrap);
|
||||
|
||||
Printf(stderr, "All done now!\n");
|
||||
Close(f_lisp);
|
||||
Delete(f_lisp); // Deletes the handle, not the file
|
||||
Delete(f_cl);
|
||||
|
|
@ -383,6 +382,8 @@ int CFFI::functionWrapper(Node *n) {
|
|||
if (overname) {
|
||||
Append(wname, overname);
|
||||
}
|
||||
Setattr(n, "wrap:name", wname);
|
||||
|
||||
// Emit all of the local variables for holding arguments.
|
||||
emit_args(Getattr(n, "type"), parms, wrap);
|
||||
|
||||
|
|
|
|||
|
|
@ -501,6 +501,8 @@ int CHICKEN::functionWrapper(Node *n) {
|
|||
}
|
||||
}
|
||||
|
||||
Setattr(n, "wrap:name", wname);
|
||||
|
||||
/* Emit the function call */
|
||||
emit_action(n, f);
|
||||
|
||||
|
|
@ -603,8 +605,6 @@ int CHICKEN::functionWrapper(Node *n) {
|
|||
Printv(f_wrappers, "static ", declfunc, " C_noret;\n", NIL);
|
||||
Wrapper_print(f, f_wrappers);
|
||||
|
||||
Setattr(n, "wrap:name", wname);
|
||||
|
||||
/* Now register the function with the interpreter. */
|
||||
if (!Getattr(n, "sym:overloaded")) {
|
||||
if (exporting_destructor && !no_collection) {
|
||||
|
|
|
|||
|
|
@ -337,6 +337,8 @@ static void replace_contract_args(Parm *cp, Parm *rp, String *s) {
|
|||
* Emits action code for a wrapper and checks for exception handling
|
||||
* ----------------------------------------------------------------------------- */
|
||||
int emit_action_code(Node *n, Wrapper *f, String *eaction) {
|
||||
assert(Getattr(n, "wrap:name"));
|
||||
|
||||
/* Look for except feature */
|
||||
String *tm = GetFlagAttr(n, "feature:except");
|
||||
if (tm)
|
||||
|
|
|
|||
|
|
@ -535,6 +535,8 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
Setattr(n, "wrap:name", wname);
|
||||
|
||||
/* Emit the function call */
|
||||
emit_action(n, f);
|
||||
|
||||
|
|
@ -605,8 +607,6 @@ public:
|
|||
/* Dump the function out */
|
||||
Wrapper_print(f, f_wrappers);
|
||||
|
||||
Setattr(n, "wrap:name", wname); // you need this to make the overloading work
|
||||
|
||||
/* NEW LANGUAGE NOTE:***********************************************
|
||||
register the function in SWIG
|
||||
different language mappings seem to use different ideas
|
||||
|
|
@ -618,7 +618,6 @@ public:
|
|||
Printv(s_cmd_tab, tab4, "{ \"", iname, "\", ", Swig_name_wrapper(iname), "},\n", NIL);
|
||||
// Printv(s_cmd_tab, tab4, "{ SWIG_prefix \"", iname, "\", (swig_wrapper_func) ", Swig_name_wrapper(iname), "},\n", NIL);
|
||||
} else {
|
||||
// Setattr(n,"wrap:name", wname);
|
||||
if (!Getattr(n, "sym:nextSibling")) {
|
||||
dispatchFunction(n);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1415,6 +1415,9 @@ MODULA3():
|
|||
SwigType *ty = Swig_wrapped_var_type(Getattr(n, "type"), use_naturalvar_mode(n));
|
||||
Setattr(n, "wrap:action", NewStringf("result = (%s) %s;\n", SwigType_lstr(ty, 0), Getattr(n, "value")));
|
||||
}
|
||||
|
||||
Setattr(n, "wrap:name", wname);
|
||||
|
||||
// Now write code to make the function call
|
||||
if (!native_function_flag) {
|
||||
emit_action(n, f);
|
||||
|
|
@ -1489,8 +1492,6 @@ MODULA3():
|
|||
Wrapper_print(f, f_wrappers);
|
||||
}
|
||||
|
||||
Setattr(n, "wrap:name", wname);
|
||||
|
||||
Delete(c_return_type);
|
||||
Delete(cleanup);
|
||||
Delete(outarg);
|
||||
|
|
|
|||
|
|
@ -1172,6 +1172,8 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
Setattr(n, "wrap:name", wname);
|
||||
|
||||
/* emit function call */
|
||||
emit_action(n, f);
|
||||
|
||||
|
|
@ -1249,8 +1251,6 @@ public:
|
|||
|
||||
Wrapper_print(f, s_wrappers);
|
||||
|
||||
// wrap:name is used by overload resolution
|
||||
Setattr(n, "wrap:name", wname);
|
||||
if (overloaded && !Getattr(n, "sym:nextSibling")) {
|
||||
dispatchFunction(n);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -310,6 +310,7 @@ public:
|
|||
if (overname) {
|
||||
Append(wname, overname);
|
||||
}
|
||||
Setattr(n, "wrap:name", wname);
|
||||
|
||||
Printv(f->def, "static void ", wname, "(INT32 args) {", NIL);
|
||||
|
||||
|
|
@ -469,7 +470,6 @@ public:
|
|||
if (!Getattr(n, "sym:overloaded")) {
|
||||
add_method(iname, wname, description);
|
||||
} else {
|
||||
Setattr(n, "wrap:name", wname);
|
||||
if (!Getattr(n, "sym:nextSibling")) {
|
||||
dispatchFunction(n);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1937,6 +1937,8 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
Setattr(n, "wrap:name", wname);
|
||||
|
||||
emit_action(n, f);
|
||||
|
||||
if (director_method) {
|
||||
|
|
@ -2106,8 +2108,6 @@ public:
|
|||
Wrapper_print(f, f_wrappers);
|
||||
}
|
||||
|
||||
Setattr(n, "wrap:name", wname);
|
||||
|
||||
/* Now register the function with the interpreter. */
|
||||
if (!Getattr(n, "sym:overloaded")) {
|
||||
add_method(iname, wname, allow_kwargs, n, funpack, num_required, num_arguments);
|
||||
|
|
|
|||
|
|
@ -1771,6 +1771,8 @@ public:
|
|||
Printf(f->code, "try {\n");
|
||||
}
|
||||
|
||||
Setattr(n, "wrap:name", wname);
|
||||
|
||||
emit_action(n, f);
|
||||
|
||||
if (director_method) {
|
||||
|
|
@ -1948,7 +1950,6 @@ public:
|
|||
if (current == CONSTRUCTOR_ALLOCATE) {
|
||||
create_command(n, symname);
|
||||
} else {
|
||||
Setattr(n, "wrap:name", wname);
|
||||
if (!Getattr(n, "sym:nextSibling"))
|
||||
dispatchFunction(n);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue