from ctypes import *
import _ctypes
Py_TPFLAGS_CHECKTYPES = 1 << 4


class PyTypeObject(Structure):
    _fields_ = ('ob_refcnt', c_ssize_t), ('ob_type', c_void_p), ('ob_size',
        c_ssize_t), ('tp_name', c_char_p), ('tp_basicsize', c_ssize_t), (
        'tp_itemsize', c_ssize_t), ('tp_dealloc', c_void_p), ('tp_print',
        c_void_p), ('tp_getattr', c_void_p), ('tp_setattr', c_void_p), (
        'tp_compare', c_void_p), ('tp_repr', c_void_p), ('tp_as_number',
        c_void_p), ('tp_as_sequence', c_void_p), ('tp_as_mapping', c_void_p), (
        'tp_hash', c_void_p), ('tp_call', c_void_p), ('tp_str', c_void_p), (
        'tp_getattro', c_void_p), ('tp_setattro', c_void_p), ('tp_as_buffer',
        c_void_p), ('tp_flags', c_long)
ctypes переопределение rshift для c_ulong