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
|
|
@ -3682,19 +3682,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);
|
||||
|
|
@ -3702,6 +3690,7 @@ public:
|
|||
Swig_typemap_attach_parms("jtype", l, 0);
|
||||
Swig_typemap_attach_parms("directorin", l, 0);
|
||||
Swig_typemap_attach_parms("javadirectorin", l, 0);
|
||||
Swig_typemap_attach_parms("directorargout", l, w);
|
||||
|
||||
if (!ignored_method) {
|
||||
/* Add Java environment pointer to wrapper */
|
||||
|
|
@ -3811,6 +3800,7 @@ public:
|
|||
Append(jnidesc, jni_canon);
|
||||
Delete(jni_canon);
|
||||
|
||||
Setattr(p, "emit:directorinput", arg);
|
||||
Replaceall(tm, "$input", arg);
|
||||
Replaceall(tm, "$owner", "0");
|
||||
|
||||
|
|
@ -4014,6 +4004,19 @@ public:
|
|||
Delete(result_str);
|
||||
}
|
||||
|
||||
/* Marshal outputs */
|
||||
for (p = l; p;) {
|
||||
if ((tm = Getattr(p, "tmap:directorargout"))) {
|
||||
addThrows(n, "tmap: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);
|
||||
}
|
||||
}
|
||||
|
||||
Delete(imclass_desc);
|
||||
Delete(class_desc);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue