修复了大量存在的问题,增加了假鸭子类型等等机制

This commit is contained in:
2026-06-25 14:49:46 +08:00
parent 19f2787db0
commit d88d11b646
827 changed files with 32617 additions and 18316 deletions

View File

@@ -11,7 +11,7 @@ import string
MPOOL_ALIGN: t.CDefine = 8
MPOOL_TYPE_SLAB: t.CDefine = 0
MPOOL_TYPE_BUMP: t.CDefine = 2
MPOOL_TYPE_BUMP: t.CDefine = 1
def _align_up(val: t.CSizeT, align: t.CSizeT) -> t.CSizeT: pass

View File

@@ -64,4 +64,12 @@ CHAR16: t.CTypedef = t.CChar16T
CHAR32: t.CTypedef = t.CChar32T
CHAR8PTR: t.CTypedef = t.CChar8T | t.CPtr
CHAR16PTR: t.CTypedef = t.CChar16T | t.CPtr
CHAR32PTR: t.CTypedef = t.CChar32T | t.CPtr
CHAR32PTR: t.CTypedef = t.CChar32T | t.CPtr
i8: t.CTypedef = t.CInt8T
i16: t.CTypedef = t.CInt16T
i32: t.CTypedef = t.CInt32T
i64: t.CTypedef = t.CInt64T
u8: t.CTypedef = t.CUInt8T
u16: t.CTypedef = t.CUInt16T
u32: t.CTypedef = t.CUInt32T
u64: t.CTypedef = t.CUInt64T

View File

@@ -11,11 +11,7 @@ import mpool
import json
import string
import w32.win32memory as win32mem
_pass_count: t.CExtern | t.CInt
_fail_count: t.CExtern | t.CInt
def check(name: t.CChar | t.CPtr, condition: bool) -> t.CInt: pass
import testcheck
def test_construct(pool: mpool.MPool | t.CPtr) -> t.CInt: pass

View File

@@ -0,0 +1,25 @@
"""
Auto-generated Python stub file from testcheck.py
Module: testcheck
"""
import t, c
import stdio
_pass_count: t.CExtern | t.CInt
_fail_count: t.CExtern | t.CInt
def begin(name: str) -> t.CInt: pass
def section(name: str) -> t.CInt: pass
def ok(msg: str) -> t.CInt: pass
def fail(msg: str) -> t.CInt: pass
def check(cond: t.CInt, ok_msg: str, fail_msg: str) -> t.CInt: pass
def info(msg: str) -> t.CInt: pass
def end() -> t.CInt: pass

View File

@@ -1,11 +1,12 @@
1dd5985fb89f7ef9:main.py
56cdd754a8a09347:includes/stdint.py
0991af0d22263577:includes/mpool.py
49bd8cba55979f76:includes/stdint.py
5a6a2137958c28c5:includes/w32\win32base.py
68c4fe4b12c908e3:includes/mpool.py
6aee24fdefa3cbc0:includes/string.py
72e2d5ccb7cedcf1:includes/w32\win32memory.py
73edbcf76e32d00b:includes/stdio.py
8ee3170049c70333:includes/json\__init__.py
9361526faa30d4d2:main.py
9dbecd0942a39782:includes/testcheck.py
b5f1dc665c52a1bd:includes/string.py
bd2e7db1744476fe:includes/json\__parser.py
c9f4be41ca1cc2b4:includes/viperio.py
eaf7a981f0ef5b22:includes/json\__writer.py

View File

@@ -41,4 +41,4 @@ def atoll(src: str) -> t.CInt64T: pass
def atof(src: str) -> t.CDouble: pass
def split(s: str, delim: str, result: list[str]) -> int: pass
def split(s: str, delim: str, result: t.CArray[str]) -> int: pass