SIGN IN SIGN UP

gh-142966: Make ctypes.POINTER.set_type also reset format (GH-142967)

Make the deprecated set_type method resets the format, using the
same code as in type initialization.

Implementation note: this was done in PyCPointerType_init 
after calling PyCPointerType_SetProto, but was forgotten
after in PyCPointerType_set_type_impl's call to
PyCPointerType_SetProto.
With this change, setting the format is conceptually part of
setting proto (i.e. the pointed-to type).

Co-authored-by: AN Long <aisk@users.noreply.github.com>
J
Jeong, YunWon committed
9181d776daf87f0e4e2ce02c08f162150fdf7d79
Parent: 933540e
Committed by GitHub <noreply@github.com> on 1/26/2026, 4:40:56 PM