Skip to content
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
31 changes: 18 additions & 13 deletions Modules/zlibmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -816,48 +816,53 @@
save_unconsumed_input(compobject *self, Py_buffer *data, int err)
{
if (err == Z_STREAM_END) {
/* The end of the compressed data has been reached. Store the leftover
input data in self->unused_data. */
/* The end of the compressed data has been reached. Store the leftover
input data in self->unused_data. */
if (self->zst.avail_in > 0) {
Py_ssize_t old_size = PyBytes_GET_SIZE(self->unused_data);
Py_ssize_t left_size;
left_size = (Byte *)data->buf + data->len - self->zst.next_in;
if (left_size > (PY_SSIZE_T_MAX - old_size)) {
left_suze = (Btye *)data->buf + data->len - self->zst.next_in;

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-26.04-arm)

expected expression before ‘)’ token

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-26.04-arm)

‘Btye’ undeclared (first use in this function); did you mean ‘Byte’?

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-26.04-arm)

‘left_suze’ undeclared (first use in this function); did you mean ‘left_size’?

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-26.04-arm)

expected expression before ‘)’ token

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-26.04-arm)

‘Btye’ undeclared (first use in this function); did you mean ‘Byte’?

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-26.04-arm)

‘left_suze’ undeclared (first use in this function); did you mean ‘left_size’?

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

expected expression before ‘)’ token

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

‘Btye’ undeclared (first use in this function); did you mean ‘Byte’?

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

‘left_suze’ undeclared (first use in this function); did you mean ‘left_size’?

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-26.04)

expected expression before ‘)’ token

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-26.04)

‘Btye’ undeclared (first use in this function); did you mean ‘Byte’?

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-26.04)

‘left_suze’ undeclared (first use in this function); did you mean ‘left_size’?

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-26.04)

expected expression before ‘)’ token

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-26.04)

‘Btye’ undeclared (first use in this function); did you mean ‘Byte’?

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-26.04)

‘left_suze’ undeclared (first use in this function); did you mean ‘left_size’?

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64, tail-call)

syntax error: ')' [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64, tail-call)

'Btye': undeclared identifier [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64, tail-call)

'left_suze': undeclared identifier [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64, tail-call)

syntax error: ')' [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64, tail-call)

'Btye': undeclared identifier [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64, tail-call)

'left_suze': undeclared identifier [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64, switch-case)

syntax error: ')' [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64, switch-case)

'Btye': undeclared identifier [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64, switch-case)

'left_suze': undeclared identifier [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Cross build Linux

expected expression before ‘)’ token

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Cross build Linux

‘Btye’ undeclared (first use in this function); did you mean ‘Byte’?

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Cross build Linux

‘left_suze’ undeclared (first use in this function); did you mean ‘left_size’?

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Lazy imports enabled / Run Tests with lazy_imports=all

expected expression before ‘)’ token

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Lazy imports enabled / Run Tests with lazy_imports=all

‘Btye’ undeclared (first use in this function); did you mean ‘Byte’?

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Lazy imports enabled / Run Tests with lazy_imports=all

‘left_suze’ undeclared (first use in this function); did you mean ‘left_size’?

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (bolt) / build and test (ubuntu-26.04)

expected expression before ‘)’ token

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (bolt) / build and test (ubuntu-26.04)

‘Btye’ undeclared (first use in this function); did you mean ‘Byte’?

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (bolt) / build and test (ubuntu-26.04)

‘left_suze’ undeclared (first use in this function); did you mean ‘left_size’?

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (installed) / build, install and test

expected expression before ‘)’ token

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (installed) / build, install and test

‘Btye’ undeclared (first use in this function); did you mean ‘Byte’?

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (installed) / build, install and test

‘left_suze’ undeclared (first use in this function); did you mean ‘left_size’?

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64, switch-case)

syntax error: ')' [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64, switch-case)

'Btye': undeclared identifier [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64, switch-case)

