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!) */ _______________________________________________ Python-3000-checkins mailing list Python-3000-checkins@python.org http://mail.python.org/mailman/listinfo/python-3000-checkins