Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
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.
Loading
Diff view
Diff view
Next Next commit
visit instance dict
  • Loading branch information
kumaraditya303 committed May 15, 2023
commit 5ee23584f2d96beaae1e0f1591f0fdfba9cb7965
8 changes: 8 additions & 0 deletions Modules/_io/_iomodule.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,3 +195,11 @@ extern PyObject *_PyIOBase_cannot_pickle(PyObject *self, PyObject *args);
#ifdef HAVE_WINDOWS_CONSOLE_IO
extern char _PyIO_get_console_type(PyObject *);
#endif


typedef struct {
PyObject_HEAD

PyObject *dict;
PyObject *weakreflist;
} iobase;
1 change: 1 addition & 0 deletions Modules/_io/bufferedio.c
Original file line number Diff line number Diff line change
Expand Up @@ -2428,6 +2428,7 @@ static int
bufferediobase_traverse(PyObject *self, visitproc visit, void *arg)
{
Py_VISIT(Py_TYPE(self));
Py_VISIT(((iobase *)self)->dict);
return 0;
}

Expand Down
7 changes: 1 addition & 6 deletions Modules/_io/iobase.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ class _io._RawIOBase "PyObject *" "clinic_state()->PyRawIOBase_Type"
* IOBase class, an abstract class
Comment thread
kumaraditya303 marked this conversation as resolved.
*/

typedef struct {
PyObject_HEAD

PyObject *dict;
PyObject *weakreflist;
} iobase;

PyDoc_STRVAR(iobase_doc,
"The abstract base class for all I/O classes.\n"
Expand Down Expand Up @@ -1040,6 +1034,7 @@ static int
rawiobase_traverse(PyObject *self, visitproc visit, void *arg)
{
Py_VISIT(Py_TYPE(self));
Py_VISIT(((iobase *)self)->dict);
return 0;
}

Expand Down
1 change: 1 addition & 0 deletions Modules/_io/textio.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ static int
textiobase_traverse(PyObject *self, visitproc visit, void *arg)
{
Py_VISIT(Py_TYPE(self));
Py_VISIT(((iobase *)self)->dict);
return 0;
}

Expand Down