From 357d0650ede78f1fc17ba4a70c53761ad40319c0 Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Wed, 1 Mar 2006 23:30:37 +0000 Subject: [PATCH] add SWIG_TYPECHECK_SWIGOBJECT to resolve simple overload functions as Graph(int i)/Graph(PyObject* p) git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8923 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Lib/swig.swg | 3 +++ Lib/typemaps/swigobject.swg | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Lib/swig.swg b/Lib/swig.swg index 2d21bbb5b..ea73a71a4 100644 --- a/Lib/swig.swg +++ b/Lib/swig.swg @@ -566,6 +566,9 @@ namespace std { %define SWIG_TYPECHECK_CHAR_PTR 2130 %enddef +%define SWIG_TYPECHECK_SWIGOBJECT 5000 %enddef + + /* ----------------------------------------------------------------------------- * Runtime code * ----------------------------------------------------------------------------- */ diff --git a/Lib/typemaps/swigobject.swg b/Lib/typemaps/swigobject.swg index ab91731ba..e89b63026 100644 --- a/Lib/typemaps/swigobject.swg +++ b/Lib/typemaps/swigobject.swg @@ -18,7 +18,7 @@ %set_output(*$1); } -%typecheck(SWIG_TYPECHECK_POINTER) SWIG_Object "$1 = ($input != 0);"; +%typecheck(SWIG_TYPECHECK_SWIGOBJECT) SWIG_Object "$1 = ($input != 0);"; %typemap(throws,noblock=1) SWIG_Object { %raise($1, "$type", 0);