Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add runtime/hook #116

Merged
merged 1 commit into from
May 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/xgo/runtime_gen/core/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
)

const VERSION = "1.0.35"
const REVISION = "38ce9874b261e60788217c05946dae60dff3d4fd+1"
const NUMBER = 217
const REVISION = "3431198dea60ee1a41ed69b93034c5919aba32b5+1"
const NUMBER = 218

// these fields will be filled by compiler
const XGO_VERSION = ""
Expand Down
23 changes: 23 additions & 0 deletions cmd/xgo/runtime_gen/hook/hook.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package hook

import (
"fmt"
"os"
)

func __xgo_link_on_init_finished(f func()) {
fmt.Fprintln(os.Stderr, "WARNING: failed to link __xgo_link_on_init_finished(requires xgo).")
}

func __xgo_link_init_finished() bool {
fmt.Fprintln(os.Stderr, "WARNING: failed to link __xgo_link_init_finished(requires xgo).")
return false
}

func OnInitFinished(f func()) {
__xgo_link_on_init_finished(f)
}

func InitFinished() bool {
return __xgo_link_init_finished()
}
4 changes: 2 additions & 2 deletions cmd/xgo/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import "fmt"

const VERSION = "1.0.35"
const REVISION = "38ce9874b261e60788217c05946dae60dff3d4fd+1"
const NUMBER = 217
const REVISION = "3431198dea60ee1a41ed69b93034c5919aba32b5+1"
const NUMBER = 218

func getRevision() string {
revSuffix := ""
Expand Down
4 changes: 2 additions & 2 deletions runtime/core/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
)

const VERSION = "1.0.35"
const REVISION = "38ce9874b261e60788217c05946dae60dff3d4fd+1"
const NUMBER = 217
const REVISION = "3431198dea60ee1a41ed69b93034c5919aba32b5+1"
const NUMBER = 218

// these fields will be filled by compiler
const XGO_VERSION = ""
Expand Down
23 changes: 23 additions & 0 deletions runtime/hook/hook.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package hook

import (
"fmt"
"os"
)

func __xgo_link_on_init_finished(f func()) {
fmt.Fprintln(os.Stderr, "WARNING: failed to link __xgo_link_on_init_finished(requires xgo).")
}

func __xgo_link_init_finished() bool {
fmt.Fprintln(os.Stderr, "WARNING: failed to link __xgo_link_init_finished(requires xgo).")
return false
}

func OnInitFinished(f func()) {
__xgo_link_on_init_finished(f)
}

func InitFinished() bool {
return __xgo_link_init_finished()
}
Loading