Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions Objects/classobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,9 @@ method_getattro(PyObject *obj, PyObject *name)
}

/*[clinic input]
@vectorcall
@classmethod
method.__new__ as method_new
method.__new__ as method_type_new
function: object
instance: object
/
Expand All @@ -192,8 +193,9 @@ Create a bound instance method object.
[clinic start generated code]*/

static PyObject *
method_new_impl(PyTypeObject *type, PyObject *function, PyObject *instance)
/*[clinic end generated code: output=d33ef4ebf702e1f7 input=4e32facc3c3108ae]*/
method_type_new_impl(PyTypeObject *type, PyObject *function,
PyObject *instance)
/*[clinic end generated code: output=e9877864a8bfdf70 input=70c1e0da5d6267f5]*/
{
if (!PyCallable_Check(function)) {
PyErr_SetString(PyExc_TypeError,
Expand Down Expand Up @@ -323,15 +325,16 @@ PyTypeObject PyMethod_Type = {
.tp_setattro = PyObject_GenericSetAttr,
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
Py_TPFLAGS_HAVE_VECTORCALL,
.tp_doc = method_new__doc__,
.tp_doc = method_type_new__doc__,
.tp_traverse = method_traverse,
.tp_richcompare = method_richcompare,
.tp_weaklistoffset = offsetof(PyMethodObject, im_weakreflist),
.tp_methods = method_methods,
.tp_members = method_memberlist,
.tp_getset = method_getset,
.tp_descr_get = method_descr_get,
.tp_new = method_new,
.tp_new = method_type_new,
.tp_vectorcall = method_type_vectorcall,
};

/* ------------------------------------------------------------------------
Expand Down
38 changes: 33 additions & 5 deletions Objects/clinic/classobject.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading