From a4906b81829a1d2b1b44da0dcbf2d42c2edaaa3f Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Sat, 7 Feb 2009 23:44:12 +0000 Subject: [PATCH] remove gcc warning when using -Wunreachable-code git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11117 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Lib/python/pyrun.swg | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Lib/python/pyrun.swg b/Lib/python/pyrun.swg index 52e5d892b..bc5490960 100644 --- a/Lib/python/pyrun.swg +++ b/Lib/python/pyrun.swg @@ -1550,10 +1550,12 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) void *result; if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { PyErr_Clear(); - if (flags & SWIG_POINTER_EXCEPTION) { +#if SWIG_POINTER_EXCEPTION + if (flags) { SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); SWIG_Python_ArgFail(argnum); } +#endif } return result; }