From abeacf914be1d289e08cc06be4516e2a7d756032 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Tue, 22 Nov 2016 07:58:08 +0200 Subject: Issue #28761: The fields name and doc of structures PyMemberDef, PyGetSetDef, PyStructSequence_Field, PyStructSequence_Desc, and wrapperbase are now of type "const char *" rather of "char *". --- Include/descrobject.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Include/descrobject.h') diff --git a/Include/descrobject.h b/Include/descrobject.h index 8f3e84c365..013d64521f 100644 --- a/Include/descrobject.h +++ b/Include/descrobject.h @@ -9,10 +9,10 @@ typedef PyObject *(*getter)(PyObject *, void *); typedef int (*setter)(PyObject *, PyObject *, void *); typedef struct PyGetSetDef { - char *name; + const char *name; getter get; setter set; - char *doc; + const char *doc; void *closure; } PyGetSetDef; @@ -24,11 +24,11 @@ typedef PyObject *(*wrapperfunc_kwds)(PyObject *self, PyObject *args, void *wrapped, PyObject *kwds); struct wrapperbase { - char *name; + const char *name; int offset; void *function; wrapperfunc wrapper; - char *doc; + const char *doc; int flags; PyObject *name_strobj; }; -- cgit v1.2.1 From 99c092a531abf57a8f5c37356dc6971cdfed497a Mon Sep 17 00:00:00 2001 From: INADA Naoki Date: Fri, 3 Feb 2017 07:43:03 +0900 Subject: Issue #29263: LOAD_METHOD support for C methods Calling builtin method is at most 10% faster. --- Include/descrobject.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Include/descrobject.h') diff --git a/Include/descrobject.h b/Include/descrobject.h index 013d64521f..cb43174838 100644 --- a/Include/descrobject.h +++ b/Include/descrobject.h @@ -90,6 +90,9 @@ PyAPI_FUNC(PyObject *) PyDescr_NewMember(PyTypeObject *, PyAPI_FUNC(PyObject *) PyDescr_NewGetSet(PyTypeObject *, struct PyGetSetDef *); #ifndef Py_LIMITED_API + +PyAPI_FUNC(PyObject *) _PyMethodDescr_FastCallKeywords( + PyObject *descrobj, PyObject **stack, Py_ssize_t nargs, PyObject *kwnames); PyAPI_FUNC(PyObject *) PyDescr_NewWrapper(PyTypeObject *, struct wrapperbase *, void *); #define PyDescr_IsData(d) (Py_TYPE(d)->tp_descr_set != NULL) -- cgit v1.2.1