Commit 0069bab1 authored by Eli Bendersky's avatar Eli Bendersky

Reformat by replacing tabs with 4-spaces. Makes the code more PEP-7 compliant

and gets rid of some gross formatting on tab=4-space-configured editors.
parent 4f61a2db
...@@ -17,7 +17,7 @@ PyAPI_DATA(PyTypeObject) PyCFunction_Type; ...@@ -17,7 +17,7 @@ PyAPI_DATA(PyTypeObject) PyCFunction_Type;
typedef PyObject *(*PyCFunction)(PyObject *, PyObject *); typedef PyObject *(*PyCFunction)(PyObject *, PyObject *);
typedef PyObject *(*PyCFunctionWithKeywords)(PyObject *, PyObject *, typedef PyObject *(*PyCFunctionWithKeywords)(PyObject *, PyObject *,
PyObject *); PyObject *);
typedef PyObject *(*PyNoArgsFunction)(PyObject *); typedef PyObject *(*PyNoArgsFunction)(PyObject *);
PyAPI_FUNC(PyCFunction) PyCFunction_GetFunction(PyObject *); PyAPI_FUNC(PyCFunction) PyCFunction_GetFunction(PyObject *);
...@@ -33,22 +33,22 @@ PyAPI_FUNC(int) PyCFunction_GetFlags(PyObject *); ...@@ -33,22 +33,22 @@ PyAPI_FUNC(int) PyCFunction_GetFlags(PyObject *);
(((PyCFunctionObject *)func) -> m_ml -> ml_flags & METH_STATIC ? \ (((PyCFunctionObject *)func) -> m_ml -> ml_flags & METH_STATIC ? \
NULL : ((PyCFunctionObject *)func) -> m_self) NULL : ((PyCFunctionObject *)func) -> m_self)
#define PyCFunction_GET_FLAGS(func) \ #define PyCFunction_GET_FLAGS(func) \
(((PyCFunctionObject *)func) -> m_ml -> ml_flags) (((PyCFunctionObject *)func) -> m_ml -> ml_flags)
#endif #endif
PyAPI_FUNC(PyObject *) PyCFunction_Call(PyObject *, PyObject *, PyObject *); PyAPI_FUNC(PyObject *) PyCFunction_Call(PyObject *, PyObject *, PyObject *);
struct PyMethodDef { struct PyMethodDef {
const char *ml_name; /* The name of the built-in function/method */ const char *ml_name; /* The name of the built-in function/method */
PyCFunction ml_meth; /* The C function that implements it */ PyCFunction ml_meth; /* The C function that implements it */
int ml_flags; /* Combination of METH_xxx flags, which mostly int ml_flags; /* Combination of METH_xxx flags, which mostly
describe the args expected by the C func */ describe the args expected by the C func */
const char *ml_doc; /* The __doc__ attribute, or NULL */ const char *ml_doc; /* The __doc__ attribute, or NULL */
}; };
typedef struct PyMethodDef PyMethodDef; typedef struct PyMethodDef PyMethodDef;
#define PyCFunction_New(ML, SELF) PyCFunction_NewEx((ML), (SELF), NULL) #define PyCFunction_New(ML, SELF) PyCFunction_NewEx((ML), (SELF), NULL)
PyAPI_FUNC(PyObject *) PyCFunction_NewEx(PyMethodDef *, PyObject *, PyAPI_FUNC(PyObject *) PyCFunction_NewEx(PyMethodDef *, PyObject *,
PyObject *); PyObject *);
/* Flag passed to newmethodobject */ /* Flag passed to newmethodobject */
/* #define METH_OLDARGS 0x0000 -- unsupported now */ /* #define METH_OLDARGS 0x0000 -- unsupported now */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment