10000 gh-95380: Remove the 1024 bytes limit in fcntl.fcntl() and fcntl.ioctl() by serhiy-storchaka · Pull Request #132907 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-95380: Remove the 1024 bytes limit in fcntl.fcntl() and fcntl.ioctl() #132907

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

Merged
merged 7 commits into from
May 13, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
10000
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use char* instead of void*.
  • Loading branch information
serhiy-storchaka committed Apr 25, 2025
commit b73deae7a121ffb1a7f0a28d1d9a260f6cb12e22
4 changes: 2 additions & 2 deletions Modules/fcntlmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ fcntl_fcntl_impl(PyObject *module, int fd, int code, PyObject *arg)
PyBuffer_Release(&view);
return NULL;
}
void *ptr = PyBytes_AsString(result);
char *ptr = PyBytes_AsString(result);
memcpy(ptr, view.buf, len);
PyBuffer_Release(&view);

Expand Down Expand Up @@ -284,7 +284,7 @@ fcntl_ioctl_impl(PyObject *module, int fd, unsigned long code, PyObject *arg,
PyBuffer_Release(&view);
return NULL;
}
void *ptr = PyBytes_AsString(result);
char *ptr = PyBytes_AsString(result);
memcpy(ptr, view.buf, len);
PyBuffer_Release(&view);

Expand Down
0