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 全通过。
This commit is contained in:
1 parent
aecdf27132
commit
e80284a6d5
88 files changed
+4474
-4474
No files matched your search
@@ -91,7 +91,7 @@ def _copy_posix(src: str, dst: str) -> int:
|
||||
if result != 0:
|
||||
return -1
|
||||
st: posix.Stat = posix.Stat()
|
||||
if posix.stat(src, t.CPtr(c.Addr(st))) == 0:
|
||||
if posix.stat(src, t.CPtr(&st)) == 0:
|
||||
posix.chmod(dst, st.st_mode)
|
||||
return 0
|
||||
|
||||
@@ -127,7 +127,7 @@ def _rmtree_win32(path: str) -> int:
|
||||
pattern[i] = 0
|
||||
|
||||
find_data: w32.win32file.WIN32_FIND_DATAA = w32.win32file.WIN32_FIND_DATAA()
|
||||
handle: w32.win32base.HANDLE = w32.win32file.FindFirstFileA(pattern, t.CPtr(c.Addr(find_data)))
|
||||
handle: w32.win32base.HANDLE = w32.win32file.FindFirstFileA(pattern, t.CPtr(&find_data))
|
||||
_mbuddy.free(pattern)
|
||||
if handle == w32.win32base.INVALID_HANDLE_VALUE:
|
||||
return -1
|
||||
@@ -174,7 +174,7 @@ def _rmtree_win32(path: str) -> int:
|
||||
result = -1
|
||||
_mbuddy.free(full_path)
|
||||
# Continue searching next entry
|
||||
if w32.win32file.FindNextFileA(handle, t.CPtr(c.Addr(find_data))) == 0:
|
||||
if w32.win32file.FindNextFileA(handle, t.CPtr(&find_data)) == 0:
|
||||
has_more = 0
|
||||
|
||||
w32.win32file.FindClose(handle)
|
||||
|
||||
Reference in new issue
Block a user