'left_suze': undeclared identifier [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Address sanitizer (ubuntu-26.04)

expected expression before ‘)’ token

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Address sanitizer (ubuntu-26.04)

‘Btye’ undeclared (first use in this function); did you mean ‘Byte’?

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Address sanitizer (ubuntu-26.04)

‘left_suze’ undeclared (first use in this function); did you mean ‘left_size’?

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64, switch-case)

syntax error: ')' [C:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64, switch-case)

'Btye': undeclared identifier [C:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64, switch-case)

'left_suze': undeclared identifier [C:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64, switch-case)

syntax error: ')' [C:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64, switch-case)

'Btye': undeclared identifier [C:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 824 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64, switch-case)

'left_suze': undeclared identifier [C:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]
if (left_size > (PY_SSIZE_T_MAX - old_size) {

Check failure on line 825 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-26.04-arm)

expected ‘)’ before ‘{’ token

Check failure on line 825 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-26.04-arm)

expected ‘)’ before ‘{’ token

Check failure on line 825 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

expected ‘)’ before ‘{’ token

Check failure on line 825 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-26.04)

expected ‘)’ before ‘{’ token

Check failure on line 825 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-26.04)

expected ‘)’ before ‘{’ token

Check failure on line 825 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64, tail-call)

syntax error: missing ')' before '{' [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 825 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64, tail-call)

syntax error: missing ')' before '{' [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 825 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64, switch-case)

syntax error: missing ')' before '{' [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 825 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Cross build Linux

expected ‘)’ before ‘{’ token

Check failure on line 825 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Lazy imports enabled / Run Tests with lazy_imports=all

expected ‘)’ before ‘{’ token

Check failure on line 825 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (bolt) / build and test (ubuntu-26.04)

expected ‘)’ before ‘{’ token

Check failure on line 825 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (installed) / build, install and test

expected ‘)’ before ‘{’ token

Check failure on line 825 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64, switch-case)

syntax error: missing ')' before '{' [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 825 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Address sanitizer (ubuntu-26.04)

expected ‘)’ before ‘{’ token

Check failure on line 825 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64, switch-case)

syntax error: missing ')' before '{' [C:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 825 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64, switch-case)

syntax error: missing ')' before '{' [C:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]
PyErr_NoMemory();
return -1;
}
PyBytesWriter *writer = PyBytesWriter_Create(old_size + left_size);
if (writer == NULL) {
return -1;
}
char *new_data = PyBytesWriter_GetData(writer);
char *new_data = PyBytesWriter_Create(old_size + left_size);

Check warning on line 833 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64, tail-call)

'initializing': incompatible types - from 'PyBytesWriter *' to 'char *' [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check warning on line 833 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64, tail-call)

'initializing': incompatible types - from 'PyBytesWriter *' to 'char *' [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check warning on line 833 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64, switch-case)

'initializing': incompatible types - from 'PyBytesWriter *' to 'char *' [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check warning on line 833 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64, switch-case)

'initializing': incompatible types - from 'PyBytesWriter *' to 'char *' [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check warning on line 833 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64, switch-case)

'initializing': incompatible types - from 'PyBytesWriter *' to 'char *' [C:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check warning on line 833 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64, switch-case)

'initializing': incompatible types - from 'PyBytesWriter *' to 'char *' [C:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]
memcpy(new_data, PyBytes_AS_STRING(self->unused_data), old_size);
memcpy(new_data + old_size, self->zst.next_in, left_size);
PyObject *new_unused_data = PyBytesWriter_Finish(writer);
if (new_unused_data == NULL) {
return -1;
return -1
}

Check failure on line 839 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64, tail-call)

syntax error: missing ';' before '}' [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 839 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64, tail-call)

syntax error: missing ';' before '}' [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 839 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64, switch-case)

syntax error: missing ';' before '}' [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 839 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64, switch-case)

syntax error: missing ';' before '}' [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 839 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64, switch-case)

