Files
Viper_VRTE/builtins.vp
T
TermiNexus e80284a6d5 refactor: 全量迁移 includes 到新规范语法
按根目录 新规范 迁移 R1/R2/R3/R4/R6/R7/R8/R9:指针 T* 后缀、内建类型短别名、c.Addr/c.Deref 单目化、c.Asm 改 __asm__、t.CDefine 改 define 软关键字、t.CEnum 改 enum。R4 对内建 cast 多参实参保留 c.Deref 原写法(单目化会致 TPC 类型退化)。验证:includes 52/52 编译通过,TransPyV 自举产物顺序回归 77/77 全通过。
2026-10-05 09:04:46 +08:00

48 lines
1.3 KiB
Plaintext

import stdint as __stdint
import t
def ord(s: char) -> int: return int(s)
def chr(i: int) -> char: return char(i)
def min(a: double, b: double) -> double: return a if a < b else b
def max(a: double, b: double) -> double: return a if a > b else b
typedef sizet = t.CSizeT
typedef size_t = sizet
typedef int8 = t.CInt8T
typedef int16 = t.CInt16T
typedef int32 = t.CInt32T
typedef int64 = t.CInt64T
typedef uint8 = t.CUInt8T
typedef uint16 = t.CUInt16T
typedef uint32 = t.CUInt32T
typedef uint64 = t.CUInt64T
typedef intfast8 = t.CIntFast8T
typedef intfast16 = t.CIntFast16T
typedef intfast32 = t.CIntFast32T
typedef intfast64 = t.CIntFast64T
typedef uintfast8 = t.CUIntFast8T
typedef uintfast16 = t.CUIntFast16T
typedef uintfast32 = t.CUIntFast32T
typedef uintfast64 = t.CUIntFast64T
typedef intleast8 = t.CIntLeast8T
typedef intleast16 = t.CIntLeast16T
typedef intleast32 = t.CIntLeast32T
typedef intleast64 = t.CIntLeast64T
typedef uintleast8 = t.CUIntLeast8T
typedef uintleast16 = t.CUIntLeast16T
typedef uintleast32 = t.CUIntLeast32T
typedef uintleast64 = t.CUIntLeast64T
typedef uchar = t.CUnsignedChar
typedef short = int16
typedef ushort = uint16
typedef uint = t.CUnsignedInt
typedef long = int32
typedef ulong = uint32
typedef longlong = int64
typedef ulonglong = uint64