aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-10-22 00:43:43 +0000
committerGuido van Rossum <guido@python.org>2001-10-22 00:43:43 +0000
commitc8e5645f15054a87945d5f62dc23c6e49a394db5 (patch)
tree94172c8b5b197c564ba64789b81cd41334b996a9 /Include/descrobject.h
parentMake tabnanny happy. (Piers, please run the test suite before (diff)
downloadcpython-c8e5645f15054a87945d5f62dc23c6e49a394db5.tar.gz
cpython-c8e5645f15054a87945d5f62dc23c6e49a394db5.tar.bz2
cpython-c8e5645f15054a87945d5f62dc23c6e49a394db5.zip
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__.
Diffstat (limited to 'Include/descrobject.h')
-rw-r--r--Include/descrobject.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/Include/descrobject.h b/Include/descrobject.h
index 9a071101531..918dd5a0420 100644
--- a/Include/descrobject.h
+++ b/Include/descrobject.h
@@ -14,15 +14,22 @@ typedef struct PyGetSetDef {
typedef PyObject *(*wrapperfunc)(PyObject *self, PyObject *args,
void *wrapped);
+typedef PyObject *(*wrapperfunc_kwds)(PyObject *self, PyObject *args,
+ void *wrapped, PyObject *kwds);
+
struct wrapperbase {
char *name;
int offset;
void *function;
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 */
#define PyDescr_COMMON \