diff options
Diffstat (limited to 'Objects')
| -rw-r--r-- | Objects/bytesobject.c | 8 | ||||
| -rw-r--r-- | Objects/floatobject.c | 2 | ||||
| -rw-r--r-- | Objects/longobject.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index 08275ad5ad..8e098494de 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -3146,7 +3146,7 @@ static PyNumberMethods bytes_as_number = { }; static PyObject * -str_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds); +bytes_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds); static PyObject * bytes_new(PyTypeObject *type, PyObject *args, PyObject *kwds) @@ -3161,7 +3161,7 @@ bytes_new(PyTypeObject *type, PyObject *args, PyObject *kwds) _Py_IDENTIFIER(__bytes__); if (type != &PyBytes_Type) - return str_subtype_new(type, args, kwds); + return bytes_subtype_new(type, args, kwds); if (!PyArg_ParseTupleAndKeywords(args, kwds, "|Oss:bytes", kwlist, &x, &encoding, &errors)) return NULL; @@ -3388,7 +3388,7 @@ PyBytes_FromObject(PyObject *x) } static PyObject * -str_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +bytes_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { PyObject *tmp, *pnew; Py_ssize_t n; @@ -3397,7 +3397,7 @@ str_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds) tmp = bytes_new(&PyBytes_Type, args, kwds); if (tmp == NULL) return NULL; - assert(PyBytes_CheckExact(tmp)); + assert(PyBytes_Check(tmp)); n = PyBytes_GET_SIZE(tmp); pnew = type->tp_alloc(type, n); if (pnew != NULL) { diff --git a/Objects/floatobject.c b/Objects/floatobject.c index b8d6f2b52e..d92bec35b5 100644 --- a/Objects/floatobject.c +++ b/Objects/floatobject.c @@ -1568,7 +1568,7 @@ float_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds) tmp = float_new(&PyFloat_Type, args, kwds); if (tmp == NULL) return NULL; - assert(PyFloat_CheckExact(tmp)); + assert(PyFloat_Check(tmp)); newobj = type->tp_alloc(type, 0); if (newobj == NULL) { Py_DECREF(tmp); diff --git a/Objects/longobject.c b/Objects/longobject.c index 5f224557d1..d821e4bfb6 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -4611,7 +4611,7 @@ long_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds) tmp = (PyLongObject *)long_new(&PyLong_Type, args, kwds); if (tmp == NULL) return NULL; - assert(PyLong_CheckExact(tmp)); + assert(PyLong_Check(tmp)); n = Py_SIZE(tmp); if (n < 0) n = -n; |
