summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2010-08-08 18:28:59 (GMT)
committerThomas Heller <theller@ctypes.org>2010-08-08 18:28:59 (GMT)
commit5c7589c52df046b91913aa43c0d3f21b60cec46e (patch)
tree83396a7c3885de75fdecfed4117c89391b7b2a01 /Modules
parentb8774ec5231e64853484d7957a891d8c09e87558 (diff)
downloadcpython-5c7589c52df046b91913aa43c0d3f21b60cec46e.zip
cpython-5c7589c52df046b91913aa43c0d3f21b60cec46e.tar.gz
cpython-5c7589c52df046b91913aa43c0d3f21b60cec46e.tar.bz2
Merged revisions 83841 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83841 | thomas.heller | 2010-08-08 20:16:20 +0200 (So, 08 Aug 2010) | 2 lines Fix issue6869: refcount problem in the _ctypes extension. ........
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_ctypes/_ctypes.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c
index 7d7d58c..4fc9d02 100644
--- a/Modules/_ctypes/_ctypes.c
+++ b/Modules/_ctypes/_ctypes.c
@@ -5541,36 +5541,42 @@ init_ctypes(void)
Struct_Type.tp_base = &PyCData_Type;
if (PyType_Ready(&Struct_Type) < 0)
return;
+ Py_INCREF(&Struct_Type);
PyModule_AddObject(m, "Structure", (PyObject *)&Struct_Type);
Py_TYPE(&Union_Type) = &UnionType_Type;
Union_Type.tp_base = &PyCData_Type;
if (PyType_Ready(&Union_Type) < 0)
return;
+ Py_INCREF(&Union_Type);
PyModule_AddObject(m, "Union", (PyObject *)&Union_Type);
Py_TYPE(&PyCPointer_Type) = &PyCPointerType_Type;
PyCPointer_Type.tp_base = &PyCData_Type;
if (PyType_Ready(&PyCPointer_Type) < 0)
return;
+ Py_INCREF(&PyCPointer_Type);
PyModule_AddObject(m, "_Pointer", (PyObject *)&PyCPointer_Type);
Py_TYPE(&PyCArray_Type) = &PyCArrayType_Type;
PyCArray_Type.tp_base = &PyCData_Type;
if (PyType_Ready(&PyCArray_Type) < 0)
return;
+ Py_INCREF(&PyCArray_Type);
PyModule_AddObject(m, "Array", (PyObject *)&PyCArray_Type);
Py_TYPE(&Simple_Type) = &PyCSimpleType_Type;
Simple_Type.tp_base = &PyCData_Type;
if (PyType_Ready(&Simple_Type) < 0)
return;
+ Py_INCREF(&Simple_Type);
PyModule_AddObject(m, "_SimpleCData", (PyObject *)&Simple_Type);
Py_TYPE(&PyCFuncPtr_Type) = &PyCFuncPtrType_Type;
PyCFuncPtr_Type.tp_base = &PyCData_Type;
if (PyType_Ready(&PyCFuncPtr_Type) < 0)
return;
+ Py_INCREF(&PyCFuncPtr_Type);
PyModule_AddObject(m, "CFuncPtr", (PyObject *)&PyCFuncPtr_Type);
/*************************************************