diff options
| author | William S Fulton <wsf@fultondesigns.co.uk> | 2009-01-09 22:19:06 +0000 |
|---|---|---|
| committer | William S Fulton <wsf@fultondesigns.co.uk> | 2009-01-09 22:19:06 +0000 |
| commit | 9c53670fed145fdc85861c3f69827afbac09b697 (patch) | |
| tree | 57d606de9c02ba35d5ab67237cb4b54d232603e2 /Examples/python/multimap | |
| parent | 3f03858862ebd1a065eb9cb2bf6e6cda4c941f7c (diff) | |
| download | swig-9c53670fed145fdc85861c3f69827afbac09b697.tar.gz | |
warning fix
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11045 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Examples/python/multimap')
| -rw-r--r-- | Examples/python/multimap/example.i | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Examples/python/multimap/example.i b/Examples/python/multimap/example.i index 3d5a09771..f1c4d9990 100644 --- a/Examples/python/multimap/example.i +++ b/Examples/python/multimap/example.i @@ -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 |
