forked from opennox/opennox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcxgo.yml
57 lines (57 loc) · 1.21 KB
/
cxgo.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
root: ./src/legacy
out: ./gonox
package: opennox
int_size: 4
ptr_size: 4
wchar_size: 2
use_go_int: false
unexported_fields: true
keep_free: true
define:
- name: NOX_CGO
#file_pref: cxgo_
files:
- name: '*.c'
replace:
- old: 'libc.CString'
new: 'internCStr'
- old: 'libc.BoolToInt'
new: 'bool2int32'
- old: 'libc.Free'
new: 'alloc.Free'
- old: 'libc.Calloc'
new: 'alloc.Calloc'
- old: 'libc.MemCpy'
new: 'alloc.Memcpy'
- old: 'libc.FuncAddr'
new: 'funAddr'
- old: 'libc.AsFunc'
new: 'asFunc'
- old: 'unsafe.Sizeof(uint32(0))'
new: '4'
- old: 'unsafe.Sizeof(int32(0))'
new: '4'
- old: 'libc.WChar'
new: 'uint16'
- old: 'stdio.File'
new: 'File'
- old: '(mem_getPtr'
new: '(memmap.PtrOff'
- old: 'mem_getPtr(0'
new: 'memmap.PtrOff(0'
- old: '*mem_getU64Ptr'
new: '*memmap.PtrUint64'
- old: '*mem_getU32Ptr'
new: '*memmap.PtrUint32'
- old: '*mem_getU16Ptr'
new: '*memmap.PtrUint16'
- old: '*mem_getU8Ptr'
new: '*memmap.PtrUint8'
- old: '*mem_getI64Ptr'
new: '*memmap.PtrInt64'
- old: '*mem_getI32Ptr'
new: '*memmap.PtrInt32'
- old: '*mem_getI16Ptr'
new: '*memmap.PtrInt16'
- old: '*mem_getI8Ptr'
new: '*memmap.PtrInt8'