|
|
|
@ -59,9 +59,9 @@ class CPyTypeObject(CPyVarObject):
@@ -59,9 +59,9 @@ class CPyTypeObject(CPyVarObject):
|
|
|
|
|
self.tp_vectorcall_offset = cprop("tp_vectorcall_offset", "n") |
|
|
|
|
self.tp_getattr = cprop("tp_getattr", "P[void]") |
|
|
|
|
self.tp_setattr = cprop("tp_setattr", "P[void]") |
|
|
|
|
self.tp_as_async = cprop("tp_as_async", "P[void]") # TODO: Maybe add tp_reserved for <3.4? |
|
|
|
|
self.tp_as_async = cprop("tp_as_async", "P[CPyAsyncMethods]") |
|
|
|
|
self.tp_repr = cprop("tp_repr", "P[void]") |
|
|
|
|
self.tp_as_number = cprop("tp_as_number", "P[void]") |
|
|
|
|
self.tp_as_number = cprop("tp_as_number", "P[CPyNumberMethods]") |
|
|
|
|
self.tp_as_sequence = cprop("tp_as_sequence", "P[CPySequenceMethods]") |
|
|
|
|
self.tp_as_mapping = cprop("tp_as_mapping", "P[CPyMappingMethods]") |
|
|
|
|
self.tp_hash = cprop("tp_hash", "P[void]") |
|
|
|
@ -69,7 +69,7 @@ class CPyTypeObject(CPyVarObject):
@@ -69,7 +69,7 @@ class CPyTypeObject(CPyVarObject):
|
|
|
|
|
self.tp_str = cprop("tp_str", "P[void]") |
|
|
|
|
self.tp_getattro = cprop("tp_getattro", "P[void]") |
|
|
|
|
self.tp_setattro = cprop("tp_setattro", "P[void]") |
|
|
|
|
self.tp_as_buffer = cprop("tp_as_buffer", "P[void]") |
|
|
|
|
self.tp_as_buffer = cprop("tp_as_buffer", "P[CPyBufferProcs]") |
|
|
|
|
self.tp_flags = cprop("tp_flags", "l") |
|
|
|
|
self.tp_doc = cprop("tp_doc", "P[void]") |
|
|
|
|
self.tp_traverse = cprop("tp_traverse", "P[void]") |
|
|
|
@ -153,5 +153,32 @@ class CPyTypeObject(CPyVarObject):
@@ -153,5 +153,32 @@ class CPyTypeObject(CPyVarObject):
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# TODO: |
|
|
|
|
# - PyHeapTypeObject |
|
|
|
|
class CPyHeapTypeObject(CType): |
|
|
|
|
def __init__(self): |
|
|
|
|
super().__init__() |
|
|
|
|
|
|
|
|
|
self.ht_type = cprop("ht_type", "A[CPyTypeObject]1") |
|
|
|
|
self.as_async = cprop("as_async", "A[CPyAsyncMethods]1") |
|
|
|
|
self.as_number = cprop("as_number", "A[CPyNumberMethods]1") |
|
|
|
|
self.as_mapping = cprop("as_mapping", "A[CPyMappingMethods]1") |
|
|
|
|
self.as_sequence = cprop("as_sequence", "A[CPySequenceMethods]1") |
|
|
|
|
self.as_buffer = cprop("as_buffer", "A[PyBufferProcs]1") |
|
|
|
|
self.ht_name = cprop("ht_name", "P[CPyObject]") |
|
|
|
|
self.ht_slots = cprop("ht_slots", "P[CPyObject]") |
|
|
|
|
self.ht_qualname = cprop("ht_qualname", "P[CPyObject]") |
|
|
|
|
self.ht_cached_keys = cprop("ht_cached_keys", "P[CPyDictKeysObject]") |
|
|
|
|
self.ht_module = cprop("ht_module", "P[CPyObject]") |
|
|
|
|
|
|
|
|
|
self.add_props( |
|
|
|
|
self.ht_type, |
|
|
|
|
self.as_async, |
|
|
|
|
self.as_number, |
|
|
|
|
self.as_mapping, |
|
|
|
|
self.as_sequence, |
|
|
|
|
self.as_buffer, |
|
|
|
|
self.ht_name, |
|
|
|
|
self.ht_slots, |
|
|
|
|
self.ht_qualname, |
|
|
|
|
self.ht_cached_keys, |
|
|
|
|
self.ht_module, |
|
|
|
|
) |
|
|
|
|