[Python-checkins] r60387 - in python/branches/release25-maint: Lib/ctypes/test/test_funcptr.py Misc/NEWS Modules/_ctypes/_ctypes.c
thomas.heller
python-checkins at python.org
Mon Jan 28 09:42:22 CET 2008
Author: thomas.heller
Date: Mon Jan 28 09:42:22 2008
New Revision: 60387
Modified:
python/branches/release25-maint/Lib/ctypes/test/test_funcptr.py
python/branches/release25-maint/Misc/NEWS
python/branches/release25-maint/Modules/_ctypes/_ctypes.c
Log:
Revert rev. 59926, it breaks comtypes (I need to further examine this).
Modified: python/branches/release25-maint/Lib/ctypes/test/test_funcptr.py
==============================================================================
--- python/branches/release25-maint/Lib/ctypes/test/test_funcptr.py (original)
+++ python/branches/release25-maint/Lib/ctypes/test/test_funcptr.py Mon Jan 28 09:42:22 2008
@@ -123,11 +123,5 @@
self.failUnlessEqual(strtok(None, "\n"), "c")
self.failUnlessEqual(strtok(None, "\n"), None)
- def test_NULL_funcptr(self):
- tp = CFUNCTYPE(c_int)
- func = tp() # NULL function pointer
- # raise a ValueError when we try to call it
- self.assertRaises(ValueError, func)
-
if __name__ == '__main__':
unittest.main()
Modified: python/branches/release25-maint/Misc/NEWS
==============================================================================
--- python/branches/release25-maint/Misc/NEWS (original)
+++ python/branches/release25-maint/Misc/NEWS Mon Jan 28 09:42:22 2008
@@ -217,8 +217,6 @@
- Fix a potential 'SystemError: NULL result without error' in _ctypes.
-- Prevent a segfault when a ctypes NULL function pointer is called.
-
- Bug #1301: Bad assert in _tkinter fixed.
- Patch #1114: fix curses module compilation on 64-bit AIX, & possibly
Modified: python/branches/release25-maint/Modules/_ctypes/_ctypes.c
==============================================================================
--- python/branches/release25-maint/Modules/_ctypes/_ctypes.c (original)
+++ python/branches/release25-maint/Modules/_ctypes/_ctypes.c Mon Jan 28 09:42:22 2008
@@ -3305,11 +3305,6 @@
pProc = *(void **)self->b_ptr;
- if (pProc == NULL) {
- PyErr_SetString(PyExc_ValueError,
- "attempt to call NULL function pointer");
- return NULL;
- }
#ifdef MS_WIN32
if (self->index) {
/* It's a COM method */
More information about the Python-checkins
mailing list