Commit 1320bd4e authored by Jeremy Hylton's avatar Jeremy Hylton

Call _Py_NewReference() for wrappers allocated from the free list.

parent 4b4986f8
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE. DAMAGE.
$Id: Acquisition.c,v 1.57 2002/03/08 18:34:23 jeremy Exp $ $Id: Acquisition.c,v 1.58 2002/06/10 22:31:30 jeremy Exp $
If you have questions regarding this software, If you have questions regarding this software,
contact: contact:
...@@ -216,8 +216,9 @@ newWrapper(PyObject *obj, PyObject *container, PyTypeObject *Wrappertype) ...@@ -216,8 +216,9 @@ newWrapper(PyObject *obj, PyObject *container, PyTypeObject *Wrappertype)
{ {
self=freeWrappers; self=freeWrappers;
freeWrappers=(Wrapper*)self->obj; freeWrappers=(Wrapper*)self->obj;
_Py_NewReference((PyObject *)self);
assert(self->ob_refcnt == 1);
self->ob_type=Wrappertype; self->ob_type=Wrappertype;
self->ob_refcnt=1;
nWrappers--; nWrappers--;
} }
else else
...@@ -1546,7 +1547,7 @@ initAcquisition(void) ...@@ -1546,7 +1547,7 @@ initAcquisition(void)
/* Create the module and add the functions */ /* Create the module and add the functions */
m = Py_InitModule4("Acquisition", methods, m = Py_InitModule4("Acquisition", methods,
"Provide base classes for acquiring objects\n\n" "Provide base classes for acquiring objects\n\n"
"$Id: Acquisition.c,v 1.57 2002/03/08 18:34:23 jeremy Exp $\n", "$Id: Acquisition.c,v 1.58 2002/06/10 22:31:30 jeremy Exp $\n",
OBJECT(NULL),PYTHON_API_VERSION); OBJECT(NULL),PYTHON_API_VERSION);
d = PyModule_GetDict(m); d = PyModule_GetDict(m);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment