aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2006-10-27 23:31:49 +0000
committerGuido van Rossum <guido@python.org>2006-10-27 23:31:49 +0000
commit4f72a78684bbfcdc43ceeabb240ceee54706c4b0 (patch)
tree743c27c5125dcef580cffe77395fe97bedf40d5f /Include/funcobject.h
parentThomas Heller fixed modulefinder and added a test. Thanks! (diff)
downloadcpython-4f72a78684bbfcdc43ceeabb240ceee54706c4b0.tar.gz
cpython-4f72a78684bbfcdc43ceeabb240ceee54706c4b0.tar.bz2
cpython-4f72a78684bbfcdc43ceeabb240ceee54706c4b0.zip
Jiwon Seo's PEP 3102 implementation.
See SF#1549670. The compiler package has not yet been updated.
Diffstat (limited to 'Include/funcobject.h')
-rw-r--r--Include/funcobject.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/Include/funcobject.h b/Include/funcobject.h
index 59c19bb1e70..7acbe6e7c1d 100644
--- a/Include/funcobject.h
+++ b/Include/funcobject.h
@@ -23,6 +23,7 @@ typedef struct {
PyObject *func_code; /* A code object */
PyObject *func_globals; /* A dictionary (other mappings won't do) */
PyObject *func_defaults; /* NULL or a tuple */
+ PyObject *func_kwdefaults; /* NULL or a dict */
PyObject *func_closure; /* NULL or a tuple of cell objects */
PyObject *func_doc; /* The __doc__ attribute, can be anything */
PyObject *func_name; /* The __name__ attribute, a string object */
@@ -47,6 +48,8 @@ PyAPI_FUNC(PyObject *) PyFunction_GetGlobals(PyObject *);
PyAPI_FUNC(PyObject *) PyFunction_GetModule(PyObject *);
PyAPI_FUNC(PyObject *) PyFunction_GetDefaults(PyObject *);
PyAPI_FUNC(int) PyFunction_SetDefaults(PyObject *, PyObject *);
+PyAPI_FUNC(PyObject *) PyFunction_GetKwDefaults(PyObject *);
+PyAPI_FUNC(int) PyFunction_SetKwDefaults(PyObject *, PyObject *);
PyAPI_FUNC(PyObject *) PyFunction_GetClosure(PyObject *);
PyAPI_FUNC(int) PyFunction_SetClosure(PyObject *, PyObject *);
@@ -60,6 +63,8 @@ PyAPI_FUNC(int) PyFunction_SetClosure(PyObject *, PyObject *);
(((PyFunctionObject *)func) -> func_module)
#define PyFunction_GET_DEFAULTS(func) \
(((PyFunctionObject *)func) -> func_defaults)
+#define PyFunction_GET_KW_DEFAULTS(func) \
+ (((PyFunctionObject *)func) -> func_kwdefaults)
#define PyFunction_GET_CLOSURE(func) \
(((PyFunctionObject *)func) -> func_closure)