From b8000dcfefe3cd9d9d537a98315095447b5ef293 Mon Sep 17 00:00:00 2001 From: Dave Beazley Date: Fri, 7 Feb 2003 22:13:11 +0000 Subject: [PATCH] Fixed [ 651355 ] Syntax error with cstring.i git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4264 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Lib/python/cstring.i | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/python/cstring.i b/Lib/python/cstring.i index 0712e29d7..061480e1a 100644 --- a/Lib/python/cstring.i +++ b/Lib/python/cstring.i @@ -121,7 +121,7 @@ %typemap(in) TYPEMAP { char *t = PyString_AsString($input); int n = PyString_Size($input); - if (PyErr_Occurred()) return SWIG_fail; + if (PyErr_Occurred()) SWIG_fail; $1 = ($1_ltype) t; #if #__VA_ARGS__ == "" #if __cplusplus @@ -166,7 +166,7 @@ %define %cstring_output_maxsize(TYPEMAP, SIZE) %typemap(in) (TYPEMAP, SIZE) { $2 = PyInt_AsLong($input); - if (PyErr_Occurred()) return SWIG_fail; + if (PyErr_Occurred()) SWIG_fail; #ifdef __cplusplus $1 = ($1_ltype) new char[$2+1]; #else