]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
changes for keyword args to built-in functions and classes
authorGuido van Rossum <guido@python.org>
Wed, 26 Jul 1995 17:58:29 +0000 (17:58 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 26 Jul 1995 17:58:29 +0000 (17:58 +0000)
Include/classobject.h
Include/methodobject.h
Include/rename2.h

index f87d02e8722eaee98dca5140d97dac0e0965a40a..807dff7bc50bf87e1beb21563ea037ce2a2d2490 100644 (file)
@@ -62,7 +62,7 @@ extern DL_IMPORT(PyTypeObject) PyClass_Type, PyInstance_Type, PyMethod_Type;
 #define PyMethod_Check(op) ((op)->ob_type == &PyMethod_Type)
 
 extern PyObject *PyClass_New Py_PROTO((PyObject *, PyObject *, PyObject *));
-extern PyObject *PyInstance_New Py_PROTO((PyObject *, PyObject *));
+extern PyObject *PyInstance_New Py_PROTO((PyObject *, PyObject *, PyObject *));
 extern PyObject *PyMethod_New Py_PROTO((PyObject *, PyObject *, PyObject *));
 
 extern PyObject *PyMethod_Function Py_PROTO((PyObject *));
index cbe3270863e49067e013d9e1fad600142d7758f9..243b3be175365504d7ec7608100ca4bf3210e93c 100644 (file)
@@ -35,10 +35,12 @@ extern DL_IMPORT(PyTypeObject) PyCFunction_Type;
 #define PyCFunction_Check(op) ((op)->ob_type == &PyCFunction_Type)
 
 typedef PyObject *(*PyCFunction) Py_FPROTO((PyObject *, PyObject *));
+typedef PyObject *(*PyCFunctionWithKeywords)
+       Py_FPROTO((PyObject *, PyObject *, PyObject *));
 
 extern PyCFunction PyCFunction_GetFunction Py_PROTO((PyObject *));
 extern PyObject *PyCFunction_GetSelf Py_PROTO((PyObject *));
-extern int PyCFunction_IsVarArgs Py_PROTO((PyObject *));
+extern int PyCFunction_GetFlags Py_PROTO((PyObject *));
 
 struct PyMethodDef {
        char            *ml_name;
@@ -56,6 +58,7 @@ extern PyObject *PyCFunction_New
 
 /* Flag passed to newmethodobject */
 #define METH_VARARGS  0x0001
+#define METH_KEYWORDS 0x0002
 
 typedef struct PyMethodChain {
        PyMethodDef *methods;           /* Methods of this type */
index 417dea601cede1acb8a7e847e55b426c53c15dd9..adc91d48ddf8f58fdb493653b6a87be30e240818 100644 (file)
@@ -292,7 +292,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #define findmethodinchain Py_FindMethodInChain
 #define getmethod PyCFunction_GetFunction
 #define getself PyCFunction_GetSelf
-#define getvarargs PyCFunction_IsVarArgs
+#define getflags PyCFunction_GetFlags
 #define newmethodobject PyCFunction_New
 #define getmoduledict PyModule_GetDict
 #define getmodulename PyModule_GetName