Remove redundant p->depth-- in marshal extension module
This commit is contained in:
parent
3e0dd3730b
commit
ae539264c5
|
@ -183,7 +183,6 @@ w_long(long x, WFILE *p)
|
||||||
#if SIZEOF_SIZE_T > 4
|
#if SIZEOF_SIZE_T > 4
|
||||||
# define W_SIZE(n, p) do { \
|
# define W_SIZE(n, p) do { \
|
||||||
if ((n) > SIZE32_MAX) { \
|
if ((n) > SIZE32_MAX) { \
|
||||||
(p)->depth--; \
|
|
||||||
(p)->error = WFERR_UNMARSHALLABLE; \
|
(p)->error = WFERR_UNMARSHALLABLE; \
|
||||||
return; \
|
return; \
|
||||||
} \
|
} \
|
||||||
|
@ -245,7 +244,6 @@ w_PyLong(const PyLongObject *ob, char flag, WFILE *p)
|
||||||
l++;
|
l++;
|
||||||
} while (d != 0);
|
} while (d != 0);
|
||||||
if (l > SIZE32_MAX) {
|
if (l > SIZE32_MAX) {
|
||||||
p->depth--;
|
|
||||||
p->error = WFERR_UNMARSHALLABLE;
|
p->error = WFERR_UNMARSHALLABLE;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -445,7 +443,6 @@ w_complex_object(PyObject *v, char flag, WFILE *p)
|
||||||
PyObject *utf8;
|
PyObject *utf8;
|
||||||
utf8 = PyUnicode_AsEncodedString(v, "utf8", "surrogatepass");
|
utf8 = PyUnicode_AsEncodedString(v, "utf8", "surrogatepass");
|
||||||
if (utf8 == NULL) {
|
if (utf8 == NULL) {
|
||||||
p->depth--;
|
|
||||||
p->error = WFERR_UNMARSHALLABLE;
|
p->error = WFERR_UNMARSHALLABLE;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -531,7 +528,6 @@ w_complex_object(PyObject *v, char flag, WFILE *p)
|
||||||
Py_buffer view;
|
Py_buffer view;
|
||||||
if (PyObject_GetBuffer(v, &view, PyBUF_SIMPLE) != 0) {
|
if (PyObject_GetBuffer(v, &view, PyBUF_SIMPLE) != 0) {
|
||||||
w_byte(TYPE_UNKNOWN, p);
|
w_byte(TYPE_UNKNOWN, p);
|
||||||
p->depth--;
|
|
||||||
p->error = WFERR_UNMARSHALLABLE;
|
p->error = WFERR_UNMARSHALLABLE;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue