Skip to content

Commit ecbd186

Browse files
committed
address review comment: Move Py_buffer view into block
1 parent 9c511b1 commit ecbd186

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Objects/longobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6439,7 +6439,6 @@ int_from_bytes_impl(PyTypeObject *type, PyObject *bytes_obj,
64396439
{
64406440
int little_endian;
64416441
PyObject *long_obj, *bytes;
6442-
Py_buffer view;
64436442

64446443
if (byteorder == NULL)
64456444
little_endian = 0;
@@ -6461,6 +6460,7 @@ int_from_bytes_impl(PyTypeObject *type, PyObject *bytes_obj,
64616460
}
64626461
/* Use buffer protocol to avoid copies. */
64636462
else if (PyObject_CheckBuffer(bytes_obj)) {
6463+
Py_buffer view;
64646464
if (PyObject_GetBuffer(bytes_obj, &view, PyBUF_SIMPLE) != 0) {
64656465
return NULL;
64666466
}

0 commit comments

Comments
 (0)