From 6c96148de53ee6afdf065591e8abe9abc26df3d5 Mon Sep 17 00:00:00 2001 From: Haoyu Bai Date: Thu, 14 May 2009 15:58:09 +0000 Subject: [PATCH] fixed the wrong pointer value returned by SwigPyObject_repr() git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11213 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- CHANGES.current | 3 +++ Lib/python/pyrun.swg | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGES.current b/CHANGES.current index 5c9a6fe00..214c34386 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -1,6 +1,9 @@ Version 1.3.40 (in progress) ============================ +2009-05-14: bhy + [Python] Fix the wrong pointer value returned by SwigPyObject_repr(). + 2009-05-13: mutandiz (Mikel Bancroft) [allegrocl] Minor tweak when wrapping in -nocwrap mode. diff --git a/Lib/python/pyrun.swg b/Lib/python/pyrun.swg index 83dd569b0..38632e1ab 100644 --- a/Lib/python/pyrun.swg +++ b/Lib/python/pyrun.swg @@ -383,9 +383,7 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args) #endif { const char *name = SWIG_TypePrettyName(v->ty); - PyObject *hex = SwigPyObject_hex(v); - PyObject *repr = SWIG_Python_str_FromFormat("", name, hex); - Py_DECREF(hex); + PyObject *repr = SWIG_Python_str_FromFormat("", name, v); if (v->next) { #ifdef METH_NOARGS PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);