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

Delta Between Two Patch Sets: Objects/descrobject.c

Issue 29259: Add tp_fastcall to PyTypeObject: support FASTCALL calling convention for all callable objects
Left Patch Set: Created 2 years, 12 months ago
Right Patch Set: Created 2 years, 12 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
LEFTRIGHT
(Both sides are equal)
1 /* Descriptors -- a new, flexible way to describe attributes */ 1 /* Descriptors -- a new, flexible way to describe attributes */
2 2
3 #include "Python.h" 3 #include "Python.h"
4 #include "structmember.h" /* Why is this not included in Python.h? */ 4 #include "structmember.h" /* Why is this not included in Python.h? */
5 5
6 static void 6 static void
7 descr_dealloc(PyDescrObject *descr) 7 descr_dealloc(PyDescrObject *descr)
8 { 8 {
9 _PyObject_GC_UNTRACK(descr); 9 _PyObject_GC_UNTRACK(descr);
10 Py_XDECREF(descr->d_type); 10 Py_XDECREF(descr->d_type);
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 PyGetSetDescrObject *descr; 717 PyGetSetDescrObject *descr;
718 718
719 descr = (PyGetSetDescrObject *)descr_new(&PyGetSetDescr_Type, 719 descr = (PyGetSetDescrObject *)descr_new(&PyGetSetDescr_Type,
720 type, getset->name); 720 type, getset->name);
721 if (descr != NULL) 721 if (descr != NULL)
722 descr->d_getset = getset; 722 descr->d_getset = getset;
723 return (PyObject *)descr; 723 return (PyObject *)descr;
724 } 724 }
725 725
726 PyObject * 726 PyObject *
727 _PyDescr_NewWrapperEx(PyTypeObject *type, struct wrapperbase *base, void *wrappe d, int use_fastwrapper) 727 _PyDescr_NewWrapperEx(PyTypeObject *type, struct wrapperbase *base, void *wrappe d, int use_fastwrapper)
haypo 2017/01/26 03:35:21 Maybe a new funtion is not worth it, the d_user_fa
728 { 728 {
729 PyWrapperDescrObject *descr; 729 PyWrapperDescrObject *descr;
730 730
731 descr = (PyWrapperDescrObject *)descr_new(&PyWrapperDescr_Type, 731 descr = (PyWrapperDescrObject *)descr_new(&PyWrapperDescr_Type,
732 type, base->name); 732 type, base->name);
733 if (descr == NULL) { 733 if (descr == NULL) {
734 return NULL; 734 return NULL;
735 } 735 }
736 736
737 descr->d_base = base; 737 descr->d_base = base;
(...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after
1641 0, /* tp_base */ 1641 0, /* tp_base */
1642 0, /* tp_dict */ 1642 0, /* tp_dict */
1643 property_descr_get, /* tp_descr_get */ 1643 property_descr_get, /* tp_descr_get */
1644 property_descr_set, /* tp_descr_set */ 1644 property_descr_set, /* tp_descr_set */
1645 0, /* tp_dictoffset */ 1645 0, /* tp_dictoffset */
1646 property_init, /* tp_init */ 1646 property_init, /* tp_init */
1647 PyType_GenericAlloc, /* tp_alloc */ 1647 PyType_GenericAlloc, /* tp_alloc */
1648 PyType_GenericNew, /* tp_new */ 1648 PyType_GenericNew, /* tp_new */
1649 PyObject_GC_Del, /* tp_free */ 1649 PyObject_GC_Del, /* tp_free */
1650 }; 1650 };
LEFTRIGHT

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