summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2007-03-09 20:39:22 (GMT)
committerThomas Heller <theller@ctypes.org>2007-03-09 20:39:22 (GMT)
commit2456a3c02aa295c82fc84aaf6d0740d95aeb05b1 (patch)
tree705702b804d69ab3c1c58c88b3f1ce30b2f70c8f /Modules
parente38051db87b92efeb09373bea3900cde073cda96 (diff)
downloadcpython-2456a3c02aa295c82fc84aaf6d0740d95aeb05b1.zip
cpython-2456a3c02aa295c82fc84aaf6d0740d95aeb05b1.tar.gz
cpython-2456a3c02aa295c82fc84aaf6d0740d95aeb05b1.tar.bz2
Bug #1651235: When a tuple was passed to a ctypes function call,
Python would crash instead of raising an error. The crash was caused by a section of code that should have been removed long ago, at that time ctypes had other ways to pass parameters to function calls.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_ctypes/_ctypes.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c
index 0a90b0a..38bdeee 100644
--- a/Modules/_ctypes/_ctypes.c
+++ b/Modules/_ctypes/_ctypes.c
@@ -339,24 +339,6 @@ CDataType_from_param(PyObject *type, PyObject *value)
((PyTypeObject *)type)->tp_name, ob_name);
return NULL;
}
-#if 1
-/* XXX Remove this section ??? */
- /* tuple returned by byref: */
- /* ('i', addr, obj) */
- if (PyTuple_Check(value)) {
- PyObject *ob;
- StgDictObject *dict;
-
- dict = PyType_stgdict(type);
- ob = PyTuple_GetItem(value, 2);
- if (dict && ob &&
- 0 == PyObject_IsInstance(value, dict->proto)) {
- Py_INCREF(value);
- return value;
- }
- }
-/* ... and leave the rest */
-#endif
as_parameter = PyObject_GetAttrString(value, "_as_parameter_");
if (as_parameter) {