mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-08 13:03:39 +00:00
all: change //go:export to //export
This is the kind that is used in Go (actually CGo) for exporting functions. I think it's best to use //export instead of our custom //go:export pragma, for consistency (they are equivalent in TinyGo). Therefore I've updated all instances to the standard format (except for two that are updated in https://github.com/tinygo-org/tinygo/pull/1024). No smoke tests changed (when comparing the output hash), except for some wasm tests that include DWARF debug info and tend to be flaky anyway.
This commit is contained in:
@@ -6,22 +6,22 @@ import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
//go:export putchar
|
||||
//export putchar
|
||||
func _putchar(c int) int
|
||||
|
||||
//go:export usleep
|
||||
//export usleep
|
||||
func usleep(usec uint) int
|
||||
|
||||
//go:export malloc
|
||||
//export malloc
|
||||
func malloc(size uintptr) unsafe.Pointer
|
||||
|
||||
//go:export abort
|
||||
//export abort
|
||||
func abort()
|
||||
|
||||
//go:export exit
|
||||
//export exit
|
||||
func exit(code int)
|
||||
|
||||
//go:export clock_gettime
|
||||
//export clock_gettime
|
||||
func clock_gettime(clk_id int32, ts *timespec)
|
||||
|
||||
type timeUnit int64
|
||||
@@ -41,7 +41,7 @@ const CLOCK_MONOTONIC_RAW = 4
|
||||
func postinit() {}
|
||||
|
||||
// Entry point for Go. Initialize all packages and call main.main().
|
||||
//go:export main
|
||||
//export main
|
||||
func main() int {
|
||||
preinit()
|
||||
|
||||
@@ -83,5 +83,5 @@ func extalloc(size uintptr) unsafe.Pointer {
|
||||
return malloc(size)
|
||||
}
|
||||
|
||||
//go:export free
|
||||
//export free
|
||||
func extfree(ptr unsafe.Pointer)
|
||||
|
||||
Reference in New Issue
Block a user