Skip to content
Closed
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions Doc/c-api/typeobj.rst
Original file line numberDiff line numberDiff line change
Expand Up@@ -1026,9 +1026,9 @@ type objects) *must* have the :attr:`ob_size` field.
.. seealso:: "Safe object finalization" (:pep:`442`)


.. c:member:: PyObject* PyTypeObject.tp_cache
.. c:member:: PyObject* PyTypeObject.tp_defined_slots

Unused. Not inherited. Internal use only.
Not inherited. Internal use only.


.. c:member:: PyObject* PyTypeObject.tp_subclasses
Expand Down
2 changes: 1 addition & 1 deletion Doc/includes/typestruct.h
Original file line numberDiff line numberDiff line change
Expand Up@@ -67,7 +67,7 @@ typedef struct _typeobject {
inquiry tp_is_gc; /* For PyObject_IS_GC */
PyObject *tp_bases;
PyObject *tp_mro; /* method resolution order */
PyObject *tp_cache;
PyObject *tp_defined_slots;
PyObject *tp_subclasses;
PyObject *tp_weaklist;
destructor tp_del;
Expand Down
2 changes: 1 addition & 1 deletion Include/object.h
Original file line numberDiff line numberDiff line change
Expand Up@@ -414,7 +414,7 @@ typedef struct _typeobject {
inquiry tp_is_gc; /* For PyObject_IS_GC */
PyObject *tp_bases;
PyObject *tp_mro; /* method resolution order */
PyObject *tp_cache;
PyObject *tp_defined_slots; /* internal cache; changed in version 3.7 */
PyObject *tp_subclasses;
PyObject *tp_weaklist;
destructor tp_del;
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
Speed up slot lookup during class creation
10 changes: 5 additions & 5 deletions Modules/_io/bufferedio.c
Original file line numberDiff line numberDiff line change
Expand Up@@ -2374,7 +2374,7 @@ PyTypeObject PyBufferedIOBase_Type = {
0, /* tp_is_gc */
0, /* tp_bases */
0, /* tp_mro */
0, /* tp_cache */
0, /* tp_defined_slots */
0, /* tp_subclasses */
0, /* tp_weaklist */
0, /* tp_del */
Expand DownExpand Up@@ -2466,7 +2466,7 @@ PyTypeObject PyBufferedReader_Type = {
0, /* tp_is_gc */
0, /* tp_bases */
0, /* tp_mro */
0, /* tp_cache */
0, /* tp_defined_slots */
0, /* tp_subclasses */
0, /* tp_weaklist */
0, /* tp_del */
Expand DownExpand Up@@ -2553,7 +2553,7 @@ PyTypeObject PyBufferedWriter_Type = {
0, /* tp_is_gc */
0, /* tp_bases */
0, /* tp_mro */
0, /* tp_cache */
0, /* tp_defined_slots */
0, /* tp_subclasses */
0, /* tp_weaklist */
0, /* tp_del */
Expand DownExpand Up@@ -2632,7 +2632,7 @@ PyTypeObject PyBufferedRWPair_Type = {
0, /* tp_is_gc */
0, /* tp_bases */
0, /* tp_mro */
0, /* tp_cache */
0, /* tp_defined_slots */
0, /* tp_subclasses */
0, /* tp_weaklist */
0, /* tp_del */
Expand DownExpand Up@@ -2727,7 +2727,7 @@ PyTypeObject PyBufferedRandom_Type = {
0, /* tp_is_gc */
0, /* tp_bases */
0, /* tp_mro */
0, /* tp_cache */
0, /* tp_defined_slots */
0, /* tp_subclasses */
0, /* tp_weaklist */
0, /* tp_del */
Expand Down
2 changes: 1 addition & 1 deletion Modules/_io/fileio.c
Original file line numberDiff line numberDiff line change
Expand Up@@ -1231,7 +1231,7 @@ PyTypeObject PyFileIO_Type = {
0, /* tp_is_gc */
0, /* tp_bases */
0, /* tp_mro */
0, /* tp_cache */
0, /* tp_defined_slots */
0, /* tp_subclasses */
0, /* tp_weaklist */
0, /* tp_del */
Expand Down
4 changes: 2 additions & 2 deletions Modules/_io/iobase.c
Original file line numberDiff line numberDiff line change
Expand Up@@ -831,7 +831,7 @@ PyTypeObject PyIOBase_Type = {
0, /* tp_is_gc */
0, /* tp_bases */
0, /* tp_mro */
0, /* tp_cache */
0, /* tp_defined_slots */
0, /* tp_subclasses */
0, /* tp_weaklist */
0, /* tp_del */
Expand DownExpand Up@@ -1026,7 +1026,7 @@ PyTypeObject PyRawIOBase_Type = {
0, /* tp_is_gc */
0, /* tp_bases */
0, /* tp_mro */
0, /* tp_cache */
0, /* tp_defined_slots */
0, /* tp_subclasses */
0, /* tp_weaklist */
0, /* tp_del */
Expand Down
4 changes: 2 additions & 2 deletions Modules/_io/textio.c
Original file line numberDiff line numberDiff line change
Expand Up@@ -207,7 +207,7 @@ PyTypeObject PyTextIOBase_Type = {
0, /* tp_is_gc */
0, /* tp_bases */
0, /* tp_mro */
0, /* tp_cache */
0, /* tp_defined_slots */
0, /* tp_subclasses */
0, /* tp_weaklist */
0, /* tp_del */
Expand DownExpand Up@@ -3202,7 +3202,7 @@ PyTypeObject PyTextIOWrapper_Type = {
0, /* tp_is_gc */
0, /* tp_bases */
0, /* tp_mro */
0, /* tp_cache */
0, /* tp_defined_slots */
0, /* tp_subclasses */
0, /* tp_weaklist */
0, /* tp_del */
Expand Down
2 changes: 1 addition & 1 deletion Modules/_io/winconsoleio.c
Original file line numberDiff line numberDiff line change
Expand Up@@ -1155,7 +1155,7 @@ PyTypeObject PyWindowsConsoleIO_Type = {
0, /* tp_is_gc */
0, /* tp_bases */
0, /* tp_mro */
0, /* tp_cache */
0, /* tp_defined_slots */
0, /* tp_subclasses */
0, /* tp_weaklist */
0, /* tp_del */
Expand Down
2 changes: 1 addition & 1 deletion Modules/posixmodule.c
Original file line numberDiff line numberDiff line change
Expand Up@@ -12141,7 +12141,7 @@ static PyTypeObject ScandirIteratorType = {
0, /* tp_is_gc */
0, /* tp_bases */
0, /* tp_mro */
0, /* tp_cache */
0, /* tp_defined_slots */
0, /* tp_subclasses */
0, /* tp_weaklist */
0, /* tp_del */
Expand Down
2 changes: 1 addition & 1 deletion Modules/socketmodule.c
Original file line numberDiff line numberDiff line change
Expand Up@@ -4925,7 +4925,7 @@ static PyTypeObject sock_type = {
0, /* tp_is_gc */
0, /* tp_bases */
0, /* tp_mro */
0, /* tp_cache */
0, /* tp_defined_slots */
0, /* tp_subclasses */
0, /* tp_weaklist */
0, /* tp_del */
Expand Down
6 changes: 3 additions & 3 deletions Objects/genobject.c
Original file line numberDiff line numberDiff line change
Expand Up@@ -807,7 +807,7 @@ PyTypeObject PyGen_Type = {
0, /* tp_is_gc */
0, /* tp_bases */
0, /* tp_mro */
0, /* tp_cache */
0, /* tp_defined_slots */
0, /* tp_subclasses */
0, /* tp_weaklist */
0, /* tp_del */
Expand DownExpand Up@@ -1062,7 +1062,7 @@ PyTypeObject PyCoro_Type = {
0, /* tp_is_gc */
0, /* tp_bases */
0, /* tp_mro */
0, /* tp_cache */
0, /* tp_defined_slots */
0, /* tp_subclasses */
0, /* tp_weaklist */
0, /* tp_del */
Expand DownExpand Up@@ -1407,7 +1407,7 @@ PyTypeObject PyAsyncGen_Type = {
0, /* tp_is_gc */
0, /* tp_bases */
0, /* tp_mro */
0, /* tp_cache */
0, /* tp_defined_slots */
0, /* tp_subclasses */
0, /* tp_weaklist */
0, /* tp_del */
Expand Down
Loading