修复了一些错误

This commit is contained in:
TermiNexus committed 2026-09-18 20:01:14 +08:00
1 parent 61acfc2759
commit 0d77b68cc4
26 files changed
+116 -116

No files matched your search

+3 -3
View File
@@ -51,14 +51,14 @@ class HashTable:
__count__: t.CSizeT = 0 # Number of occupied entries
__capacity__: t.CSizeT = 16 # Total slot count (power of two)
__tombstones__: t.CSizeT = 0 # Tombstone entry count
__mbuddy__: memhub.MemBuddy | t.CPtr
__mbuddy__: rawptr[memhub.MemBuddy]
__iter_index__: t.CSizeT = 0
def __new__(self, mb: memhub.MemBuddy | t.CPtr) -> t.CPtr:
def __new__(self, mb: rawptr[memhub.MemBuddy]) -> t.CPtr:
# Heap-allocate HashTable object (6 fields × 8 bytes = 48 bytes)
return mb.alloc(48)
def __init__(self, mb: memhub.MemBuddy | t.CPtr):
def __init__(self, mb: rawptr[memhub.MemBuddy]):
self.__mbuddy__ = mb
self.__capacity__ = _HT_INIT_CAP
self.__count__ = 0