42 lines
1.5 KiB
Plaintext
42 lines
1.5 KiB
Plaintext
"""Auto-generated Python stub file"""
|
|
|
|
|
|
import t, c
|
|
import string
|
|
import memhub
|
|
from stdint import *
|
|
_HT_EMPTY: t.CDefine = 0
|
|
_HT_TOMBSTONE: t.CDefine = 1
|
|
_HT_INIT_CAP: t.CDefine = 16
|
|
_HT_SLOT_SIZE: t.CDefine = 24
|
|
_FNV_OFFSET: t.CUInt64T = 2216829733
|
|
_FNV_PRIME: t.CUInt64T = 435
|
|
def _fnv1a_hash(key: str) -> t.CUInt64T: pass
|
|
|
|
class HashTable:
|
|
__slots__: t.CVoid | t.CPtr
|
|
__count__: t.CSizeT
|
|
__capacity__: t.CSizeT
|
|
__tombstones__: t.CSizeT
|
|
__mbuddy__: memhub.MemBuddy | t.CPtr
|
|
__iter_index__: t.CSizeT
|
|
def __new__(self, mb: memhub.MemBuddy | t.CPtr) -> t.CPtr: pass
|
|
def __init__(self, mb: memhub.MemBuddy | t.CPtr): pass
|
|
def _slot_hash(self, idx: t.CSizeT) -> t.CUInt64T: pass
|
|
def _slot_key(self, idx: t.CSizeT) -> str: pass
|
|
def _slot_value(self, idx: t.CSizeT) -> t.CPtr: pass
|
|
def _set_slot(self, idx: t.CSizeT, h: t.CUInt64T, key: str, val: t.CPtr): pass
|
|
def _find_slot(self, key: str, h: t.CUInt64T) -> t.CSizeT: pass
|
|
def _resize(self, new_cap: t.CSizeT): pass
|
|
def __setitem__(self, key: str, val: t.CNeedPtr): pass
|
|
def __getitem__(self, key: str) -> t.CPtr: pass
|
|
def __contains__(self, key: str) -> t.CInt: pass
|
|
def __delitem__(self, key: str) -> t.CInt: pass
|
|
def __len__(self) -> t.CSizeT: pass
|
|
def __iter__(self) -> HashTable | t.CPtr: pass
|
|
def __next__(self) -> str: pass
|
|
def get(self, key: str, default: t.CPtr) -> t.CPtr: pass
|
|
def set_int(self, key: str, val: int): pass
|
|
def set_str(self, key: str, val: str): pass
|
|
|