Skip to content

gh-82166: Remove redundant p->depth-- in marshal extension module #19482

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions Python/marshal.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ w_long(long x, WFILE *p)
#if SIZEOF_SIZE_T > 4
# define W_SIZE(n, p) do { \
if ((n) > SIZE32_MAX) { \
(p)->depth--; \
(p)->error = WFERR_UNMARSHALLABLE; \
return; \
} \
Expand Down Expand Up @@ -247,7 +246,6 @@ w_PyLong(const PyLongObject *ob, char flag, WFILE *p)
l++;
} while (d != 0);
if (l > SIZE32_MAX) {
p->depth--;
p->error = WFERR_UNMARSHALLABLE;
return;
}
Expand Down Expand Up @@ -452,7 +450,6 @@ w_complex_object(PyObject *v, char flag, WFILE *p)
PyObject *utf8;
utf8 = PyUnicode_AsEncodedString(v, "utf8", "surrogatepass");
if (utf8 == NULL) {
p->depth--;
p->error = WFERR_UNMARSHALLABLE;
return;
}
Expand Down Expand Up @@ -579,7 +576,6 @@ w_complex_object(PyObject *v, char flag, WFILE *p)
Py_buffer view;
if (PyObject_GetBuffer(v, &view, PyBUF_SIMPLE) != 0) {
w_byte(TYPE_UNKNOWN, p);
p->depth--;
p->error = WFERR_UNMARSHALLABLE;
return;
}
Expand Down