mirror of https://github.com/python/cpython
gh-114685: Fix incorrect use of PyBUF_READ in import.c (GH-114686)
This commit is contained in:
parent
2124a3ddcc
commit
1ac1b2f953
|
@ -3544,7 +3544,7 @@ _imp_get_frozen_object_impl(PyObject *module, PyObject *name,
|
|||
struct frozen_info info = {0};
|
||||
Py_buffer buf = {0};
|
||||
if (PyObject_CheckBuffer(dataobj)) {
|
||||
if (PyObject_GetBuffer(dataobj, &buf, PyBUF_READ) != 0) {
|
||||
if (PyObject_GetBuffer(dataobj, &buf, PyBUF_SIMPLE) != 0) {
|
||||
return NULL;
|
||||
}
|
||||
info.data = (const char *)buf.buf;
|
||||
|
|
Loading…
Reference in New Issue