[Python-3000-checkins] r60290 - python/branches/py3k-ctypes-pep3118/Modules/_ctypes/_ctypes.c
thomas.heller
python-3000-checkins at python.org
Fri Jan 25 20:09:04 CET 2008
Author: thomas.heller
Date: Fri Jan 25 20:09:03 2008
New Revision: 60290
Modified:
python/branches/py3k-ctypes-pep3118/Modules/_ctypes/_ctypes.c
Log:
Implement to format string for function pointers.
Modified: python/branches/py3k-ctypes-pep3118/Modules/_ctypes/_ctypes.c
==============================================================================
--- python/branches/py3k-ctypes-pep3118/Modules/_ctypes/_ctypes.c (original)
+++ python/branches/py3k-ctypes-pep3118/Modules/_ctypes/_ctypes.c Fri Jan 25 20:09:03 2008
@@ -2096,6 +2096,13 @@
return NULL;
stgdict->paramfunc = CFuncPtrType_paramfunc;
+ /* We do NOT expose the function signature in the format string. It
+ is impossible, generally, because the only requirement for the
+ argtypes items is that they have a .from_param method - we do not
+ know the types of the arguments (although, in practice, most
+ argtypes would be a ctypes type).
+ */
+ stgdict->format = alloc_format_string(NULL, "X{}");
/* create the new instance (which is a class,
since we are a metatype!) */
More information about the Python-3000-checkins
mailing list