summaryrefslogtreecommitdiff
path: root/Lib/python/argcargv.i
diff options
context:
space:
mode:
authorMarcelo Matus <mmatus@acms.arizona.edu>2005-07-15 21:23:40 +0000
committerMarcelo Matus <mmatus@acms.arizona.edu>2005-07-15 21:23:40 +0000
commit1417650709e2799f6ce1e487823dd987ac2c16b0 (patch)
tree8a715b5d4b63712f2c7b1292032715801ed58e60 /Lib/python/argcargv.i
parent7645869eda1683be8285dfe42a2b772a7c65d1c8 (diff)
downloadswig-1417650709e2799f6ce1e487823dd987ac2c16b0.tar.gz
fix for #1233773
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7331 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Lib/python/argcargv.i')
-rw-r--r--Lib/python/argcargv.i3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/python/argcargv.i b/Lib/python/argcargv.i
index a2fd0718e..c5c42e61a 100644
--- a/Lib/python/argcargv.i
+++ b/Lib/python/argcargv.i
@@ -12,8 +12,9 @@ SWIGINTERN char**
char **argv = 0;
size_t i = 0;
if (SWIG_ConvertPtr(input, (void **)&argv, ppchar_info, 0) == -1) {
+ int list = 0;
PyErr_Clear();
- int list = PyList_Check(input);
+ list = PyList_Check(input);
if (list || PyTuple_Check(input)) {
*argc = list ? PyList_Size(input) : PyTuple_Size(input);
argv = SWIG_new_array(*argc + 1, char*);