diff options
author | Steve Dower <steve.dower@microsoft.com> | 2017-02-04 15:39:38 -0800 |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2017-02-04 15:39:38 -0800 |
commit | 1a5780aabb550cae175ad8711e2f33ba644d0ddb (patch) | |
tree | 68e47eaafb4ccc17bbdb7668c6058984945b332d /Include/methodobject.h | |
parent | 956c7cfa7111ab5458e2f69868a05b7b84fc6843 (diff) | |
parent | d1d8706cdb77e2adbbb4110338dcda0e1811f892 (diff) | |
download | cpython-1a5780aabb550cae175ad8711e2f33ba644d0ddb.tar.gz |
Issue #29319: Prevent RunMainFromImporter overwriting sys.path[0].
Diffstat (limited to 'Include/methodobject.h')
-rw-r--r-- | Include/methodobject.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Include/methodobject.h b/Include/methodobject.h index e2ad80440b..79fad8235c 100644 --- a/Include/methodobject.h +++ b/Include/methodobject.h @@ -16,6 +16,8 @@ PyAPI_DATA(PyTypeObject) PyCFunction_Type; #define PyCFunction_Check(op) (Py_TYPE(op) == &PyCFunction_Type) typedef PyObject *(*PyCFunction)(PyObject *, PyObject *); +typedef PyObject *(*_PyCFunctionFast) (PyObject *self, PyObject **args, + Py_ssize_t nargs, PyObject *kwnames); typedef PyObject *(*PyCFunctionWithKeywords)(PyObject *, PyObject *, PyObject *); typedef PyObject *(*PyNoArgsFunction)(PyObject *); @@ -37,6 +39,18 @@ PyAPI_FUNC(int) PyCFunction_GetFlags(PyObject *); #endif PyAPI_FUNC(PyObject *) PyCFunction_Call(PyObject *, PyObject *, PyObject *); +#ifndef Py_LIMITED_API +PyAPI_FUNC(PyObject *) _PyCFunction_FastCallDict(PyObject *func, + PyObject **args, + Py_ssize_t nargs, + PyObject *kwargs); + +PyAPI_FUNC(PyObject *) _PyCFunction_FastCallKeywords(PyObject *func, + PyObject **stack, + Py_ssize_t nargs, + PyObject *kwnames); +#endif + struct PyMethodDef { const char *ml_name; /* The name of the built-in function/method */ PyCFunction ml_meth; /* The C function that implements it */ @@ -72,6 +86,8 @@ PyAPI_FUNC(PyObject *) PyCFunction_NewEx(PyMethodDef *, PyObject *, #define METH_COEXIST 0x0040 #ifndef Py_LIMITED_API +#define METH_FASTCALL 0x0080 + typedef struct { PyObject_HEAD PyMethodDef *m_ml; /* Description of the C function to call */ |