mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
bpo-43239: Export PyCFunction_New with PyAPI_FUNC (GH-24551)
This commit is contained in:
parent
2d6f2eed14
commit
7bb1cafa4e
2 changed files with 8 additions and 0 deletions
|
|
@ -41,7 +41,13 @@ struct PyMethodDef {
|
|||
};
|
||||
typedef struct PyMethodDef PyMethodDef;
|
||||
|
||||
/* PyCFunction_New is declared as a function for stable ABI (declaration is
|
||||
* needed for e.g. GCC with -fvisibility=hidden), but redefined as a macro
|
||||
* that calls PyCFunction_NewEx. */
|
||||
PyAPI_FUNC(PyObject *) PyCFunction_New(PyMethodDef *, PyObject *);
|
||||
#define PyCFunction_New(ML, SELF) PyCFunction_NewEx((ML), (SELF), NULL)
|
||||
|
||||
/* PyCFunction_NewEx is similar: on 3.9+, this calls PyCMethod_New. */
|
||||
PyAPI_FUNC(PyObject *) PyCFunction_NewEx(PyMethodDef *, PyObject *,
|
||||
PyObject *);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue