From 5b98331c41e2dd39da891d8d6ca5beceaa0f04ed Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Sat, 18 Feb 2006 20:54:17 +0000 Subject: [PATCH] fix for python 2.3 and gc_refs issue reported by Luigi git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8842 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Lib/python/pyrun.swg | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Lib/python/pyrun.swg b/Lib/python/pyrun.swg index cfa22f82b..9f92727fa 100644 --- a/Lib/python/pyrun.swg +++ b/Lib/python/pyrun.swg @@ -272,7 +272,7 @@ PySwigClientData_New(PyObject* obj) PySwigClientData *data = (PySwigClientData *)malloc(sizeof(PySwigClientData)); /* the klass element */ data->klass = obj; - Py_INCREF(obj); + Py_INCREF(data->klass); /* the newraw method and newargs arguments used to create a new raw instance */ if (PyClass_Check(obj)) { data->newraw = 0; @@ -317,7 +317,6 @@ PySwigClientData_New(PyObject* obj) SWIGRUNTIME void PySwigClientData_Del(PySwigClientData* data) { - Py_XDECREF(data->klass); Py_XDECREF(data->newraw); Py_XDECREF(data->newargs); Py_XDECREF(data->destroy);