mirror of
https://github.com/python/cpython.git
synced 2025-11-14 07:49:28 +00:00
Merge branches/pep-0384.
This commit is contained in:
parent
c4df784514
commit
4d0d471a80
102 changed files with 2835 additions and 75 deletions
|
|
@ -26,12 +26,14 @@ PyAPI_FUNC(int) PyCFunction_GetFlags(PyObject *);
|
|||
|
||||
/* Macros for direct access to these values. Type checks are *not*
|
||||
done, so use with care. */
|
||||
#ifndef Py_LIMITED_API
|
||||
#define PyCFunction_GET_FUNCTION(func) \
|
||||
(((PyCFunctionObject *)func) -> m_ml -> ml_meth)
|
||||
#define PyCFunction_GET_SELF(func) \
|
||||
(((PyCFunctionObject *)func) -> m_self)
|
||||
#define PyCFunction_GET_FLAGS(func) \
|
||||
(((PyCFunctionObject *)func) -> m_ml -> ml_flags)
|
||||
#endif
|
||||
PyAPI_FUNC(PyObject *) PyCFunction_Call(PyObject *, PyObject *, PyObject *);
|
||||
|
||||
struct PyMethodDef {
|
||||
|
|
@ -68,12 +70,14 @@ PyAPI_FUNC(PyObject *) PyCFunction_NewEx(PyMethodDef *, PyObject *,
|
|||
|
||||
#define METH_COEXIST 0x0040
|
||||
|
||||
#ifndef Py_LIMITED_API
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
PyMethodDef *m_ml; /* Description of the C function to call */
|
||||
PyObject *m_self; /* Passed as 'self' arg to the C func, can be NULL */
|
||||
PyObject *m_module; /* The __module__ attribute, can be anything */
|
||||
} PyCFunctionObject;
|
||||
#endif
|
||||
|
||||
PyAPI_FUNC(int) PyCFunction_ClearFreeList(void);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue