把 81 个 .vp 文件的中文 # 注释与三引号文档串改写为简洁英文,每个连续注释块 <=2 行;运行时中文字符串字面量(testcheck.begin/print 等用户可见消息)保持原样。骨架比对 HEAD 与工作区 112 文件漂移 0,全量 77/77 顺序回归通过。
39 lines
903 B
Plaintext
39 lines
903 B
Plaintext
from stdint import *
|
|
import w32.win32console
|
|
import t, c
|
|
from t import CInt, CExport
|
|
import memhub
|
|
import stdlib
|
|
import sys
|
|
import os
|
|
import os._win32
|
|
import os._posix
|
|
import os.path
|
|
import shutil
|
|
import subprocess
|
|
import syslibtest_impl
|
|
|
|
|
|
# MBuddy arena size: 1 MB.
|
|
define ARENA_SIZE = 1048576
|
|
|
|
|
|
def main() -> CInt | CExport:
|
|
w32.win32console.SetConsoleCP(65001)
|
|
w32.win32console.SetConsoleOutputCP(65001)
|
|
|
|
# Initialize the global MBuddy allocator.
|
|
arena: bytes = stdlib.malloc(ARENA_SIZE)
|
|
mbuddy_obj: memhub.MemBuddy* = memhub.MemBuddy(arena, ARENA_SIZE)
|
|
|
|
# Assign the MBuddy object to every module that allocates.
|
|
sys._mbuddy = mbuddy_obj
|
|
os._mbuddy = mbuddy_obj
|
|
os._win32._mbuddy = mbuddy_obj
|
|
os._posix._mbuddy = mbuddy_obj
|
|
os.path._mbuddy = mbuddy_obj
|
|
shutil._mbuddy = mbuddy_obj
|
|
subprocess._mbuddy = mbuddy_obj
|
|
|
|
return syslibtest_impl.run()
|