Skip to content

Commit bf37d73

Browse files
author
guido
committed
changes for keyword args to built-in functions and classes
git-svn-id: http://svn.python.org/projects/python/trunk@5330 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 9136133 commit bf37d73

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

Include/classobject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ extern DL_IMPORT(PyTypeObject) PyClass_Type, PyInstance_Type, PyMethod_Type;
6262
#define PyMethod_Check(op) ((op)->ob_type == &PyMethod_Type)
6363

6464
extern PyObject *PyClass_New Py_PROTO((PyObject *, PyObject *, PyObject *));
65-
extern PyObject *PyInstance_New Py_PROTO((PyObject *, PyObject *));
65+
extern PyObject *PyInstance_New Py_PROTO((PyObject *, PyObject *, PyObject *));
6666
extern PyObject *PyMethod_New Py_PROTO((PyObject *, PyObject *, PyObject *));
6767

6868
extern PyObject *PyMethod_Function Py_PROTO((PyObject *));

Include/methodobject.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ extern DL_IMPORT(PyTypeObject) PyCFunction_Type;
3535
#define PyCFunction_Check(op) ((op)->ob_type == &PyCFunction_Type)
3636

3737
typedef PyObject *(*PyCFunction) Py_FPROTO((PyObject *, PyObject *));
38+
typedef PyObject *(*PyCFunctionWithKeywords)
39+
Py_FPROTO((PyObject *, PyObject *, PyObject *));
3840

3941
extern PyCFunction PyCFunction_GetFunction Py_PROTO((PyObject *));
4042
extern PyObject *PyCFunction_GetSelf Py_PROTO((PyObject *));
41-
extern int PyCFunction_IsVarArgs Py_PROTO((PyObject *));
43+
extern int PyCFunction_GetFlags Py_PROTO((PyObject *));
4244

4345
struct PyMethodDef {
4446
char *ml_name;
@@ -56,6 +58,7 @@ extern PyObject *PyCFunction_New
5658

5759
/* Flag passed to newmethodobject */
5860
#define METH_VARARGS 0x0001
61+
#define METH_KEYWORDS 0x0002
5962

6063
typedef struct PyMethodChain {
6164
PyMethodDef *methods; /* Methods of this type */

Include/rename2.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
292292
#define findmethodinchain Py_FindMethodInChain
293293
#define getmethod PyCFunction_GetFunction
294294
#define getself PyCFunction_GetSelf
295-
#define getvarargs PyCFunction_IsVarArgs
295+
#define getflags PyCFunction_GetFlags
296296
#define newmethodobject PyCFunction_New
297297
#define getmoduledict PyModule_GetDict
298298
#define getmodulename PyModule_GetName

0 commit comments

Comments
 (0)