detached 8b0a311

fork: rename module path to github.com/bnema/purego

commit
8b0a311a56748c9cb4200026f9a1b32534edf15a
author
brice · · 2026-04-15 03:32 UTC
parent
a7a7574
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
refs
tag: v0.11.0-bnema.1
33 files · +57 -55
M .github/ISSUE_TEMPLATE/config.yml +1 -1
@@ -2,4 +2,4 @@ blank_issues_enabled: false
22 contact_links:
33 - name: Questions
44 about: Please use one of the forums for questions or general discussions
5- url: https://github.com/ebitengine/purego/discussions
5+ url: https://github.com/bnema/purego/discussions
@@ -2,4 +2,4 @@ blank_issues_enabled: false
2 contact_links:2 contact_links:
3 - name: Questions3 - name: Questions
4 about: Please use one of the forums for questions or general discussions4 about: Please use one of the forums for questions or general discussions
5- url: https://github.com/ebitengine/purego/discussions5+ url: https://github.com/bnema/purego/discussions
M .github/scripts/bsd_tests.sh +5 -5
@@ -36,8 +36,8 @@ env GOOS=linux GOARCH=amd64 go build -v ./...
3636 env GOOS=linux GOARCH=arm64 go build -v ./...
3737
3838 # Check cross-compiling FreeBSD binaries.
39-env GOOS=freebsd GOARCH=amd64 go build -gcflags="github.com/ebitengine/purego/internal/fakecgo=-std" -v ./...
40-env GOOS=freebsd GOARCH=arm64 go build -gcflags="github.com/ebitengine/purego/internal/fakecgo=-std" -v ./...
39+env GOOS=freebsd GOARCH=amd64 go build -gcflags="github.com/bnema/purego/internal/fakecgo=-std" -v ./...
40+env GOOS=freebsd GOARCH=arm64 go build -gcflags="github.com/bnema/purego/internal/fakecgo=-std" -v ./...
4141
4242 # Check cross-compiling NetBSD binaries.
4343 env GOOS=netbsd GOARCH=amd64 go build -v ./...
@@ -55,17 +55,17 @@ cd /tmp/vendoring
5555 go mod init foo
5656 echo 'package main' > main.go
5757 echo 'import (' >> main.go
58-echo ' _ "github.com/ebitengine/purego"' >> main.go
58+echo ' _ "github.com/bnema/purego"' >> main.go
5959 echo ')' >> main.go
6060 echo 'func main() {}' >> main.go
61-go mod edit -replace github.com/ebitengine/purego=$GITHUB_WORKSPACE
61+go mod edit -replace github.com/bnema/purego=$GITHUB_WORKSPACE
6262 go mod tidy
6363 go mod vendor
6464 go build -v .
6565
6666 cd $GITHUB_WORKSPACE
6767 echo "=> go test CGO_ENABLED=0"
68-env CGO_ENABLED=0 go test -gcflags="github.com/ebitengine/purego/internal/fakecgo=-std" -shuffle=on -v -count=10 ./...
68+env CGO_ENABLED=0 go test -gcflags="github.com/bnema/purego/internal/fakecgo=-std" -shuffle=on -v -count=10 ./...
6969
7070 echo "=> go test CGO_ENABLED=1"
7171 env CGO_ENABLED=1 go test -shuffle=on -v -count=10 ./...
@@ -36,8 +36,8 @@ env GOOS=linux GOARCH=amd64 go build -v ./...
36 env GOOS=linux GOARCH=arm64 go build -v ./...36 env GOOS=linux GOARCH=arm64 go build -v ./...
37 37
38 # Check cross-compiling FreeBSD binaries.38 # Check cross-compiling FreeBSD binaries.
39-env GOOS=freebsd GOARCH=amd64 go build -gcflags="github.com/ebitengine/purego/internal/fakecgo=-std" -v ./...39+env GOOS=freebsd GOARCH=amd64 go build -gcflags="github.com/bnema/purego/internal/fakecgo=-std" -v ./...
40-env GOOS=freebsd GOARCH=arm64 go build -gcflags="github.com/ebitengine/purego/internal/fakecgo=-std" -v ./...40+env GOOS=freebsd GOARCH=arm64 go build -gcflags="github.com/bnema/purego/internal/fakecgo=-std" -v ./...
41 41
42 # Check cross-compiling NetBSD binaries.42 # Check cross-compiling NetBSD binaries.
43 env GOOS=netbsd GOARCH=amd64 go build -v ./...43 env GOOS=netbsd GOARCH=amd64 go build -v ./...
@@ -55,17 +55,17 @@ cd /tmp/vendoring
55 go mod init foo55 go mod init foo
56 echo 'package main' > main.go56 echo 'package main' > main.go
57 echo 'import (' >> main.go57 echo 'import (' >> main.go
58-echo ' _ "github.com/ebitengine/purego"' >> main.go58+echo ' _ "github.com/bnema/purego"' >> main.go
59 echo ')' >> main.go59 echo ')' >> main.go
60 echo 'func main() {}' >> main.go60 echo 'func main() {}' >> main.go
61-go mod edit -replace github.com/ebitengine/purego=$GITHUB_WORKSPACE61+go mod edit -replace github.com/bnema/purego=$GITHUB_WORKSPACE
62 go mod tidy62 go mod tidy
63 go mod vendor63 go mod vendor
64 go build -v .64 go build -v .
65 65
66 cd $GITHUB_WORKSPACE66 cd $GITHUB_WORKSPACE
67 echo "=> go test CGO_ENABLED=0"67 echo "=> go test CGO_ENABLED=0"
68-env CGO_ENABLED=0 go test -gcflags="github.com/ebitengine/purego/internal/fakecgo=-std" -shuffle=on -v -count=10 ./...68+env CGO_ENABLED=0 go test -gcflags="github.com/bnema/purego/internal/fakecgo=-std" -shuffle=on -v -count=10 ./...
69 69
70 echo "=> go test CGO_ENABLED=1"70 echo "=> go test CGO_ENABLED=1"
71 env CGO_ENABLED=1 go test -shuffle=on -v -count=10 ./...71 env CGO_ENABLED=1 go test -shuffle=on -v -count=10 ./...
M .github/workflows/test.yml +4 -4
@@ -66,8 +66,8 @@ jobs:
6666 # Check cross-compiling FreeBSD binaries.
6767 # gcflags -std is necessary to make fakecgo the Cgo for
6868 # FreeBSD to add the symbols that libc.so depends on.
69- env GOOS=freebsd GOARCH=amd64 go build -gcflags="github.com/ebitengine/purego/internal/fakecgo=-std" -v ./...
70- env GOOS=freebsd GOARCH=arm64 go build -gcflags="github.com/ebitengine/purego/internal/fakecgo=-std" -v ./...
69+ env GOOS=freebsd GOARCH=amd64 go build -gcflags="github.com/bnema/purego/internal/fakecgo=-std" -v ./...
70+ env GOOS=freebsd GOARCH=arm64 go build -gcflags="github.com/bnema/purego/internal/fakecgo=-std" -v ./...
7171
7272 # Check cross-compiling NetBSD binaries.
7373 env GOOS=netbsd GOARCH=amd64 go build -v ./...
@@ -97,10 +97,10 @@ jobs:
9797 go mod init foo
9898 echo 'package main' > main.go
9999 echo 'import (' >> main.go
100- echo ' _ "github.com/ebitengine/purego"' >> main.go
100+ echo ' _ "github.com/bnema/purego"' >> main.go
101101 echo ')' >> main.go
102102 echo 'func main() {}' >> main.go
103- go mod edit -replace github.com/ebitengine/purego=$GITHUB_WORKSPACE
103+ go mod edit -replace github.com/bnema/purego=$GITHUB_WORKSPACE
104104 go mod tidy
105105 go mod vendor
106106 go build -v .
@@ -66,8 +66,8 @@ jobs:
66 # Check cross-compiling FreeBSD binaries.66 # Check cross-compiling FreeBSD binaries.
67 # gcflags -std is necessary to make fakecgo the Cgo for67 # gcflags -std is necessary to make fakecgo the Cgo for
68 # FreeBSD to add the symbols that libc.so depends on.68 # FreeBSD to add the symbols that libc.so depends on.
69- env GOOS=freebsd GOARCH=amd64 go build -gcflags="github.com/ebitengine/purego/internal/fakecgo=-std" -v ./...69+ env GOOS=freebsd GOARCH=amd64 go build -gcflags="github.com/bnema/purego/internal/fakecgo=-std" -v ./...
70- env GOOS=freebsd GOARCH=arm64 go build -gcflags="github.com/ebitengine/purego/internal/fakecgo=-std" -v ./... 70+ env GOOS=freebsd GOARCH=arm64 go build -gcflags="github.com/bnema/purego/internal/fakecgo=-std" -v ./...
71 71
72 # Check cross-compiling NetBSD binaries.72 # Check cross-compiling NetBSD binaries.
73 env GOOS=netbsd GOARCH=amd64 go build -v ./...73 env GOOS=netbsd GOARCH=amd64 go build -v ./...
@@ -97,10 +97,10 @@ jobs:
97 go mod init foo97 go mod init foo
98 echo 'package main' > main.go98 echo 'package main' > main.go
99 echo 'import (' >> main.go99 echo 'import (' >> main.go
100- echo ' _ "github.com/ebitengine/purego"' >> main.go100+ echo ' _ "github.com/bnema/purego"' >> main.go
101 echo ')' >> main.go101 echo ')' >> main.go
102 echo 'func main() {}' >> main.go102 echo 'func main() {}' >> main.go
103- go mod edit -replace github.com/ebitengine/purego=$GITHUB_WORKSPACE103+ go mod edit -replace github.com/bnema/purego=$GITHUB_WORKSPACE
104 go mod tidy104 go mod tidy
105 go mod vendor105 go mod vendor
106 go build -v .106 go build -v .
M README.md +6 -4
@@ -1,8 +1,10 @@
11 # purego
2-[![Go Reference](https://pkg.go.dev/badge/github.com/ebitengine/purego?GOOS=darwin.svg)](https://pkg.go.dev/github.com/ebitengine/purego?GOOS=darwin)
2+[![Go Reference](https://pkg.go.dev/badge/github.com/bnema/purego?GOOS=darwin.svg)](https://pkg.go.dev/github.com/bnema/purego?GOOS=darwin)
33
44 A library for calling C functions from Go without Cgo.
55
6+> Fork notice: this repository is a maintained fork of `github.com/ebitengine/purego` with additional ABI, callback, and generator-facing fixes needed by the PureGoTK stack.
7+
68 > This is beta software so expect bugs and potentially API breaking changes
79 > but each release will be tagged to avoid breaking people's code.
810 > Bug reports are encouraged.
@@ -49,14 +51,14 @@ Tier 2 platforms are supported by PureGo on a best-effort basis. Critical bugs o
4951 #### Support Notes
5052
5153 1. These architectures require CGO_ENABLED=1 to compile
52-2. These architectures require the special flag `-gcflags="github.com/ebitengine/purego/internal/fakecgo=-std"` to compile with CGO_ENABLED=0
54+2. These architectures require the special flag `-gcflags="github.com/bnema/purego/internal/fakecgo=-std"` to compile with CGO_ENABLED=0
5355 3. These architectures only support `SyscallN` and `NewCallback`
5456 4. These architectures are no longer supported as of Go 1.26
5557
5658 ## Example
5759
5860 The example below only showcases purego use for macOS and Linux. The other platforms require special handling which can
59-be seen in the complete example at [examples/libc](https://github.com/ebitengine/purego/tree/main/examples/libc) which supports FreeBSD and Windows.
61+be seen in the complete example at [examples/libc](https://github.com/bnema/purego/tree/main/examples/libc) which supports FreeBSD and Windows.
6062
6163 ```go
6264 package main
@@ -65,7 +67,7 @@ import (
6567 "fmt"
6668 "runtime"
6769
68- "github.com/ebitengine/purego"
70+ "github.com/bnema/purego"
6971 )
7072
7173 func getSystemLibrary() string {
@@ -1,8 +1,10 @@
1 # purego1 # purego
2-[![Go Reference](https://pkg.go.dev/badge/github.com/ebitengine/purego?GOOS=darwin.svg)](https://pkg.go.dev/github.com/ebitengine/purego?GOOS=darwin)2+[![Go Reference](https://pkg.go.dev/badge/github.com/bnema/purego?GOOS=darwin.svg)](https://pkg.go.dev/github.com/bnema/purego?GOOS=darwin)
3 3
4 A library for calling C functions from Go without Cgo.4 A library for calling C functions from Go without Cgo.
5 5
6+> Fork notice: this repository is a maintained fork of `github.com/ebitengine/purego` with additional ABI, callback, and generator-facing fixes needed by the PureGoTK stack.
7+
6 > This is beta software so expect bugs and potentially API breaking changes8 > This is beta software so expect bugs and potentially API breaking changes
7 > but each release will be tagged to avoid breaking people's code.9 > but each release will be tagged to avoid breaking people's code.
8 > Bug reports are encouraged.10 > Bug reports are encouraged.
@@ -49,14 +51,14 @@ Tier 2 platforms are supported by PureGo on a best-effort basis. Critical bugs o
49 #### Support Notes51 #### Support Notes
50 52
51 1. These architectures require CGO_ENABLED=1 to compile53 1. These architectures require CGO_ENABLED=1 to compile
52-2. These architectures require the special flag `-gcflags="github.com/ebitengine/purego/internal/fakecgo=-std"` to compile with CGO_ENABLED=054+2. These architectures require the special flag `-gcflags="github.com/bnema/purego/internal/fakecgo=-std"` to compile with CGO_ENABLED=0
53 3. These architectures only support `SyscallN` and `NewCallback`55 3. These architectures only support `SyscallN` and `NewCallback`
54 4. These architectures are no longer supported as of Go 1.2656 4. These architectures are no longer supported as of Go 1.26
55 57
56 ## Example58 ## Example
57 59
58 The example below only showcases purego use for macOS and Linux. The other platforms require special handling which can60 The example below only showcases purego use for macOS and Linux. The other platforms require special handling which can
59-be seen in the complete example at [examples/libc](https://github.com/ebitengine/purego/tree/main/examples/libc) which supports FreeBSD and Windows.61+be seen in the complete example at [examples/libc](https://github.com/bnema/purego/tree/main/examples/libc) which supports FreeBSD and Windows.
60 62
61 ```go63 ```go
62 package main64 package main
@@ -65,7 +67,7 @@ import (
65 "fmt"67 "fmt"
66 "runtime"68 "runtime"
67 69
68- "github.com/ebitengine/purego"70+ "github.com/bnema/purego"
69 )71 )
70 72
71 func getSystemLibrary() string {73 func getSystemLibrary() string {
M callback_test.go +1 -1
@@ -13,7 +13,7 @@ import (
1313 "testing"
1414 "unsafe"
1515
16- "github.com/ebitengine/purego"
16+ "github.com/bnema/purego"
1717 )
1818
1919 // TestCallGoFromSharedLib is a test that checks for stack corruption on arm64
@@ -13,7 +13,7 @@ import (
13 "testing"13 "testing"
14 "unsafe"14 "unsafe"
15 15
16- "github.com/ebitengine/purego"16+ "github.com/bnema/purego"
17 )17 )
18 18
19 // TestCallGoFromSharedLib is a test that checks for stack corruption on arm6419 // TestCallGoFromSharedLib is a test that checks for stack corruption on arm64
M cgo.go +1 -1
@@ -15,5 +15,5 @@ package purego
1515 import (
1616 _ "runtime/cgo"
1717
18- _ "github.com/ebitengine/purego/internal/cgo"
18+ _ "github.com/bnema/purego/internal/cgo"
1919 )
@@ -15,5 +15,5 @@ package purego
15 import (15 import (
16 _ "runtime/cgo"16 _ "runtime/cgo"
17 17
18- _ "github.com/ebitengine/purego/internal/cgo"18+ _ "github.com/bnema/purego/internal/cgo"
19 )19 )
M dlfcn_android.go +1 -1
@@ -3,7 +3,7 @@
33
44 package purego
55
6-import "github.com/ebitengine/purego/internal/cgo"
6+import "github.com/bnema/purego/internal/cgo"
77
88 // Source for constants: https://android.googlesource.com/platform/bionic/+/refs/heads/main/libc/include/dlfcn.h
99
@@ -3,7 +3,7 @@
3 3
4 package purego4 package purego
5 5
6-import "github.com/ebitengine/purego/internal/cgo"6+import "github.com/bnema/purego/internal/cgo"
7 7
8 // Source for constants: https://android.googlesource.com/platform/bionic/+/refs/heads/main/libc/include/dlfcn.h8 // Source for constants: https://android.googlesource.com/platform/bionic/+/refs/heads/main/libc/include/dlfcn.h
9 9
M dlfcn_test.go +1 -1
@@ -11,7 +11,7 @@ import (
1111 "testing"
1212 "unsafe"
1313
14- "github.com/ebitengine/purego"
14+ "github.com/bnema/purego"
1515 )
1616
1717 func TestSimpleDlsym(t *testing.T) {
@@ -11,7 +11,7 @@ import (
11 "testing"11 "testing"
12 "unsafe"12 "unsafe"
13 13
14- "github.com/ebitengine/purego"14+ "github.com/bnema/purego"
15 )15 )
16 16
17 func TestSimpleDlsym(t *testing.T) {17 func TestSimpleDlsym(t *testing.T) {
M examples/libc/main.go +1 -1
@@ -9,7 +9,7 @@ import (
99 "fmt"
1010 "runtime"
1111
12- "github.com/ebitengine/purego"
12+ "github.com/bnema/purego"
1313 )
1414
1515 func getSystemLibrary() string {
@@ -9,7 +9,7 @@ import (
9 "fmt"9 "fmt"
10 "runtime"10 "runtime"
11 11
12- "github.com/ebitengine/purego"12+ "github.com/bnema/purego"
13 )13 )
14 14
15 func getSystemLibrary() string {15 func getSystemLibrary() string {
M examples/libc/main_unix.go +1 -1
@@ -5,7 +5,7 @@
55
66 package main
77
8-import "github.com/ebitengine/purego"
8+import "github.com/bnema/purego"
99
1010 func openLibrary(name string) (uintptr, error) {
1111 return purego.Dlopen(name, purego.RTLD_NOW|purego.RTLD_GLOBAL)
@@ -5,7 +5,7 @@
5 5
6 package main6 package main
7 7
8-import "github.com/ebitengine/purego"8+import "github.com/bnema/purego"
9 9
10 func openLibrary(name string) (uintptr, error) {10 func openLibrary(name string) (uintptr, error) {
11 return purego.Dlopen(name, purego.RTLD_NOW|purego.RTLD_GLOBAL)11 return purego.Dlopen(name, purego.RTLD_NOW|purego.RTLD_GLOBAL)
M examples/objc/main_darwin.go +1 -1
@@ -7,7 +7,7 @@ import (
77 "fmt"
88 "reflect"
99
10- "github.com/ebitengine/purego/objc"
10+ "github.com/bnema/purego/objc"
1111 )
1212
1313 var (
@@ -7,7 +7,7 @@ import (
7 "fmt"7 "fmt"
8 "reflect"8 "reflect"
9 9
10- "github.com/ebitengine/purego/objc"10+ "github.com/bnema/purego/objc"
11 )11 )
12 12
13 var (13 var (
M examples/protocol-dumper/main_darwin.go +2 -2
@@ -24,7 +24,7 @@ import (
2424 "strings"
2525 "text/template"
2626
27- "github.com/ebitengine/purego/objc"
27+ "github.com/bnema/purego/objc"
2828 )
2929
3030 var protocols = []string{
@@ -79,7 +79,7 @@ package main
7979 import (
8080 "log"
8181
82- "github.com/ebitengine/purego/objc"
82+ "github.com/bnema/purego/objc"
8383 )
8484
8585 func init() {
@@ -24,7 +24,7 @@ import (
24 "strings"24 "strings"
25 "text/template"25 "text/template"
26 26
27- "github.com/ebitengine/purego/objc"27+ "github.com/bnema/purego/objc"
28 )28 )
29 29
30 var protocols = []string{30 var protocols = []string{
@@ -79,7 +79,7 @@ package main
79 import (79 import (
80 "log"80 "log"
81 81
82- "github.com/ebitengine/purego/objc"82+ "github.com/bnema/purego/objc"
83 )83 )
84 84
85 func init() {85 func init() {
M examples/window/main_darwin.go +2 -2
@@ -6,8 +6,8 @@ package main
66 import (
77 "runtime"
88
9- "github.com/ebitengine/purego"
10- "github.com/ebitengine/purego/objc"
9+ "github.com/bnema/purego"
10+ "github.com/bnema/purego/objc"
1111 )
1212
1313 const (
@@ -6,8 +6,8 @@ package main
6 import (6 import (
7 "runtime"7 "runtime"
8 8
9- "github.com/ebitengine/purego"9+ "github.com/bnema/purego"
10- "github.com/ebitengine/purego/objc"10+ "github.com/bnema/purego/objc"
11 )11 )
12 12
13 const (13 const (
M examples/window/main_windows.go +1 -1
@@ -8,7 +8,7 @@ import (
88 "syscall"
99 "unsafe"
1010
11- "github.com/ebitengine/purego"
11+ "github.com/bnema/purego"
1212 )
1313
1414 const (
@@ -8,7 +8,7 @@ import (
8 "syscall"8 "syscall"
9 "unsafe"9 "unsafe"
10 10
11- "github.com/ebitengine/purego"11+ "github.com/bnema/purego"
12 )12 )
13 13
14 const (14 const (
M func.go +2 -2
@@ -13,8 +13,8 @@ import (
1313 "sync"
1414 "unsafe"
1515
16- "github.com/ebitengine/purego/internal/strings"
17- "github.com/ebitengine/purego/internal/xreflect"
16+ "github.com/bnema/purego/internal/strings"
17+ "github.com/bnema/purego/internal/xreflect"
1818 )
1919
2020 const (
@@ -13,8 +13,8 @@ import (
13 "sync"13 "sync"
14 "unsafe"14 "unsafe"
15 15
16- "github.com/ebitengine/purego/internal/strings"16+ "github.com/bnema/purego/internal/strings"
17- "github.com/ebitengine/purego/internal/xreflect"17+ "github.com/bnema/purego/internal/xreflect"
18 )18 )
19 19
20 const (20 const (
M func_test.go +2 -2
@@ -14,8 +14,8 @@ import (
1414 "testing"
1515 "unsafe"
1616
17- "github.com/ebitengine/purego"
18- "github.com/ebitengine/purego/internal/load"
17+ "github.com/bnema/purego"
18+ "github.com/bnema/purego/internal/load"
1919 )
2020
2121 func getSystemLibrary() (string, error) {
@@ -14,8 +14,8 @@ import (
14 "testing"14 "testing"
15 "unsafe"15 "unsafe"
16 16
17- "github.com/ebitengine/purego"17+ "github.com/bnema/purego"
18- "github.com/ebitengine/purego/internal/load"18+ "github.com/bnema/purego/internal/load"
19 )19 )
20 20
21 func getSystemLibrary() (string, error) {21 func getSystemLibrary() (string, error) {
M go.mod +1 -1
@@ -1,3 +1,3 @@
1-module github.com/ebitengine/purego
1+module github.com/bnema/purego
22
33 go 1.18
@@ -1,3 +1,3 @@
1-module github.com/ebitengine/purego1+module github.com/bnema/purego
2 2
3 go 1.183 go 1.18
M internal/buildtest/main.go +1 -1
@@ -6,7 +6,7 @@
66 package main
77
88 import (
9- _ "github.com/ebitengine/purego"
9+ _ "github.com/bnema/purego"
1010 )
1111
1212 import "C"
@@ -6,7 +6,7 @@
6 package main6 package main
7 7
8 import (8 import (
9- _ "github.com/ebitengine/purego"9+ _ "github.com/bnema/purego"
10 )10 )
11 11
12 import "C"12 import "C"
M internal/fakecgo/doc.go +1 -1
@@ -21,7 +21,7 @@
2121 //
2222 // # Usage
2323 //
24-// Using fakecgo is easy just import _ "github.com/ebitengine/purego" and then
24+// Using fakecgo is easy just import _ "github.com/bnema/purego" and then
2525 // set the environment variable CGO_ENABLED=0.
2626 // The recommended usage for fakecgo is to prefer using runtime/cgo if possible
2727 // but if cross-compiling or fast build times are important fakecgo is available.
@@ -21,7 +21,7 @@
21 //21 //
22 // # Usage22 // # Usage
23 //23 //
24-// Using fakecgo is easy just import _ "github.com/ebitengine/purego" and then24+// Using fakecgo is easy just import _ "github.com/bnema/purego" and then
25 // set the environment variable CGO_ENABLED=0.25 // set the environment variable CGO_ENABLED=0.
26 // The recommended usage for fakecgo is to prefer using runtime/cgo if possible26 // The recommended usage for fakecgo is to prefer using runtime/cgo if possible
27 // but if cross-compiling or fast build times are important fakecgo is available.27 // but if cross-compiling or fast build times are important fakecgo is available.
M internal/fakecgo/freebsd.go +1 -1
@@ -15,7 +15,7 @@ import _ "unsafe" // for go:linkname
1515 // Note: when building with cross-compiling or CGO_ENABLED=0, add
1616 // the following argument to `go` so that these symbols are defined by
1717 // making fakecgo the Cgo.
18-// -gcflags="github.com/ebitengine/purego/internal/fakecgo=-std"
18+// -gcflags="github.com/bnema/purego/internal/fakecgo=-std"
1919
2020 //go:linkname _environ environ
2121 //go:linkname _progname __progname
@@ -15,7 +15,7 @@ import _ "unsafe" // for go:linkname
15 // Note: when building with cross-compiling or CGO_ENABLED=0, add15 // Note: when building with cross-compiling or CGO_ENABLED=0, add
16 // the following argument to `go` so that these symbols are defined by16 // the following argument to `go` so that these symbols are defined by
17 // making fakecgo the Cgo.17 // making fakecgo the Cgo.
18-// -gcflags="github.com/ebitengine/purego/internal/fakecgo=-std"18+// -gcflags="github.com/bnema/purego/internal/fakecgo=-std"
19 19
20 //go:linkname _environ environ20 //go:linkname _environ environ
21 //go:linkname _progname __progname21 //go:linkname _progname __progname
M internal/load/load_unix.go +1 -1
@@ -5,7 +5,7 @@
55
66 package load
77
8-import "github.com/ebitengine/purego"
8+import "github.com/bnema/purego"
99
1010 func OpenLibrary(name string) (uintptr, error) {
1111 return purego.Dlopen(name, purego.RTLD_NOW|purego.RTLD_GLOBAL)
@@ -5,7 +5,7 @@
5 5
6 package load6 package load
7 7
8-import "github.com/ebitengine/purego"8+import "github.com/bnema/purego"
9 9
10 func OpenLibrary(name string) (uintptr, error) {10 func OpenLibrary(name string) (uintptr, error) {
11 return purego.Dlopen(name, purego.RTLD_NOW|purego.RTLD_GLOBAL)11 return purego.Dlopen(name, purego.RTLD_NOW|purego.RTLD_GLOBAL)
M nocgo.go +1 -1
@@ -22,4 +22,4 @@ package purego
2222 // importing fakecgo will set these (using //go:linkname) with functions written
2323 // entirely in Go (except for some assembly trampolines to change GCC ABI to Go ABI).
2424 // Doing so makes it possible to build applications that call into C without CGO_ENABLED=1.
25-import _ "github.com/ebitengine/purego/internal/fakecgo"
25+import _ "github.com/bnema/purego/internal/fakecgo"
@@ -22,4 +22,4 @@ package purego
22 // importing fakecgo will set these (using //go:linkname) with functions written22 // importing fakecgo will set these (using //go:linkname) with functions written
23 // entirely in Go (except for some assembly trampolines to change GCC ABI to Go ABI).23 // entirely in Go (except for some assembly trampolines to change GCC ABI to Go ABI).
24 // Doing so makes it possible to build applications that call into C without CGO_ENABLED=1.24 // Doing so makes it possible to build applications that call into C without CGO_ENABLED=1.
25-import _ "github.com/ebitengine/purego/internal/fakecgo"25+import _ "github.com/bnema/purego/internal/fakecgo"
M objc/objc_block_darwin.go +3 -3
@@ -9,8 +9,8 @@ import (
99 "sync"
1010 "unsafe"
1111
12- "github.com/ebitengine/purego"
13- "github.com/ebitengine/purego/internal/xreflect"
12+ "github.com/bnema/purego"
13+ "github.com/bnema/purego/internal/xreflect"
1414 )
1515
1616 const (
@@ -95,7 +95,7 @@ func newBlockFunctionCache() *blockFunctionCache {
9595 // blockCache is a thread safe cache of block layouts.
9696 //
9797 // It takes advantage of the block being the first argument of a block call being the block closure,
98-// only invoking [github.com/ebitengine/purego.NewCallback] when it encounters a new function type (rather than on for every block creation).
98+// only invoking [github.com/bnema/purego.NewCallback] when it encounters a new function type (rather than on for every block creation).
9999 // This should mitigate block creations putting pressure on the callback limit.
100100 type blockCache struct {
101101 sync.Mutex
@@ -9,8 +9,8 @@ import (
9 "sync"9 "sync"
10 "unsafe"10 "unsafe"
11 11
12- "github.com/ebitengine/purego"12+ "github.com/bnema/purego"
13- "github.com/ebitengine/purego/internal/xreflect"13+ "github.com/bnema/purego/internal/xreflect"
14 )14 )
15 15
16 const (16 const (
@@ -95,7 +95,7 @@ func newBlockFunctionCache() *blockFunctionCache {
95 // blockCache is a thread safe cache of block layouts.95 // blockCache is a thread safe cache of block layouts.
96 //96 //
97 // It takes advantage of the block being the first argument of a block call being the block closure,97 // It takes advantage of the block being the first argument of a block call being the block closure,
98-// only invoking [github.com/ebitengine/purego.NewCallback] when it encounters a new function type (rather than on for every block creation).98+// only invoking [github.com/bnema/purego.NewCallback] when it encounters a new function type (rather than on for every block creation).
99 // This should mitigate block creations putting pressure on the callback limit.99 // This should mitigate block creations putting pressure on the callback limit.
100 type blockCache struct {100 type blockCache struct {
101 sync.Mutex101 sync.Mutex
M objc/objc_block_darwin_test.go +2 -2
@@ -7,8 +7,8 @@ import (
77 "fmt"
88 "testing"
99
10- "github.com/ebitengine/purego"
11- "github.com/ebitengine/purego/objc"
10+ "github.com/bnema/purego"
11+ "github.com/bnema/purego/objc"
1212 )
1313
1414 func ExampleNewBlock() {
@@ -7,8 +7,8 @@ import (
7 "fmt"7 "fmt"
8 "testing"8 "testing"
9 9
10- "github.com/ebitengine/purego"10+ "github.com/bnema/purego"
11- "github.com/ebitengine/purego/objc"11+ "github.com/bnema/purego/objc"
12 )12 )
13 13
14 func ExampleNewBlock() {14 func ExampleNewBlock() {
M objc/objc_runtime_darwin.go +3 -3
@@ -16,9 +16,9 @@ import (
1616 "unicode"
1717 "unsafe"
1818
19- "github.com/ebitengine/purego"
20- "github.com/ebitengine/purego/internal/strings"
21- "github.com/ebitengine/purego/internal/xreflect"
19+ "github.com/bnema/purego"
20+ "github.com/bnema/purego/internal/strings"
21+ "github.com/bnema/purego/internal/xreflect"
2222 )
2323
2424 // TODO: support try/catch?
@@ -16,9 +16,9 @@ import (
16 "unicode"16 "unicode"
17 "unsafe"17 "unsafe"
18 18
19- "github.com/ebitengine/purego"19+ "github.com/bnema/purego"
20- "github.com/ebitengine/purego/internal/strings"20+ "github.com/bnema/purego/internal/strings"
21- "github.com/ebitengine/purego/internal/xreflect"21+ "github.com/bnema/purego/internal/xreflect"
22 )22 )
23 23
24 // TODO: support try/catch?24 // TODO: support try/catch?
M objc/objc_runtime_darwin_test.go +2 -2
@@ -9,8 +9,8 @@ import (
99 "reflect"
1010 "testing"
1111
12- "github.com/ebitengine/purego"
13- "github.com/ebitengine/purego/objc"
12+ "github.com/bnema/purego"
13+ "github.com/bnema/purego/objc"
1414 )
1515
1616 func ExampleRegisterClass_helloworld() {
@@ -9,8 +9,8 @@ import (
9 "reflect"9 "reflect"
10 "testing"10 "testing"
11 11
12- "github.com/ebitengine/purego"12+ "github.com/bnema/purego"
13- "github.com/ebitengine/purego/objc"13+ "github.com/bnema/purego/objc"
14 )14 )
15 15
16 func ExampleRegisterClass_helloworld() {16 func ExampleRegisterClass_helloworld() {
M struct_arm64.go +1 -1
@@ -11,7 +11,7 @@ import (
1111 stdstrings "strings"
1212 "unsafe"
1313
14- "github.com/ebitengine/purego/internal/strings"
14+ "github.com/bnema/purego/internal/strings"
1515 )
1616
1717 func getStruct(outType reflect.Type, syscall syscall15Args) (v reflect.Value) {
@@ -11,7 +11,7 @@ import (
11 stdstrings "strings"11 stdstrings "strings"
12 "unsafe"12 "unsafe"
13 13
14- "github.com/ebitengine/purego/internal/strings"14+ "github.com/bnema/purego/internal/strings"
15 )15 )
16 16
17 func getStruct(outType reflect.Type, syscall syscall15Args) (v reflect.Value) {17 func getStruct(outType reflect.Type, syscall syscall15Args) (v reflect.Value) {
M struct_test.go +1 -1
@@ -14,7 +14,7 @@ import (
1414 "testing"
1515 "unsafe"
1616
17- "github.com/ebitengine/purego"
17+ "github.com/bnema/purego"
1818 )
1919
2020 func TestRegisterFunc_structArgs(t *testing.T) {
@@ -14,7 +14,7 @@ import (
14 "testing"14 "testing"
15 "unsafe"15 "unsafe"
16 16
17- "github.com/ebitengine/purego"17+ "github.com/bnema/purego"
18 )18 )
19 19
20 func TestRegisterFunc_structArgs(t *testing.T) {20 func TestRegisterFunc_structArgs(t *testing.T) {
M syscall_32bit_test.go +1 -1
@@ -6,7 +6,7 @@ import (
66 "fmt"
77 "testing"
88
9- "github.com/ebitengine/purego"
9+ "github.com/bnema/purego"
1010 )
1111
1212 func TestSyscallN32BitPanicsAt16Args(t *testing.T) {
@@ -6,7 +6,7 @@ import (
6 "fmt"6 "fmt"
7 "testing"7 "testing"
8 8
9- "github.com/ebitengine/purego"9+ "github.com/bnema/purego"
10 )10 )
11 11
12 func TestSyscallN32BitPanicsAt16Args(t *testing.T) {12 func TestSyscallN32BitPanicsAt16Args(t *testing.T) {
M syscall_bench_test.go +2 -2
@@ -9,8 +9,8 @@ import (
99 "path/filepath"
1010 "testing"
1111
12- "github.com/ebitengine/purego"
13- "github.com/ebitengine/purego/internal/load"
12+ "github.com/bnema/purego"
13+ "github.com/bnema/purego/internal/load"
1414 )
1515
1616 // BenchmarkCallingMethods compares RegisterFunc, SyscallN, and Callback methods
@@ -9,8 +9,8 @@ import (
9 "path/filepath"9 "path/filepath"
10 "testing"10 "testing"
11 11
12- "github.com/ebitengine/purego"12+ "github.com/bnema/purego"
13- "github.com/ebitengine/purego/internal/load"13+ "github.com/bnema/purego/internal/load"
14 )14 )
15 15
16 // BenchmarkCallingMethods compares RegisterFunc, SyscallN, and Callback methods16 // BenchmarkCallingMethods compares RegisterFunc, SyscallN, and Callback methods
M syscall_cgo_linux.go +1 -1
@@ -6,7 +6,7 @@
66 package purego
77
88 import (
9- "github.com/ebitengine/purego/internal/cgo"
9+ "github.com/bnema/purego/internal/cgo"
1010 )
1111
1212 var syscall15XABI0 = uintptr(cgo.Syscall15XABI0)
@@ -6,7 +6,7 @@
6 package purego6 package purego
7 7
8 import (8 import (
9- "github.com/ebitengine/purego/internal/cgo"9+ "github.com/bnema/purego/internal/cgo"
10 )10 )
11 11
12 var syscall15XABI0 = uintptr(cgo.Syscall15XABI0)12 var syscall15XABI0 = uintptr(cgo.Syscall15XABI0)
M syscall_linux_test.go +1 -1
@@ -16,7 +16,7 @@ import (
1616 "testing"
1717 "unsafe"
1818
19- "github.com/ebitengine/purego"
19+ "github.com/bnema/purego"
2020 )
2121
2222 func TestAllThreadsSyscall(t *testing.T) {
@@ -16,7 +16,7 @@ import (
16 "testing"16 "testing"
17 "unsafe"17 "unsafe"
18 18
19- "github.com/ebitengine/purego"19+ "github.com/bnema/purego"
20 )20 )
21 21
22 func TestAllThreadsSyscall(t *testing.T) {22 func TestAllThreadsSyscall(t *testing.T) {
M syscall_test.go +2 -2
@@ -10,8 +10,8 @@ import (
1010 "testing"
1111 "unsafe"
1212
13- "github.com/ebitengine/purego"
14- "github.com/ebitengine/purego/internal/load"
13+ "github.com/bnema/purego"
14+ "github.com/bnema/purego/internal/load"
1515 )
1616
1717 func TestOS(t *testing.T) {
@@ -10,8 +10,8 @@ import (
10 "testing"10 "testing"
11 "unsafe"11 "unsafe"
12 12
13- "github.com/ebitengine/purego"13+ "github.com/bnema/purego"
14- "github.com/ebitengine/purego/internal/load"14+ "github.com/bnema/purego/internal/load"
15 )15 )
16 16
17 func TestOS(t *testing.T) {17 func TestOS(t *testing.T) {

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 102

↑↓ moveenter openesc close