snapshot before regression test

This commit is contained in:
t
2026-07-18 19:25:40 +08:00
commit 796222a300
2295 changed files with 206453 additions and 0 deletions

20
includes/ctraits.pyi Normal file
View File

@@ -0,0 +1,20 @@
"""ctraits — 编译时类型特征库
提供编译时类型判断函数,不纳入运行时编译。
所有函数仅在编译时求值,可与 c.CIf 等编译时条件配合使用。
"""
import t
def isptr(x: t.CType) -> bool:
"""编译时判断 x 的类型是否为指针类型。
返回 True 如果 x 是指针ptr_count > 0否则返回 False。
可与 c.CIf 配合使用实现条件编译。
示例:
if c.CIf(ctraits.isptr(my_var)):
# 仅当 my_var 是指针类型时编译此分支
...
"""
pass