mirror of
https://github.com/python/cpython.git
synced 2025-11-11 14:44:57 +00:00
Make variable declarations for opcodes in batch_dict_exact consistent
with the rest of the module.
This commit is contained in:
parent
94f75e04a8
commit
f70b129d7c
1 changed files with 5 additions and 5 deletions
|
|
@ -1715,9 +1715,9 @@ batch_dict_exact(PicklerObject *self, PyObject *obj)
|
||||||
int i;
|
int i;
|
||||||
Py_ssize_t dict_size, ppos = 0;
|
Py_ssize_t dict_size, ppos = 0;
|
||||||
|
|
||||||
static const char mark_op = MARK;
|
const char mark_op = MARK;
|
||||||
static const char setitem = SETITEM;
|
const char setitem_op = SETITEM;
|
||||||
static const char setitems = SETITEMS;
|
const char setitems_op = SETITEMS;
|
||||||
|
|
||||||
assert(obj != NULL);
|
assert(obj != NULL);
|
||||||
assert(self->proto > 0);
|
assert(self->proto > 0);
|
||||||
|
|
@ -1731,7 +1731,7 @@ batch_dict_exact(PicklerObject *self, PyObject *obj)
|
||||||
return -1;
|
return -1;
|
||||||
if (save(self, value, 0) < 0)
|
if (save(self, value, 0) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
if (pickler_write(self, &setitem, 1) < 0)
|
if (pickler_write(self, &setitem_op, 1) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -1749,7 +1749,7 @@ batch_dict_exact(PicklerObject *self, PyObject *obj)
|
||||||
if (++i == BATCHSIZE)
|
if (++i == BATCHSIZE)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (pickler_write(self, &setitems, 1) < 0)
|
if (pickler_write(self, &setitems_op, 1) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
if (PyDict_Size(obj) != dict_size) {
|
if (PyDict_Size(obj) != dict_size) {
|
||||||
PyErr_Format(
|
PyErr_Format(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue