Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4)

Unified Diff: Include/descrobject.h

Issue 29259: Add tp_fastcall to PyTypeObject: support FASTCALL calling convention for all callable objects
Patch Set: Created 2 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
--- a/Include/descrobject.h Wed Jan 25 23:33:27 2017 +0100
+++ b/Include/descrobject.h Thu Jan 26 02:43:18 2017 +0100
@@ -23,11 +23,16 @@ typedef PyObject *(*wrapperfunc)(PyObjec
typedef PyObject *(*wrapperfunc_kwds)(PyObject *self, PyObject *args,
void *wrapped, PyObject *kwds);
+typedef PyObject *(*wrapperfunc_fast)(PyObject *self, void *wrapped,
+ PyObject **args, Py_ssize_t nargs,
+ PyObject *kwnames);
+
struct wrapperbase {
const char *name;
int offset;
void *function;
wrapperfunc wrapper;
+ wrapperfunc_fast fastwrapper;
const char *doc;
int flags;
PyObject *name_strobj;
@@ -69,6 +74,7 @@ typedef struct {
PyDescr_COMMON;
struct wrapperbase *d_base;
void *d_wrapped; /* This can be any function pointer */
+ int d_use_fastwrapper;
} PyWrapperDescrObject;
#endif /* Py_LIMITED_API */
@@ -93,6 +99,11 @@ PyAPI_FUNC(PyObject *) PyDescr_NewGetSet
PyAPI_FUNC(PyObject *) PyDescr_NewWrapper(PyTypeObject *,
struct wrapperbase *, void *);
#define PyDescr_IsData(d) (Py_TYPE(d)->tp_descr_set != NULL)
+
+PyAPI_FUNC(PyObject *) _PyDescr_NewWrapperEx(PyTypeObject *type,
+ struct wrapperbase *base,
+ void *wrapped,
+ int use_fastwrapper);
#endif
PyAPI_FUNC(PyObject *) PyDictProxy_New(PyObject *);
« no previous file with comments | « Include/abstract.h ('k') | Include/methodobject.h » ('j') | Objects/abstract.c » ('J')

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+