warning fix
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11045 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
3f03858862
commit
9c53670fed
1 changed files with 3 additions and 1 deletions
|
|
@ -17,7 +17,6 @@ extern int gcd(int x, int y);
|
|||
|
||||
%typemap(in,fragment="t_output_helper") (int argc, char *argv[]) {
|
||||
int i;
|
||||
int l;
|
||||
if (!PyList_Check($input)) {
|
||||
SWIG_exception(SWIG_ValueError, "Expecting a list");
|
||||
}
|
||||
|
|
@ -38,7 +37,10 @@ extern int gcd(int x, int y);
|
|||
SWIG_exception(SWIG_ValueError, "List items must be strings");
|
||||
}
|
||||
%#if PY_VERSION_HEX >= 0x03000000
|
||||
{
|
||||
int l;
|
||||
$2[i] = PyUnicode_AsStringAndSize(s, &l);
|
||||
}
|
||||
%#else
|
||||
$2[i] = PyString_AsString(s);
|
||||
%#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue