把 includes 下 64 个 .vp 的文件头注释(含 traceback.vp 第 13-427 行的整块文件级说明)以及 2 处漏网的正文中文注释(ast/lexer.vp、json/__writer.vp)与 1 处中文 docstring(memhub.vp)逐行译为英文;同步把 fltk/gen_ffi.py 的生成模板与其自身注释英文化,使重新生成仍为英文。 只改注释/文档串文字:行数与代码逐字节不变(骨架比对 140 文件漂移 0),运行时中文字符串字面量 305 处保持原样。验证:三重重编 SUCCESS(170.21s)+ 全量 77/77 顺序回归通过 + VET 编译 SUCCESS / --search-paths 7 条 exit 0。
25 lines
1.0 KiB
Plaintext
25 lines
1.0 KiB
Plaintext
import t, c
|
|
from openssl.types import *
|
|
|
|
# ============================================================
|
|
# openssl/rand.vp — secure random numbers
|
|
# Corresponding header: rand.h
|
|
# ============================================================
|
|
|
|
# int RAND_bytes(unsigned char *buf, int num) -- cryptographically secure random
|
|
extern def RAND_bytes(buf: bytes, num: int) -> int
|
|
# int RAND_priv_bytes(unsigned char *buf, int num) -- private-key-grade random (preferred for keys)
|
|
extern def RAND_priv_bytes(buf: bytes, num: int) -> int
|
|
# int RAND_status(void)
|
|
extern def RAND_status() -> int
|
|
# int RAND_poll(void)
|
|
extern def RAND_poll() -> int
|
|
# int RAND_load_file(const char *file, long max_bytes)
|
|
extern def RAND_load_file(file: str, max_bytes: int32) -> int
|
|
# int RAND_write_file(const char *file)
|
|
extern def RAND_write_file(file: str) -> int
|
|
# void RAND_seed(const void *buf, int num)
|
|
extern def RAND_seed(buf: bytes, num: int)
|
|
# void RAND_keep_random_devices_open(int keep)
|
|
extern def RAND_keep_random_devices_open(keep: int)
|