detached dea872e

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

commit
dea872ea3a91644cf8d37d6009b08d2036dd3b74
author
brice · · 2026-09-27 05:38 UTC
parent
440e526
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
34 files · +58 -58
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 ./...
@@ -105,10 +105,10 @@ jobs:
105105 go mod init foo
106106 echo 'package main' > main.go
107107 echo 'import (' >> main.go
108- echo ' _ "github.com/ebitengine/purego"' >> main.go
108+ echo ' _ "github.com/bnema/purego"' >> main.go
109109 echo ')' >> main.go
110110 echo 'func main() {}' >> main.go
111- go mod edit -replace github.com/ebitengine/purego=$GITHUB_WORKSPACE
111+ go mod edit -replace github.com/bnema/purego=$GITHUB_WORKSPACE
112112 go mod tidy
113113 go mod vendor
114114 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 ./...
@@ -105,10 +105,10 @@ jobs:
105 go mod init foo105 go mod init foo
106 echo 'package main' > main.go106 echo 'package main' > main.go
107 echo 'import (' >> main.go107 echo 'import (' >> main.go
108- echo ' _ "github.com/ebitengine/purego"' >> main.go108+ echo ' _ "github.com/bnema/purego"' >> main.go
109 echo ')' >> main.go109 echo ')' >> main.go
110 echo 'func main() {}' >> main.go110 echo 'func main() {}' >> main.go
111- go mod edit -replace github.com/ebitengine/purego=$GITHUB_WORKSPACE111+ go mod edit -replace github.com/bnema/purego=$GITHUB_WORKSPACE
112 go mod tidy112 go mod tidy
113 go mod vendor113 go mod vendor
114 go build -v .114 go build -v .
M README.md +4 -4
@@ -1,5 +1,5 @@
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
@@ -51,7 +51,7 @@ Tier 2 platforms are supported by PureGo on a best-effort basis. Critical bugs o
5151 1. These architectures require CGO_ENABLED=1 to compile
5252 2. These architectures support passing structs by value as arguments and return values when calling C functions, but not in callbacks created with `NewCallback`
5353 3. These architectures do not support passing structs by value as arguments or return values
54-4. These architectures require the special flag `-gcflags="github.com/ebitengine/purego/internal/fakecgo=-std"` to compile with CGO_ENABLED=0
54+4. These architectures require the special flag `-gcflags="github.com/bnema/purego/internal/fakecgo=-std"` to compile with CGO_ENABLED=0
5555 5. These architectures require CGO_ENABLED=1 to compile in versions before Go 1.27, but will be supported without Cgo in Go 1.27 and later
5656 6. These architectures only support `SyscallN` and `NewCallback`
5757 7. These architectures are no longer supported as of Go 1.26
@@ -59,7 +59,7 @@ Tier 2 platforms are supported by PureGo on a best-effort basis. Critical bugs o
5959 ## Example
6060
6161 The example below only showcases purego use for macOS and Linux. The other platforms require special handling which can
62-be seen in the complete example at [examples/libc](https://github.com/ebitengine/purego/tree/main/examples/libc) which supports FreeBSD and Windows.
62+be seen in the complete example at [examples/libc](https://github.com/bnema/purego/tree/main/examples/libc) which supports FreeBSD and Windows.
6363
6464 ```go
6565 package main
@@ -68,7 +68,7 @@ import (
6868 "fmt"
6969 "runtime"
7070
71- "github.com/ebitengine/purego"
71+ "github.com/bnema/purego"
7272 )
7373
7474 func getSystemLibrary() string {
@@ -1,5 +1,5 @@
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
@@ -51,7 +51,7 @@ Tier 2 platforms are supported by PureGo on a best-effort basis. Critical bugs o
51 1. These architectures require CGO_ENABLED=1 to compile51 1. These architectures require CGO_ENABLED=1 to compile
52 2. These architectures support passing structs by value as arguments and return values when calling C functions, but not in callbacks created with `NewCallback`52 2. These architectures support passing structs by value as arguments and return values when calling C functions, but not in callbacks created with `NewCallback`
53 3. These architectures do not support passing structs by value as arguments or return values53 3. These architectures do not support passing structs by value as arguments or return values
54-4. These architectures require the special flag `-gcflags="github.com/ebitengine/purego/internal/fakecgo=-std"` to compile with CGO_ENABLED=054+4. These architectures require the special flag `-gcflags="github.com/bnema/purego/internal/fakecgo=-std"` to compile with CGO_ENABLED=0
55 5. These architectures require CGO_ENABLED=1 to compile in versions before Go 1.27, but will be supported without Cgo in Go 1.27 and later55 5. These architectures require CGO_ENABLED=1 to compile in versions before Go 1.27, but will be supported without Cgo in Go 1.27 and later
56 6. These architectures only support `SyscallN` and `NewCallback`56 6. These architectures only support `SyscallN` and `NewCallback`
57 7. These architectures are no longer supported as of Go 1.2657 7. These architectures are no longer supported as of Go 1.26
@@ -59,7 +59,7 @@ Tier 2 platforms are supported by PureGo on a best-effort basis. Critical bugs o
59 ## Example59 ## Example
60 60
61 The example below only showcases purego use for macOS and Linux. The other platforms require special handling which can61 The example below only showcases purego use for macOS and Linux. The other platforms require special handling which can
62-be seen in the complete example at [examples/libc](https://github.com/ebitengine/purego/tree/main/examples/libc) which supports FreeBSD and Windows.62+be seen in the complete example at [examples/libc](https://github.com/bnema/purego/tree/main/examples/libc) which supports FreeBSD and Windows.
63 63
64 ```go64 ```go
65 package main65 package main
@@ -68,7 +68,7 @@ import (
68 "fmt"68 "fmt"
69 "runtime"69 "runtime"
70 70
71- "github.com/ebitengine/purego"71+ "github.com/bnema/purego"
72 )72 )
73 73
74 func getSystemLibrary() string {74 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 cstrings/nsstrings_darwin.go +3 -3
@@ -6,9 +6,9 @@ package cstrings
66 import (
77 "fmt"
88
9- "github.com/ebitengine/purego"
10- "github.com/ebitengine/purego/internal/strings"
11- "github.com/ebitengine/purego/objc"
9+ "github.com/bnema/purego"
10+ "github.com/bnema/purego/internal/strings"
11+ "github.com/bnema/purego/objc"
1212 )
1313
1414 var (
@@ -6,9 +6,9 @@ package cstrings
6 import (6 import (
7 "fmt"7 "fmt"
8 8
9- "github.com/ebitengine/purego"9+ "github.com/bnema/purego"
10- "github.com/ebitengine/purego/internal/strings"10+ "github.com/bnema/purego/internal/strings"
11- "github.com/ebitengine/purego/objc"11+ "github.com/bnema/purego/objc"
12 )12 )
13 13
14 var (14 var (
M cstrings/nsstrings_darwin_test.go +2 -2
@@ -6,8 +6,8 @@ package cstrings_test
66 import (
77 "testing"
88
9- "github.com/ebitengine/purego/cstrings"
10- "github.com/ebitengine/purego/objc"
9+ "github.com/bnema/purego/cstrings"
10+ "github.com/bnema/purego/objc"
1111 )
1212
1313 func TestNSStringToString(t *testing.T) {
@@ -6,8 +6,8 @@ package cstrings_test
6 import (6 import (
7 "testing"7 "testing"
8 8
9- "github.com/ebitengine/purego/cstrings"9+ "github.com/bnema/purego/cstrings"
10- "github.com/ebitengine/purego/objc"10+ "github.com/bnema/purego/objc"
11 )11 )
12 12
13 func TestNSStringToString(t *testing.T) {13 func TestNSStringToString(t *testing.T) {
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
@@ -12,7 +12,7 @@ import (
1212 "testing"
1313 "unsafe"
1414
15- "github.com/ebitengine/purego"
15+ "github.com/bnema/purego"
1616 )
1717
1818 func TestSimpleDlsym(t *testing.T) {
@@ -12,7 +12,7 @@ import (
12 "testing"12 "testing"
13 "unsafe"13 "unsafe"
14 14
15- "github.com/ebitengine/purego"15+ "github.com/bnema/purego"
16 )16 )
17 17
18 func TestSimpleDlsym(t *testing.T) {18 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
@@ -7,8 +7,8 @@ import (
77 "runtime"
88 "structs"
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 const (
@@ -7,8 +7,8 @@ import (
7 "runtime"7 "runtime"
8 "structs"8 "structs"
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 const (14 const (
M examples/window/main_windows.go +1 -1
@@ -9,7 +9,7 @@ import (
99 "syscall"
1010 "unsafe"
1111
12- "github.com/ebitengine/purego"
12+ "github.com/bnema/purego"
1313 )
1414
1515 const (
@@ -9,7 +9,7 @@ import (
9 "syscall"9 "syscall"
10 "unsafe"10 "unsafe"
11 11
12- "github.com/ebitengine/purego"12+ "github.com/bnema/purego"
13 )13 )
14 14
15 const (15 const (
M func.go +1 -1
@@ -14,7 +14,7 @@ import (
1414 "sync"
1515 "unsafe"
1616
17- "github.com/ebitengine/purego/internal/strings"
17+ "github.com/bnema/purego/internal/strings"
1818 )
1919
2020 const (
@@ -14,7 +14,7 @@ import (
14 "sync"14 "sync"
15 "unsafe"15 "unsafe"
16 16
17- "github.com/ebitengine/purego/internal/strings"17+ "github.com/bnema/purego/internal/strings"
18 )18 )
19 19
20 const (20 const (
M func_test.go +2 -2
@@ -20,8 +20,8 @@ import (
2020 "testing"
2121 "unsafe"
2222
23- "github.com/ebitengine/purego"
24- "github.com/ebitengine/purego/internal/load"
23+ "github.com/bnema/purego"
24+ "github.com/bnema/purego/internal/load"
2525 )
2626
2727 func getSystemLibrary() (string, error) {
@@ -20,8 +20,8 @@ import (
20 "testing"20 "testing"
21 "unsafe"21 "unsafe"
22 22
23- "github.com/ebitengine/purego"23+ "github.com/bnema/purego"
24- "github.com/ebitengine/purego/internal/load"24+ "github.com/bnema/purego/internal/load"
25 )25 )
26 26
27 func getSystemLibrary() (string, error) {27 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.25.0
@@ -1,3 +1,3 @@
1-module github.com/ebitengine/purego1+module github.com/bnema/purego
2 2
3 go 1.25.03 go 1.25.0
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 +2 -2
@@ -10,7 +10,7 @@ import (
1010 "sync"
1111 "unsafe"
1212
13- "github.com/ebitengine/purego"
13+ "github.com/bnema/purego"
1414 )
1515
1616 const (
@@ -100,7 +100,7 @@ func newBlockFunctionCache() *blockFunctionCache {
100100 // blockCache is a thread safe cache of block layouts.
101101 //
102102 // It takes advantage of the block being the first argument of a block call being the block closure,
103-// only invoking [github.com/ebitengine/purego.NewCallback] when it encounters a new function type (rather than on for every block creation).
103+// only invoking [github.com/bnema/purego.NewCallback] when it encounters a new function type (rather than on for every block creation).
104104 // This should mitigate block creations putting pressure on the callback limit.
105105 type blockCache struct {
106106 sync.Mutex
@@ -10,7 +10,7 @@ import (
10 "sync"10 "sync"
11 "unsafe"11 "unsafe"
12 12
13- "github.com/ebitengine/purego"13+ "github.com/bnema/purego"
14 )14 )
15 15
16 const (16 const (
@@ -100,7 +100,7 @@ func newBlockFunctionCache() *blockFunctionCache {
100 // blockCache is a thread safe cache of block layouts.100 // blockCache is a thread safe cache of block layouts.
101 //101 //
102 // It takes advantage of the block being the first argument of a block call being the block closure,102 // It takes advantage of the block being the first argument of a block call being the block closure,
103-// only invoking [github.com/ebitengine/purego.NewCallback] when it encounters a new function type (rather than on for every block creation).103+// only invoking [github.com/bnema/purego.NewCallback] when it encounters a new function type (rather than on for every block creation).
104 // This should mitigate block creations putting pressure on the callback limit.104 // This should mitigate block creations putting pressure on the callback limit.
105 type blockCache struct {105 type blockCache struct {
106 sync.Mutex106 sync.Mutex
M objc/objc_block_darwin_test.go +2 -2
@@ -8,8 +8,8 @@ import (
88 "structs"
99 "testing"
1010
11- "github.com/ebitengine/purego"
12- "github.com/ebitengine/purego/objc"
11+ "github.com/bnema/purego"
12+ "github.com/bnema/purego/objc"
1313 )
1414
1515 func ExampleNewBlock() {
@@ -8,8 +8,8 @@ import (
8 "structs"8 "structs"
9 "testing"9 "testing"
10 10
11- "github.com/ebitengine/purego"11+ "github.com/bnema/purego"
12- "github.com/ebitengine/purego/objc"12+ "github.com/bnema/purego/objc"
13 )13 )
14 14
15 func ExampleNewBlock() {15 func ExampleNewBlock() {
M objc/objc_runtime_darwin.go +2 -2
@@ -18,8 +18,8 @@ import (
1818 "unicode"
1919 "unsafe"
2020
21- "github.com/ebitengine/purego"
22- "github.com/ebitengine/purego/internal/strings"
21+ "github.com/bnema/purego"
22+ "github.com/bnema/purego/internal/strings"
2323 )
2424
2525 var hostLayoutType = reflect.TypeFor[structs.HostLayout]()
@@ -18,8 +18,8 @@ import (
18 "unicode"18 "unicode"
19 "unsafe"19 "unsafe"
20 20
21- "github.com/ebitengine/purego"21+ "github.com/bnema/purego"
22- "github.com/ebitengine/purego/internal/strings"22+ "github.com/bnema/purego/internal/strings"
23 )23 )
24 24
25 var hostLayoutType = reflect.TypeFor[structs.HostLayout]()25 var hostLayoutType = reflect.TypeFor[structs.HostLayout]()
M objc/objc_runtime_darwin_test.go +2 -2
@@ -10,8 +10,8 @@ import (
1010 "structs"
1111 "testing"
1212
13- "github.com/ebitengine/purego"
14- "github.com/ebitengine/purego/objc"
13+ "github.com/bnema/purego"
14+ "github.com/bnema/purego/objc"
1515 )
1616
1717 func ExampleRegisterClass_helloworld() {
@@ -10,8 +10,8 @@ import (
10 "structs"10 "structs"
11 "testing"11 "testing"
12 12
13- "github.com/ebitengine/purego"13+ "github.com/bnema/purego"
14- "github.com/ebitengine/purego/objc"14+ "github.com/bnema/purego/objc"
15 )15 )
16 16
17 func ExampleRegisterClass_helloworld() {17 func ExampleRegisterClass_helloworld() {
M objc/super_darwin_test.go +2 -2
@@ -12,8 +12,8 @@ import (
1212 "sync/atomic"
1313 "testing"
1414
15- "github.com/ebitengine/purego"
16- "github.com/ebitengine/purego/objc"
15+ "github.com/bnema/purego"
16+ "github.com/bnema/purego/objc"
1717 )
1818
1919 var superTestClassID atomic.Uint64
@@ -12,8 +12,8 @@ import (
12 "sync/atomic"12 "sync/atomic"
13 "testing"13 "testing"
14 14
15- "github.com/ebitengine/purego"15+ "github.com/bnema/purego"
16- "github.com/ebitengine/purego/objc"16+ "github.com/bnema/purego/objc"
17 )17 )
18 18
19 var superTestClassID atomic.Uint6419 var superTestClassID atomic.Uint64
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 // structReturnInMemory always reports false on arm64: a struct returned in
@@ -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 // structReturnInMemory always reports false on arm64: a struct returned in17 // structReturnInMemory always reports false on arm64: a struct returned in
M struct_test.go +2 -2
@@ -17,8 +17,8 @@ import (
1717 "testing"
1818 "unsafe"
1919
20- "github.com/ebitengine/purego"
21- "github.com/ebitengine/purego/internal/load"
20+ "github.com/bnema/purego"
21+ "github.com/bnema/purego/internal/load"
2222 )
2323
2424 func TestRegisterFunc_structArgs(t *testing.T) {
@@ -17,8 +17,8 @@ import (
17 "testing"17 "testing"
18 "unsafe"18 "unsafe"
19 19
20- "github.com/ebitengine/purego"20+ "github.com/bnema/purego"
21- "github.com/ebitengine/purego/internal/load"21+ "github.com/bnema/purego/internal/load"
22 )22 )
23 23
24 func TestRegisterFunc_structArgs(t *testing.T) {24 func TestRegisterFunc_structArgs(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 syscallXABI0 = uintptr(cgo.SyscallXABI0)
@@ -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 syscallXABI0 = uintptr(cgo.SyscallXABI0)12 var syscallXABI0 = uintptr(cgo.SyscallXABI0)
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
@@ -9,8 +9,8 @@ import (
99 "runtime"
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 func TestOS(t *testing.T) {
@@ -9,8 +9,8 @@ import (
9 "runtime"9 "runtime"
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 func TestOS(t *testing.T) {16 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