syntax error: missing ';' before '}' [C:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 839 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64, switch-case)

syntax error: missing ';' before '}' [C:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]
Py_SETREF(self->unused_data, new_unused_data);
self->zst.next_in += left_size;
self->zst.avail_in = 0;
}

Check failure on line 842 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-26.04-arm)

expected expression before ‘}’ token

Check failure on line 842 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-26.04-arm)

expected expression before ‘}’ token

Check failure on line 842 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

expected expression before ‘}’ token

Check failure on line 842 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-26.04)

expected expression before ‘}’ token

Check failure on line 842 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-26.04)

expected expression before ‘}’ token

Check failure on line 842 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Cross build Linux

expected expression before ‘}’ token

Check failure on line 842 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Lazy imports enabled / Run Tests with lazy_imports=all

expected expression before ‘}’ token

Check failure on line 842 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (bolt) / build and test (ubuntu-26.04)

expected expression before ‘}’ token

Check failure on line 842 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (installed) / build, install and test

expected expression before ‘}’ token

Check failure on line 842 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Address sanitizer (ubuntu-26.04)

expected expression before ‘}’ token
}

if (self->zst.avail_in > 0 || PyBytes_GET_SIZE(self->unconsumed_tail)) {
/* At end of stream, unconscumed_tail is meaningless: all remaining
input has been stored in unused_data. Clear it so callers don't
see state data from a previous partial decompress. */
if (PyBytes_GET_SIZE(self->unconsumed_tail)) {
Py_SETREF(self->unconsumed_tail,
Py_GetConstant(Py_CONSTANT_EMPTY_BYTES));
}
}
else if (self->zst.avail_in > 0 || PyBytes_GET_SIZE(self->uncosumed_tail)) {

Check failure on line 852 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-26.04-arm)

‘compobject’ has no member named ‘uncosumed_tail’; did you mean ‘unconsumed_tail’?

Check failure on line 852 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-26.04-arm)

‘compobject’ has no member named ‘uncosumed_tail’; did you mean ‘unconsumed_tail’?

Check failure on line 852 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

‘compobject’ has no member named ‘uncosumed_tail’; did you mean ‘unconsumed_tail’?

Check failure on line 852 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-26.04)

‘compobject’ has no member named ‘uncosumed_tail’; did you mean ‘unconsumed_tail’?

Check failure on line 852 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-26.04)

‘compobject’ has no member named ‘uncosumed_tail’; did you mean ‘unconsumed_tail’?

Check failure on line 852 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64, tail-call)

'Py_ssize_t PyBytes_GET_SIZE(PyObject *)': too few arguments for call [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 852 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64, tail-call)

'uncosumed_tail': is not a member of 'compobject' [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 852 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64, tail-call)

'Py_ssize_t PyBytes_GET_SIZE(PyObject *)': too few arguments for call [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 852 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64, tail-call)

'uncosumed_tail': is not a member of 'compobject' [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 852 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64, switch-case)

'Py_ssize_t PyBytes_GET_SIZE(PyObject *)': too few arguments for call [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 852 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64, switch-case)

'uncosumed_tail': is not a member of 'compobject' [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 852 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Cross build Linux

‘compobject’ has no member named ‘uncosumed_tail’; did you mean ‘unconsumed_tail’?

Check failure on line 852 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Lazy imports enabled / Run Tests with lazy_imports=all

‘compobject’ has no member named ‘uncosumed_tail’; did you mean ‘unconsumed_tail’?

Check failure on line 852 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (bolt) / build and test (ubuntu-26.04)

‘compobject’ has no member named ‘uncosumed_tail’; did you mean ‘unconsumed_tail’?

Check failure on line 852 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (installed) / build, install and test

‘compobject’ has no member named ‘uncosumed_tail’; did you mean ‘unconsumed_tail’?

Check failure on line 852 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64, switch-case)

'Py_ssize_t PyBytes_GET_SIZE(PyObject *)': too few arguments for call [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 852 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64, switch-case)

