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

Fix use of disallowed internal std library functions in go 1.23 #106

Conversation

arnodel
Copy link
Owner

@arnodel arnodel commented Nov 3, 2024

Previously we used the following internal functions from the runtime standard library package to compute the hash of a Golua Value

//go:linkname goRuntimeInt64Hash runtime.int64Hash //go:noescape func
goRuntimeInt64Hash(i uint64, seed uintptr) uintptr

//go:linkname goRuntimeEfaceHash runtime.efaceHash //go:noescape func
goRuntimeEfaceHash(i interface{}, seed uintptr) uintptr

But since go 1.23 it is no longer allowed to use //go.linkname to refer to
internal symbols in the standard library (see https://tip.golang.org/doc/go1.23#linker).

This means the above is no longer possible.

@arnodel arnodel merged commit 38aca5e into lua5.4 Nov 3, 2024
30 checks passed
@arnodel arnodel deleted the 105-link-githubcomarnodelgoluaruntime-invalid-reference-to-runtimeint64hash branch November 3, 2024 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

link: github.com/arnodel/golua/runtime: invalid reference to runtime.int64Hash
1 participant