go-libwebp

Experimental translation from libwebp to Go source.
Log | Files | Refs | README | LICENSE

commit 66763fde44257f5366633282ba6124b166f250a5
parent 75195ca41678d8ff1d21aafe03b0dec5bdd03f7e
Author: Jack Mordaunt <jackmordaunt.dev@gmail.com>
Date:   Thu,  7 Mar 2024 15:41:58 +0800

lib/dynamic/webp: actually use library name param

Signed-off-by: Jack Mordaunt <jackmordaunt.dev@gmail.com>

Diffstat:
Mlib/dynamic/webp/dlopen_unix.go | 2+-
Mlib/dynamic/webp/dlopen_windows.go | 2+-
Mlib/dynamic/webp/lib.go | 2+-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/dynamic/webp/dlopen_unix.go b/lib/dynamic/webp/dlopen_unix.go @@ -5,5 +5,5 @@ package webp import "github.com/ebitengine/purego" func dlopen(name string) (uintptr, error) { - return purego.Dlopen(libraryName, purego.RTLD_LAZY|purego.RTLD_LOCAL) + return purego.Dlopen(name, purego.RTLD_LAZY|purego.RTLD_LOCAL) } diff --git a/lib/dynamic/webp/dlopen_windows.go b/lib/dynamic/webp/dlopen_windows.go @@ -5,7 +5,7 @@ package webp import "golang.org/x/sys/windows" func dlopen(name string) (uintptr, error) { - dll, err := windows.LoadDLL(libraryName) + dll, err := windows.LoadDLL(name) if err != nil { return 0, err } diff --git a/lib/dynamic/webp/lib.go b/lib/dynamic/webp/lib.go @@ -33,7 +33,7 @@ func genericLibraryName() string { func loadLibrary() (uintptr, error) { handle, err := dlopen(libraryName) if err != nil { - handle, err = dlopen(genericLibraryName()) + return dlopen(genericLibraryName()) } return handle, err }