summaryrefslogtreecommitdiff
path: root/Include/methodobject.h
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-01-12 11:45:45 +0000
committerGuido van Rossum <guido@python.org>1995-01-12 11:45:45 +0000
commitcaa63808861d4e92d4dc1005fc01de0f2e4a8fd0 (patch)
tree3771531169ab510aca9b69cdc4d9de2b5c8810c4 /Include/methodobject.h
parent94390ec2a6ea5acbea9dead528ce067c396a0301 (diff)
downloadcpython-git-caa63808861d4e92d4dc1005fc01de0f2e4a8fd0.tar.gz
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".
Diffstat (limited to 'Include/methodobject.h')
-rw-r--r--Include/methodobject.h29
1 files changed, 16 insertions, 13 deletions
diff --git a/Include/methodobject.h b/Include/methodobject.h
index 44664e0782..1b2dd87fa3 100644
--- a/Include/methodobject.h
+++ b/Include/methodobject.h
@@ -30,26 +30,29 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* 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