mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-13 07:23:39 +00:00
all: replace _extern_* workaround with //go:extern pragma
This commit is contained in:
+4
-4
@@ -6,10 +6,10 @@ import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var (
|
||||
_extern__heap_start unsafe.Pointer // defined by the linker
|
||||
heapptr = uintptr(unsafe.Pointer(&_extern__heap_start))
|
||||
)
|
||||
//go:extern _heap_start
|
||||
var heapStart unsafe.Pointer
|
||||
|
||||
var heapptr = uintptr(unsafe.Pointer(&heapStart))
|
||||
|
||||
func alloc(size uintptr) unsafe.Pointer {
|
||||
// TODO: this can be optimized by not casting between pointers and ints so
|
||||
|
||||
Reference in New Issue
Block a user