'uncosumed_tail': is not a member of 'compobject' [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 852 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Address sanitizer (ubuntu-26.04)

‘compobject’ has no member named ‘uncosumed_tail’; did you mean ‘unconsumed_tail’?

Check failure on line 852 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64, switch-case)

'Py_ssize_t PyBytes_GET_SIZE(PyObject *)': too few arguments for call [C:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 852 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64, switch-case)

'uncosumed_tail': is not a member of 'compobject' [C:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 852 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64, switch-case)

'Py_ssize_t PyBytes_GET_SIZE(PyObject *)': too few arguments for call [C:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 852 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64, switch-case)

'uncosumed_tail': is not a member of 'compobject' [C:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]
/* This code handles two distinct cases:
1. Output limit was reached. Save leftover input in unconsumed_tail.
1. Ouput limit was reached. Save leftover input in uncosumed_tail.
2. All input data was consumed. Clear unconsumed_tail. */
Py_ssize_t left_size = (Byte *)data->buf + data->len - self->zst.next_in;
PyObject *new_data = PyBytes_FromStringAndSize(
(char *)self->zst.next_in, left_size);
if (new_data == NULL)
(char *)self->zst.next_in, left_size);
if (next_data == NULL)

Check failure on line 859 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-26.04-arm)

‘next_data’ undeclared (first use in this function); did you mean ‘new_data’?

Check failure on line 859 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-26.04-arm)

‘next_data’ undeclared (first use in this function); did you mean ‘new_data’?

Check failure on line 859 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

‘next_data’ undeclared (first use in this function); did you mean ‘new_data’?

Check failure on line 859 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-26.04)

‘next_data’ undeclared (first use in this function); did you mean ‘new_data’?

Check failure on line 859 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-26.04)

‘next_data’ undeclared (first use in this function); did you mean ‘new_data’?

Check warning on line 859 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64, tail-call)

'==': 'int' differs in levels of indirection from 'void *' [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 859 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64, tail-call)

'next_data': undeclared identifier [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check warning on line 859 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64, tail-call)

'==': 'int' differs in levels of indirection from 'void *' [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 859 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64, tail-call)

'next_data': undeclared identifier [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check warning on line 859 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64, switch-case)

'==': 'int' differs in levels of indirection from 'void *' [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 859 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (x64, switch-case)

'next_data': undeclared identifier [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 859 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Cross build Linux

‘next_data’ undeclared (first use in this function); did you mean ‘new_data’?

Check failure on line 859 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Lazy imports enabled / Run Tests with lazy_imports=all

‘next_data’ undeclared (first use in this function); did you mean ‘new_data’?

Check failure on line 859 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (bolt) / build and test (ubuntu-26.04)

‘next_data’ undeclared (first use in this function); did you mean ‘new_data’?

Check failure on line 859 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Ubuntu (installed) / build, install and test

‘next_data’ undeclared (first use in this function); did you mean ‘new_data’?

Check warning on line 859 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64, switch-case)

'==': 'int' differs in levels of indirection from 'void *' [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 859 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (x64, switch-case)

'next_data': undeclared identifier [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 859 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Address sanitizer (ubuntu-26.04)

‘next_data’ undeclared (first use in this function); did you mean ‘new_data’?

Check warning on line 859 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64, switch-case)

'==': 'int' differs in levels of indirection from 'void *' [C:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 859 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows / Build and test (arm64, switch-case)

'next_data': undeclared identifier [C:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check warning on line 859 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64, switch-case)

'==': 'int' differs in levels of indirection from 'void *' [C:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check failure on line 859 in Modules/zlibmodule.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / Build and test (arm64, switch-case)

'next_data': undeclared identifier [C:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]
return -1;
Py_SETREF(self->unconsumed_tail, new_data);
}

return 0;
}

/*[clinic input]
@permit_long_summary
zlib.Decompress.decompress
Expand Down
Loading