Skip to content

Commit 072bc04

Browse files
committed
Fix some sloppy errors, using correct '->' operator, and mis-reading vstinner's suggestion.
1 parent ecd5941 commit 072bc04

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Objects/bytearrayobject.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -916,15 +916,15 @@ bytearray_ass_subscript(PyObject *op, PyObject *index, PyObject *values)
916916
static PyObject *
917917
bytearray_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
918918
{
919-
PyObject *obj = PyType_GenericNew(type, args, kwds);
920-
if (obj == NULL) {
919+
PyObject *op = PyType_GenericNew(type, args, kwds);
920+
if (op == NULL) {
921921
return NULL;
922922
}
923-
PyByteArrayObject *self = _PyByteArray_CAST(obj);
923+
PyByteArrayObject *self = _PyByteArray_CAST(op);
924924
self->ob_bytes_object = Py_GetConstant(Py_CONSTANT_EMPTY_BYTES);
925925
bytearray_reinit_from_bytes(self, 0, 0);
926926
self->ob_exports = 0;
927-
return obj;
927+
return op;
928928
}
929929

930930
/*[clinic input]
@@ -1628,7 +1628,7 @@ bytearray_take_bytes_impl(PyByteArrayObject *self, PyObject *n)
16281628
}
16291629

16301630
if (_PyBytes_Resize(&self->ob_bytes_object, to_take) == -1) {
1631-
assert(self.ob_bytes_object == NULL);
1631+
assert(self->ob_bytes_object == NULL);
16321632
self->ob_bytes_object = Py_GetConstant(Py_CONSTANT_EMPTY_BYTES);
16331633
bytearray_reinit_from_bytes(self, 0, 0);
16341634
Py_DECREF(remaining);

0 commit comments

Comments
 (0)