summaryrefslogtreecommitdiffstats
path: root/Include/methodobject.h
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-07-09 00:20:36 (GMT)
committerFred Drake <fdrake@acm.org>2000-07-09 00:20:36 (GMT)
commitea9cb5aebf38741871ad4f28971dcd23ddd77ad2 (patch)
tree0e891c50f3406cf846cfdad4757464dd087e6592 /Include/methodobject.h
parent5eb6d4e3bf094c33ae66432eeae3668e220dd28d (diff)
downloadcpython-ea9cb5aebf38741871ad4f28971dcd23ddd77ad2.zip
cpython-ea9cb5aebf38741871ad4f28971dcd23ddd77ad2.tar.gz
cpython-ea9cb5aebf38741871ad4f28971dcd23ddd77ad2.tar.bz2
ANSI-fication and Py_PROTO extermination.
Diffstat (limited to 'Include/methodobject.h')
-rw-r--r--Include/methodobject.h46
1 files changed, 22 insertions, 24 deletions
diff --git a/Include/methodobject.h b/Include/methodobject.h
index c01e8a8..ace58d3 100644
--- a/Include/methodobject.h
+++ b/Include/methodobject.h
@@ -1,9 +1,3 @@
-#ifndef Py_METHODOBJECT_H
-#define Py_METHODOBJECT_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/***********************************************************
Copyright (c) 2000, BeOpen.com.
Copyright (c) 1995-2000, Corporation for National Research Initiatives.
@@ -16,6 +10,12 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
/* Method object interface */
+#ifndef Py_METHODOBJECT_H
+#define Py_METHODOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern DL_IMPORT(PyTypeObject) PyCFunction_Type;
#define PyCFunction_Check(op) ((op)->ob_type == &PyCFunction_Type)
@@ -24,9 +24,9 @@ typedef PyObject *(*PyCFunction) Py_FPROTO((PyObject *, PyObject *));
typedef PyObject *(*PyCFunctionWithKeywords)
Py_FPROTO((PyObject *, PyObject *, PyObject *));
-extern DL_IMPORT(PyCFunction) PyCFunction_GetFunction Py_PROTO((PyObject *));
-extern DL_IMPORT(PyObject *) PyCFunction_GetSelf Py_PROTO((PyObject *));
-extern DL_IMPORT(int) PyCFunction_GetFlags Py_PROTO((PyObject *));
+extern DL_IMPORT(PyCFunction) PyCFunction_GetFunction(PyObject *);
+extern DL_IMPORT(PyObject *) PyCFunction_GetSelf(PyObject *);
+extern DL_IMPORT(int) PyCFunction_GetFlags(PyObject *);
/* Macros for direct access to these values. Type checks are *not*
done, so use with care. */
@@ -38,35 +38,33 @@ extern DL_IMPORT(int) PyCFunction_GetFlags Py_PROTO((PyObject *));
(((PyCFunctionObject *)func) -> m_ml -> ml_flags)
struct PyMethodDef {
- char *ml_name;
- PyCFunction ml_meth;
- int ml_flags;
- char *ml_doc;
+ char *ml_name;
+ PyCFunction ml_meth;
+ int ml_flags;
+ char *ml_doc;
};
typedef struct PyMethodDef PyMethodDef;
-extern DL_IMPORT(PyObject *) Py_FindMethod
- Py_PROTO((PyMethodDef[], PyObject *, char *));
+extern DL_IMPORT(PyObject *) Py_FindMethod(PyMethodDef[], PyObject *, char *);
-extern DL_IMPORT(PyObject *) PyCFunction_New
- Py_PROTO((PyMethodDef *, PyObject *));
+extern DL_IMPORT(PyObject *) PyCFunction_New(PyMethodDef *, PyObject *);
/* Flag passed to newmethodobject */
#define METH_VARARGS 0x0001
#define METH_KEYWORDS 0x0002
typedef struct PyMethodChain {
- PyMethodDef *methods; /* Methods of this type */
- struct PyMethodChain *link; /* NULL or base type */
+ PyMethodDef *methods; /* Methods of this type */
+ struct PyMethodChain *link; /* NULL or base type */
} PyMethodChain;
-extern DL_IMPORT(PyObject *) Py_FindMethodInChain
- Py_PROTO((PyMethodChain *, PyObject *, char *));
+extern DL_IMPORT(PyObject *) Py_FindMethodInChain(PyMethodChain *, PyObject *,
+ char *);
typedef struct {
- PyObject_HEAD
- PyMethodDef *m_ml;
- PyObject *m_self;
+ PyObject_HEAD
+ PyMethodDef *m_ml;
+ PyObject *m_self;
} PyCFunctionObject;
#ifdef __cplusplus