typemap name changes:
inv => directorin outv => directorout argoutv => directorargout git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5137 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
20fabf7ff3
commit
7ee01311b2
24 changed files with 500 additions and 501 deletions
|
|
@ -2295,15 +2295,15 @@ public:
|
|||
/**
|
||||
* For each parameter to the C++ member function, copy the parameter name
|
||||
* to its "lname"; this ensures that Swig_typemap_attach_parms() will do
|
||||
* the right thing when it sees strings like "$1" in your "inv" typemaps.
|
||||
* the right thing when it sees strings like "$1" in your "directorin" typemaps.
|
||||
* Not sure if it's OK to leave it like this, but seems OK so far.
|
||||
*/
|
||||
Swig_typemap_copy_pname_to_lname(l);
|
||||
|
||||
Swig_typemap_attach_parms("in", l, w);
|
||||
Swig_typemap_attach_parms("inv", l, w);
|
||||
Swig_typemap_attach_parms("outv", l, w);
|
||||
Swig_typemap_attach_parms("argoutv", l, w);
|
||||
Swig_typemap_attach_parms("directorin", l, w);
|
||||
Swig_typemap_attach_parms("directorout", l, w);
|
||||
Swig_typemap_attach_parms("directorargout", l, w);
|
||||
|
||||
int num_arguments = emit_num_arguments(l);
|
||||
int i;
|
||||
|
|
@ -2320,20 +2320,20 @@ public:
|
|||
p = Getattr(p, "tmap:ignore:next");
|
||||
}
|
||||
|
||||
if (Getattr(p, "tmap:argoutv") != 0) outputs++;
|
||||
if (Getattr(p, "tmap:directorargout") != 0) outputs++;
|
||||
|
||||
String* parameterName = Getattr(p, "name");
|
||||
String* parameterType = Getattr(p, "type");
|
||||
|
||||
Putc(',',arglist);
|
||||
if ((tm = Getattr(p, "tmap:inv")) != 0) {
|
||||
if ((tm = Getattr(p, "tmap:directorin")) != 0) {
|
||||
sprintf(source, "obj%d", idx++);
|
||||
Replaceall(tm, "$input", source);
|
||||
Replaceall(tm, "$owner", "0");
|
||||
Printv(wrap_args, tm, "\n", NIL);
|
||||
Wrapper_add_localv(w, source, "VALUE", source, "= Qnil", NIL);
|
||||
Printv(arglist, source, NIL);
|
||||
p = Getattr(p, "tmap:inv:next");
|
||||
p = Getattr(p, "tmap:directorin:next");
|
||||
continue;
|
||||
} else if (Cmp(parameterType, "void")) {
|
||||
/**
|
||||
|
|
@ -2395,7 +2395,7 @@ public:
|
|||
Delete(mangle);
|
||||
Delete(nonconst);
|
||||
} else {
|
||||
Swig_warning(WARN_TYPEMAP_INV_UNDEF, input_file, line_number,
|
||||
Swig_warning(WARN_TYPEMAP_DIRECTORIN_UNDEF, input_file, line_number,
|
||||
"Unable to use type %s as a function argument in director method %s::%s (skipping method).\n", SwigType_str(parameterType, 0), classname, name);
|
||||
status = SWIG_NOWRAP;
|
||||
break;
|
||||
|
|
@ -2462,11 +2462,11 @@ public:
|
|||
* It's not just me, similar silliness also occurs in Language::cDeclaration().
|
||||
*/
|
||||
Setattr(n, "type", return_type);
|
||||
tm = Swig_typemap_lookup_new("outv", n, "result", w);
|
||||
tm = Swig_typemap_lookup_new("directorout", n, "result", w);
|
||||
Setattr(n, "type", type);
|
||||
if (tm == 0) {
|
||||
String *name = NewString("result");
|
||||
tm = Swig_typemap_search("outv", return_type, name, NULL);
|
||||
tm = Swig_typemap_search("directorout", return_type, name, NULL);
|
||||
Delete(name);
|
||||
}
|
||||
if (tm != 0) {
|
||||
|
|
@ -2493,7 +2493,7 @@ public:
|
|||
|
||||
/* Marshal outputs */
|
||||
for (p = l; p; ) {
|
||||
if ((tm = Getattr(p, "tmap:argoutv")) != 0) {
|
||||
if ((tm = Getattr(p, "tmap:directorargout")) != 0) {
|
||||
if (outputs > 1) {
|
||||
Printf(w->code, "output = rb_ary_entry(result, %d);\n", idx++);
|
||||
Replaceall(tm, "$input", "output");
|
||||
|
|
@ -2502,7 +2502,7 @@ public:
|
|||
}
|
||||
Replaceall(tm, "$result", Getattr(p, "name"));
|
||||
Printv(w->code, tm, "\n", NIL);
|
||||
p = Getattr(p, "tmap:argoutv:next");
|
||||
p = Getattr(p, "tmap:directorargout:next");
|
||||
} else {
|
||||
p = nextSibling(p);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue