[Python-checkins] CVS: python/dist/src/Include descrobject.h,2.7,2.8
Guido van Rossum
gvanrossum@users.sourceforge.net
2001年10月21日 17:43:45 -0700
Update of /cvsroot/python/python/dist/src/Include
In directory usw-pr-cvs1:/tmp/cvs-serv21240/Include
Modified Files:
descrobject.h
Log Message:
Methods of built-in types now properly check for keyword arguments
(formerly these were silently ignored). The only built-in methods
that take keyword arguments are __call__, __init__ and __new__.
Index: descrobject.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/descrobject.h,v
retrieving revision 2.7
retrieving revision 2.8
diff -C2 -d -r2.7 -r2.8
*** descrobject.h 2001年10月21日 00:44:31 2.7
--- descrobject.h 2001年10月22日 00:43:43 2.8
***************
*** 15,18 ****
--- 15,21 ----
void *wrapped);
+ typedef PyObject *(*wrapperfunc_kwds)(PyObject *self, PyObject *args,
+ void *wrapped, PyObject *kwds);
+
struct wrapperbase {
char *name;
***************
*** 21,26 ****
--- 24,33 ----
wrapperfunc wrapper;
char *doc;
+ int flags;
PyObject *name_strobj;
};
+
+ /* Flags for above struct */
+ #define PyWrapperFlag_KEYWORDS 1 /* wrapper function takes keyword args */
/* Various kinds of descriptor objects */