E66E gh-101819: Refactor _io in preparation for module isolation by erlend-aasland · Pull Request #104334 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-101819: Refactor _io in preparation for module isolation #104334

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 12 commits into from
May 9, 2023
Merged
Prev Previous commit
Next Next commit
Add io state struct forward declaration.
  • Loading branch information
erlend-aasland committed May 9, 2023
commit e940ed3631cc57df552bb2b8454ae2817b3c114b
3 changes: 2 additions & 1 deletion Modules/_io/_iomodule.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ extern PyType_Spec winconsoleio_spec;
* with args=NULL, and return a new reference.
* BUT when args=Py_True is passed, they return a borrowed reference.
*/
struct _io_state; // Forward decl.
extern PyObject* _PyIOBase_check_readable(PyObject *self, PyObject *args);
extern PyObject* _PyIOBase_check_writable(PyObject *self, PyObject *args);
extern PyObject* _PyIOBase_check_seekable(PyObject *self, PyObject *args);
Expand Down Expand Up @@ -140,7 +141,7 @@ extern Py_off_t PyNumber_AsOff_t(PyObject *item, PyObject *err);

extern PyModuleDef _PyIO_Module;

typedef struct {
typedef struct _io_state {
int initialized;
PyObject *unsupported_operation;

Expand Down 38F5
0