summaryrefslogtreecommitdiffstats
path: root/Objects/clinic
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-07-01 14:22:31 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-07-01 14:22:31 (GMT)
commit0855e706aa7fed842e18b0ce14e18d6574318643 (patch)
tree2fa36bacf92f87ea7361122e8a49d8690c7d5e1b /Objects/clinic
parentcf8b42e9043766338c0b16d0dca3ed5ca70a812d (diff)
downloadcpython-0855e706aa7fed842e18b0ce14e18d6574318643.zip
cpython-0855e706aa7fed842e18b0ce14e18d6574318643.tar.gz
cpython-0855e706aa7fed842e18b0ce14e18d6574318643.tar.bz2
Issue #27007: The fromhex() class methods of bytes and bytearray subclasses
now return an instance of corresponding subclass.
Diffstat (limited to 'Objects/clinic')
-rw-r--r--Objects/clinic/bytearrayobject.c.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Objects/clinic/bytearrayobject.c.h b/Objects/clinic/bytearrayobject.c.h
index f1ccaf1..e1cf03b 100644
--- a/Objects/clinic/bytearrayobject.c.h
+++ b/Objects/clinic/bytearrayobject.c.h
@@ -636,10 +636,10 @@ PyDoc_STRVAR(bytearray_fromhex__doc__,
{"fromhex", (PyCFunction)bytearray_fromhex, METH_O|METH_CLASS, bytearray_fromhex__doc__},
static PyObject *
-bytearray_fromhex_impl(PyObject*cls, PyObject *string);
+bytearray_fromhex_impl(PyTypeObject *type, PyObject *string);
static PyObject *
-bytearray_fromhex(PyTypeObject *cls, PyObject *arg)
+bytearray_fromhex(PyTypeObject *type, PyObject *arg)
{
PyObject *return_value = NULL;
PyObject *string;
@@ -647,7 +647,7 @@ bytearray_fromhex(PyTypeObject *cls, PyObject *arg)
if (!PyArg_Parse(arg, "U:fromhex", &string)) {
goto exit;
}
- return_value = bytearray_fromhex_impl((PyObject*)cls, string);
+ return_value = bytearray_fromhex_impl(type, string);
exit:
return return_value;
@@ -716,4 +716,4 @@ bytearray_sizeof(PyByteArrayObject *self, PyObject *Py_UNUSED(ignored))
{
return bytearray_sizeof_impl(self);
}
-/*[clinic end generated code: output=044a6c26a836bcfe input=a9049054013a1b77]*/
+/*[clinic end generated code: output=a32f183ebef159cc input=a9049054013a1b77]*/