Use FUNC_NAME rather than a bogus typemap variable for signalling

errors.  Call scheme_wrong_type with a zero-based argument number.
Reported by Ondrej Pacovsky, SF #902621.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5734 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Matthias Köppe 2004-02-23 12:56:58 +00:00
commit f7b0956236
3 changed files with 12 additions and 12 deletions

View file

@ -273,7 +273,7 @@ namespace std {
(($1_type &)$1)[i] = (T)(CONVERT_FROM(o));
else
scheme_wrong_type(FUNC_NAME, "vector<" #T ">",
$argnum, argc, argv);
$argnum - 1, argc, argv);
}
} else if (SCHEME_NULLP($input)) {
$1 = std::vector<T >();
@ -288,7 +288,7 @@ namespace std {
$1.push_back((T)(CONVERT_FROM(head)));
else
scheme_wrong_type(FUNC_NAME, "vector<" #T ">",
$argnum, argc, argv);
$argnum - 1, argc, argv);
}
} else {
$1 = *(($&1_type)
@ -308,7 +308,7 @@ namespace std {
temp[i] = (T)(CONVERT_FROM(o));
else
scheme_wrong_type(FUNC_NAME, "vector<" #T ">",
$argnum, argc, argv);
$argnum - 1, argc, argv);
}
} else if (SCHEME_NULLP($input)) {
temp = std::vector<T >();
@ -325,10 +325,10 @@ namespace std {
temp.push_back((T)(CONVERT_FROM(head)));
else
scheme_wrong_type(FUNC_NAME, "vector<" #T ">",
$argnum, argc, argv);
$argnum - 1, argc, argv);
}
} else {
$1 = ($1_ltype) SWIG_MustGetPtr($input,$1_descriptor,$argnum, 0);
$1 = ($1_ltype) SWIG_MustGetPtr($input,$1_descriptor,$argnum - 1, 0);
}
}
%typemap(out) vector<T> {