[Python-checkins] r45535 - python/trunk/Modules/_ctypes/_ctypes.c (original) (raw)
thomas.heller python-checkins at python.org
Tue Apr 18 16:57:40 CEST 2006
- Previous message: [Python-checkins] r45534 - in python/trunk: Include/code.h Objects/codeobject.c Python/ceval.c
- Next message: [Python-checkins] buildbot warnings in x86 OpenBSD trunk
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: thomas.heller Date: Tue Apr 18 16:57:39 2006 New Revision: 45535
Modified: python/trunk/Modules/_ctypes/_ctypes.c Log: Fix refcounting. This makes 'import ctypes; reload(ctypes)' no longer leak reference counts.
Modified: python/trunk/Modules/_ctypes/_ctypes.c
--- python/trunk/Modules/_ctypes/_ctypes.c (original) +++ python/trunk/Modules/_ctypes/_ctypes.c Tue Apr 18 16:57:39 2006 @@ -1283,6 +1283,7 @@ suffix = PyString_FromString("_be"); #endif
- Py_INCREF(name); PyString_Concat(&name, suffix); if (name == NULL) return NULL;
@@ -1459,6 +1460,7 @@ PyObject_SetAttrString(swapped, "ctype_le", (PyObject *)result); PyObject_SetAttrString(swapped, "ctype_be", swapped); #endif + Py_DECREF(swapped); };
return (PyObject *)result;
- Previous message: [Python-checkins] r45534 - in python/trunk: Include/code.h Objects/codeobject.c Python/ceval.c
- Next message: [Python-checkins] buildbot warnings in x86 OpenBSD trunk
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]