warning fix

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11045 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2009-01-09 22:19:06 +00:00
commit 9c53670fed

View file

@ -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