Skip to content

Commit f8c7742

Browse files
hajimehoshiTotallyGamerJet
authored andcommitted
all: remove dependencies on golang.org/x/sys (ebitengine#271)
The example still has the dependency on golang.org/x/sys. Updates ebitengine#270
1 parent f37da23 commit f8c7742

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

internal/load/load_windows.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33

44
package load
55

6-
import "golang.org/x/sys/windows"
6+
import (
7+
"syscall"
8+
)
79

810
func OpenLibrary(name string) (uintptr, error) {
9-
handle, err := windows.LoadLibrary(name)
11+
handle, err := syscall.LoadLibrary(name)
1012
return uintptr(handle), err
1113
}
1214

1315
func OpenSymbol(lib uintptr, name string) (uintptr, error) {
14-
return windows.GetProcAddress(windows.Handle(lib), name)
16+
return syscall.GetProcAddress(syscall.Handle(lib), name)
1517
}

syscall_windows.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ package purego
66
import (
77
"reflect"
88
"syscall"
9-
10-
"golang.org/x/sys/windows"
119
)
1210

1311
var syscall15XABI0 uintptr
@@ -44,5 +42,5 @@ func NewCallback(fn interface{}) uintptr {
4442
}
4543

4644
func loadSymbol(handle uintptr, name string) (uintptr, error) {
47-
return windows.GetProcAddress(windows.Handle(handle), name)
45+
return syscall.GetProcAddress(syscall.Handle(handle), name)
4846
}

0 commit comments

Comments
 (0)