From d6f0a99b3ef4061da82c2a885aa5ee97e0d289b2 Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Mon, 7 Nov 2005 11:13:16 +0000 Subject: [PATCH] fix bool AsVal git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7817 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Lib/python/pyprimtypes.swg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/python/pyprimtypes.swg b/Lib/python/pyprimtypes.swg index b48c8900f..7aaba1757 100644 --- a/Lib/python/pyprimtypes.swg +++ b/Lib/python/pyprimtypes.swg @@ -27,7 +27,7 @@ SWIG_AsVal_dec(bool)(PyObject *obj, bool *val) return SWIG_OK; } else { long v = 0; - int res = SWIG_AsVal(long)(obj, &v); + int res = SWIG_AsVal(long)(obj, val ? &v : 0); if (res == SWIG_OK && val) *val = v ? true : false; return res; }