diff Include/methodobject.h @ 2129:05360cd616ae legacy-trunk

The great renaming, phase two: all header files have been updated to use the new names exclusively, and the linker will see the new names. Files that import "Python.h" also only see the new names. Files that import "allobjects.h" will continue to be able to use the old names, due to the inclusion (in allobjects.h) of "rename2.h".
author Guido van Rossum <guido@python.org>
date Thu, 12 Jan 1995 11:45:45 +0000
parents cf65a124fa4b
children d091b246a3a7
line wrap: on
line diff
--- a/Include/methodobject.h	Thu Jan 12 11:37:57 1995 +0000
+++ b/Include/methodobject.h	Thu Jan 12 11:45:45 1995 +0000
@@ -30,26 +30,29 @@
 
 /* Method object interface */
 
-extern DL_IMPORT typeobject Methodtype;
+extern DL_IMPORT PyTypeObject PyCFunction_Type;
 
-#define is_methodobject(op) ((op)->ob_type == &Methodtype)
+#define PyCFunction_Check(op) ((op)->ob_type == &PyCFunction_Type)
 
-typedef object *(*method) FPROTO((object *, object *));
+typedef PyObject *(*PyCFunction) Py_FPROTO((PyObject *, PyObject *));
 
-extern method getmethod PROTO((object *));
-extern object *getself PROTO((object *));
-extern int getvarargs PROTO((object *));
+extern PyCFunction PyCFunction_GetFunction Py_PROTO((PyObject *));
+extern PyObject *PyCFunction_GetSelf Py_PROTO((PyObject *));
+extern int PyCFunction_IsVarArgs Py_PROTO((PyObject *));
 
-struct methodlist {
-	char	*ml_name;
-	method	ml_meth;
-	int	ml_flags;
-	char	*ml_doc;
+struct PyMethodDef {
+	char		*ml_name;
+	PyCFunction	ml_meth;
+	int		ml_flags;
+	char		*ml_doc;
 };
+typedef struct PyMethodDef PyMethodDef;
 
-extern object *newmethodobject PROTO((struct methodlist *, object *));
+extern PyObject *Py_FindMethod
+	Py_PROTO((PyMethodDef[], PyObject *, char *));
 
-extern object *findmethod PROTO((struct methodlist[], object *, char *));
+extern PyObject *PyCFunction_New
+	Py_PROTO((PyMethodDef *, PyObject *));
 
 /* Flag passed to newmethodobject */
 #define METH_VARARGS  0x0001