Correct special variables in 'directorargout' typemap. This change will break any 'directorargout' typemaps you may have written. Please change: to and to \n Also fix the named 'directorargout' DIRECTOROUT typemaps for these languages which didn't previously compile and add in , etc expansion.\n [C#, Go, Java, D] Add support for the 'directorargout' typemap.\n [Java] Add (char *STRING, size_t LENGTH) director typemaps.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12877 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
67993c8786
commit
468ca084fc
18 changed files with 249 additions and 96 deletions
|
|
@ -2057,19 +2057,7 @@ public:
|
|||
Delete(retpm);
|
||||
}
|
||||
|
||||
/* Go through argument list, attach lnames for arguments */
|
||||
for (i = 0, p = l; p; p = nextSibling(p), ++i) {
|
||||
String *arg = Getattr(p, "name");
|
||||
String *lname = NewString("");
|
||||
|
||||
if (!arg && Cmp(Getattr(p, "type"), "void")) {
|
||||
lname = NewStringf("arg%d", i);
|
||||
Setattr(p, "name", lname);
|
||||
} else
|
||||
lname = arg;
|
||||
|
||||
Setattr(p, "lname", lname);
|
||||
}
|
||||
Swig_director_parms_fixup(l);
|
||||
|
||||
// Attach the standard typemaps.
|
||||
Swig_typemap_attach_parms("out", l, 0);
|
||||
|
|
@ -2078,6 +2066,7 @@ public:
|
|||
Swig_typemap_attach_parms("dtype", l, 0);
|
||||
Swig_typemap_attach_parms("directorin", l, 0);
|
||||
Swig_typemap_attach_parms("ddirectorin", l, 0);
|
||||
Swig_typemap_attach_parms("directorargout", l, w);
|
||||
|
||||
// Preamble code.
|
||||
if (!ignored_method)
|
||||
|
|
@ -2135,6 +2124,7 @@ public:
|
|||
/* Add input marshalling code */
|
||||
if ((tm = Getattr(p, "tmap:directorin"))) {
|
||||
|
||||
Setattr(p, "emit:directorinput", arg);
|
||||
Replaceall(tm, "$input", arg);
|
||||
Replaceall(tm, "$owner", "0");
|
||||
|
||||
|
|
@ -2318,6 +2308,19 @@ public:
|
|||
Delete(result_str);
|
||||
}
|
||||
|
||||
/* Marshal outputs */
|
||||
for (p = l; p;) {
|
||||
if ((tm = Getattr(p, "tmap:directorargout"))) {
|
||||
canThrow(n, "directorargout", p);
|
||||
Replaceall(tm, "$result", "jresult");
|
||||
Replaceall(tm, "$input", Getattr(p, "emit:directorinput"));
|
||||
Printv(w->code, tm, "\n", NIL);
|
||||
p = Getattr(p, "tmap:directorargout:next");
|
||||
} else {
|
||||
p = nextSibling(p);
|
||||
}
|
||||
}
|
||||
|
||||
/* Terminate wrapper code */
|
||||
Printf(w->code, "}\n");
|
||||
if (!is_void)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue