Modified const and extern to always use blocks
This commit is contained in:
parent
4c90b6ea6a
commit
51fc0a1272
16 changed files with 164 additions and 90 deletions
|
@ -1,7 +1,3 @@
|
|||
kernel32 extern {
|
||||
VirtualAlloc(address int, size uint, flags uint32, protection uint32) -> *any
|
||||
}
|
||||
|
||||
alloc(length int) -> []byte {
|
||||
x := kernel32.VirtualAlloc(0, length+8, mem.commit|mem.reserve, page.readwrite)
|
||||
|
||||
|
@ -11,4 +7,10 @@ alloc(length int) -> []byte {
|
|||
|
||||
store(x, 8, length)
|
||||
return x + 8
|
||||
}
|
||||
|
||||
extern {
|
||||
kernel32 {
|
||||
VirtualAlloc(address int, size uint, flags uint32, protection uint32) -> *any
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue