Closed
Description
Bug report
In #114314 (3.13) I introduced a regression: set_type
misuses PyType_GetDict
by modifying it.
import ctypes
intptr = ctypes.POINTER(ctypes.c_int)
print(intptr._type_) # uncomment to hide the issue
print(intptr._type_)
intptr.set_type(ctypes.c_float) # a bad idea, but, it should set _type_
print(intptr._type_)