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:
William S Fulton 2003-09-20 23:52:28 +00:00
commit 7ee01311b2
24 changed files with 500 additions and 501 deletions

View file

@ -781,7 +781,7 @@ class JAVA : public Language {
Swig_typemap_attach_parms("jni", l, f);
Swig_typemap_attach_parms("jtype", l, f);
if (director_method) {
Setattr(n, "tmap:inv", Swig_typemap_lookup_new("inv", n, "", 0));
Setattr(n, "tmap:directorin", Swig_typemap_lookup_new("directorin", n, "", 0));
Swig_typemap_attach_parms("javadirectorin", l, 0);
}
@ -1037,7 +1037,7 @@ class JAVA : public Language {
Printf(f->code, "} else {\n");
if ((tm= Getattr(n, "tmap:inv")) != NULL && (jdescrip = Getattr(n, "tmap:inv:parse")) != NULL) {
if ((tm= Getattr(n, "tmap:directorin")) != NULL && (jdescrip = Getattr(n, "tmap:directorin:parse")) != NULL) {
String *jni_canon = canonicalJNIFDesc(jdescrip, n, proxy_class_name);
Delete(jdescrip);
@ -1087,8 +1087,8 @@ class JAVA : public Language {
Delete(jdescrip);
} else {
Swig_warning(WARN_TYPEMAP_INV_UNDEF, input_file, line_number,
"No or improper inv typemap defined for %s\n", c_return_type);
Swig_warning(WARN_TYPEMAP_DIRECTORIN_UNDEF, input_file, line_number,
"No or improper directorin typemap defined for %s\n", c_return_type);
}
Printf(f->code, " }\n");
@ -2690,7 +2690,7 @@ class JAVA : public Language {
Swig_typemap_attach_parms("out", l, w);
Swig_typemap_attach_parms("jni", l, w);
Swig_typemap_attach_parms("jtype", l, w);
Swig_typemap_attach_parms("inv", l, 0);
Swig_typemap_attach_parms("directorin", l, 0);
Swig_typemap_attach_parms("javadirectorin", l, 0);
/* Get the JNI field descriptor for this return type */
@ -2706,16 +2706,16 @@ class JAVA : public Language {
Delete(jretval_decl);
}
if ((tm = Swig_typemap_lookup_new("inv", tp, "", 0)) != NULL
&& (jdesc = Getattr(tp, "tmap:inv:parse")) != NULL) {
if ((tm = Swig_typemap_lookup_new("directorin", tp, "", 0)) != NULL
&& (jdesc = Getattr(tp, "tmap:directorin:parse")) != NULL) {
String *jnidesc_canon;
jnidesc_canon = canonicalJNIFDesc(jdesc, n, jniret_type);
Append(jniret_desc, jnidesc_canon);
Delete(jnidesc_canon);
} else {
Swig_warning(WARN_TYPEMAP_INV_UNDEF, input_file, line_number,
"No or improper inv typemap defined for %s\n", SwigType_str(jniret_type,0));
Swig_warning(WARN_TYPEMAP_DIRECTORIN_UNDEF, input_file, line_number,
"No or improper directorin typemap defined for %s\n", SwigType_str(jniret_type,0));
output_director = false;
}
@ -2729,16 +2729,16 @@ class JAVA : public Language {
{
String *jdesc;
if ((tm = Swig_typemap_lookup_new("inv", retpm, "", 0)) != NULL
&& (jdesc = Getattr(retpm, "tmap:inv:parse")) != NULL) {
if ((tm = Swig_typemap_lookup_new("directorin", retpm, "", 0)) != NULL
&& (jdesc = Getattr(retpm, "tmap:directorin:parse")) != NULL) {
String *jnidesc_canon;
jnidesc_canon = canonicalJNIFDesc(jdesc, n, return_type);
Append(classret_desc, jnidesc_canon);
Delete(jnidesc_canon);
} else {
Swig_warning(WARN_TYPEMAP_INV_UNDEF, input_file, line_number,
"No or improper inv typemap defined for %s\n", SwigType_str(jniret_type,0));
Swig_warning(WARN_TYPEMAP_DIRECTORIN_UNDEF, input_file, line_number,
"No or improper directorin typemap defined for %s\n", SwigType_str(jniret_type,0));
output_director = false;
}
}
@ -2805,8 +2805,8 @@ class JAVA : public Language {
Parm *tp = NewParm(classname, empty_str);
String *jdesc;
if ((tm = Swig_typemap_lookup_new("inv", tp, "", 0)) != NULL
&& (jdesc = Getattr(tp, "tmap:inv:parse")) != NULL) {
if ((tm = Swig_typemap_lookup_new("directorin", tp, "", 0)) != NULL
&& (jdesc = Getattr(tp, "tmap:directorin:parse")) != NULL) {
String *jni_canon;
jni_canon = canonicalJNIFDesc(jdesc, n, classname);
@ -2814,8 +2814,8 @@ class JAVA : public Language {
Delete(jni_canon);
Delete(tm);
} else {
Swig_warning(WARN_TYPEMAP_INV_UNDEF, input_file, line_number,
"No or improper inv typemap defined for %s\n", SwigType_str(classname, 0));
Swig_warning(WARN_TYPEMAP_DIRECTORIN_UNDEF, input_file, line_number,
"No or improper directorin typemap defined for %s\n", SwigType_str(classname, 0));
output_director = false;
}
@ -2865,10 +2865,10 @@ class JAVA : public Language {
Wrapper_add_local(w, arg, c_decl);
/* Add input marshalling code and update JNI field descriptor */
if ((desc_tm = Swig_typemap_lookup_new("inv", tp, "", 0)) != NULL
&& (jdesc = Getattr(tp, "tmap:inv:parse")) != NULL) {
if ((tm = Getattr(p, "tmap:inv")) != NULL
&& (cdesc = Getattr(p, "tmap:inv:parse")) != NULL) {
if ((desc_tm = Swig_typemap_lookup_new("directorin", tp, "", 0)) != NULL
&& (jdesc = Getattr(tp, "tmap:directorin:parse")) != NULL) {
if ((tm = Getattr(p, "tmap:directorin")) != NULL
&& (cdesc = Getattr(p, "tmap:directorin:parse")) != NULL) {
String *jni_canon;
jni_canon = canonicalJNIFDesc(jdesc, n, c_param_type);
@ -2927,16 +2927,16 @@ class JAVA : public Language {
p = Getattr(p, "tmap:in:next");
} else {
Swig_warning(WARN_TYPEMAP_INV_UNDEF, input_file, line_number,
"No or improper inv typemap defined for %s\n", SwigType_str(pt, 0));
Swig_warning(WARN_TYPEMAP_DIRECTORIN_UNDEF, input_file, line_number,
"No or improper directorin typemap defined for %s\n", SwigType_str(pt, 0));
output_director = false;
p = nextSibling(p);
}
Delete(desc_tm);
} else {
Swig_warning(WARN_TYPEMAP_INV_UNDEF, input_file, line_number,
"No or improper inv typemap defined for %s\n", SwigType_str(c_param_type, 0));
Swig_warning(WARN_TYPEMAP_DIRECTORIN_UNDEF, input_file, line_number,
"No or improper directorin typemap defined for %s\n", SwigType_str(c_param_type, 0));
output_director = false;
p = nextSibling(p);
}

View file

@ -1555,9 +1555,9 @@ public:
String *arglist = NewString("");
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);
Parm* p;
int num_arguments = emit_num_arguments(l);
@ -1575,18 +1575,18 @@ public:
p = Getattr(p, "tmap:ignore:next");
}
if (Getattr(p, "tmap:argoutv") != 0) outputs++;
if (Getattr(p, "tmap:directorargout") != 0) outputs++;
String* pname = Getattr(p, "name");
String* ptype = Getattr(p, "type");
Putc(',',arglist);
if ((tm = Getattr(p, "tmap:inv")) != 0) {
if ((tm = Getattr(p, "tmap:directorin")) != 0) {
Replaceall(tm, "$input", pname);
Replaceall(tm, "$owner", "0");
if (Len(tm) == 0) Append(tm, pname);
Printv(wrap_args, tm, "\n", NIL);
p = Getattr(p, "tmap:inv:next");
p = Getattr(p, "tmap:directorin:next");
continue;
} else
if (Cmp(ptype, "void")) {
@ -1648,7 +1648,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(ptype, 0), classname, name);
status = SWIG_NOWRAP;
break;
@ -1725,11 +1725,11 @@ public:
* occurs in Language::cDeclaration().
*/
Setattr(n, "type", return_type);
tm = Swig_typemap_lookup_new("outv", n, "c_result", w);
tm = Swig_typemap_lookup_new("directorout", n, "c_result", w);
Setattr(n, "type", type);
if (tm == 0) {
String *name = NewString("c_result");
tm = Swig_typemap_search("outv", return_type, name, NULL);
tm = Swig_typemap_search("directorout", return_type, name, NULL);
Delete(name);
}
if (tm != 0) {
@ -1751,11 +1751,11 @@ public:
/* marshal outputs */
for (p = l; p; ) {
if ((tm = Getattr(p, "tmap:argoutv")) != 0) {
if ((tm = Getattr(p, "tmap:directorargout")) != 0) {
Replaceall(tm, "$input", "swig_result");
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);
}

View file

@ -1320,9 +1320,9 @@ public:
String* parse_args = NewString("");
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);
Parm* p;
int num_arguments = emit_num_arguments(l);
@ -1349,14 +1349,14 @@ public:
}
*/
if (Getattr(p, "tmap:argoutv") != 0) outputs++;
if (Getattr(p, "tmap:directorargout") != 0) outputs++;
String* pname = Getattr(p, "name");
String* ptype = Getattr(p, "type");
Putc(',',arglist);
if ((tm = Getattr(p, "tmap:inv")) != 0) {
String* parse = Getattr(p, "tmap:inv:parse");
if ((tm = Getattr(p, "tmap:directorin")) != 0) {
String* parse = Getattr(p, "tmap:directorin:parse");
if (!parse) {
sprintf(source, "obj%d", idx++);
Replaceall(tm, "$input", source);
@ -1372,7 +1372,7 @@ public:
if (Len(tm) == 0) Append(tm, pname);
Printf(arglist, "%s", tm);
}
p = Getattr(p, "tmap:inv:next");
p = Getattr(p, "tmap:directorin:next");
continue;
} else
if (Cmp(ptype, "void")) {
@ -1436,7 +1436,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(ptype, 0), classname, name);
status = SWIG_NOWRAP;
break;
@ -1523,11 +1523,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) {
@ -1554,7 +1554,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 = PyTuple_GetItem(result, %d);\n", idx++);
Replaceall(tm, "$input", "output");
@ -1563,7 +1563,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);
}

View file

@ -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);
}