Skip to content

Commit 3e13a32

Browse files
committed
Remove redundant tp_getattro sets
tp_getattro = PyObject_GenericGetAttr is the default, so we don't need to set it to that explicitly. See https://docs.python.org/3/c-api/typeobj.html#c.PyTypeObject.tp_getattro
1 parent 32facc0 commit 3e13a32

File tree

2 files changed

+0
-2
lines changed

2 files changed

+0
-2
lines changed

src_c/math.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3732,7 +3732,6 @@ static PyTypeObject pgVectorIter_Type = {
37323732
PyVarObject_HEAD_INIT(NULL, 0).tp_name = "pygame.math.VectorIterator",
37333733
.tp_basicsize = sizeof(vectoriter),
37343734
.tp_dealloc = (destructor)vectoriter_dealloc,
3735-
.tp_getattro = PyObject_GenericGetAttr,
37363735
/* VectorIterator is not subtypable for now, no Py_TPFLAGS_BASETYPE */
37373736
.tp_flags = Py_TPFLAGS_DEFAULT,
37383737
.tp_iter = PyObject_SelfIter,

src_c/pixelarray.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1941,7 +1941,6 @@ MODINIT_DEFINE(pixelarray)
19411941
Py_DECREF(module);
19421942
return NULL;
19431943
}
1944-
pgPixelArray_Type.tp_getattro = PyObject_GenericGetAttr;
19451944

19461945
c_api[0] = &pgPixelArray_Type;
19471946
c_api[1] = pgPixelArray_New;

0 commit comments

Comments
 (0)