Skip to content

Commit

Permalink
fix(core) dlerror decoding. Close LWJGL#738
Browse files Browse the repository at this point in the history
  • Loading branch information
kb-1000 authored and Spasi committed Feb 24, 2022
1 parent 90f1327 commit f28e4ea
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions doc/notes/3.3.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This build includes the following changes:
#### Fixes

- Core: Fixed Java/native library incompatibility detection. (#737)
- Core: Fixed `dlerror` decoding to use UTF-8. (#738)
- Build: Fixed offline mode with multiple local architectures. (#740)

#### Breaking Changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public static long dlopen(@Nullable @NativeType("char const *") CharSequence fil
@NativeType("char *")
public static String dlerror() {
long __result = ndlerror();
return memASCIISafe(__result);
return memUTF8Safe(__result);
}

// --- [ dlsym ] ---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public static long dlopen(@Nullable @NativeType("char const *") CharSequence pat
@NativeType("char const *")
public static String dlerror() {
long __result = ndlerror();
return memASCIISafe(__result);
return memUTF8Safe(__result);
}

// --- [ dlsym ] ---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ val dlfcn = "DynamicLinkLoader".nativeClass(Module.CORE_LINUX, nativeSubPath = "
int("mode", "a bitfield", Modes, LinkMode.BITFIELD)
)

charASCII.p(
charUTF8.p(
"dlerror",
"""
Returns a human readable string describing the most recent error that occurred from #dlopen(), #dlsym() or #dlclose() since
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ val dlfcn = "DynamicLinkLoader".nativeClass(Module.CORE_MACOS, nativeSubPath = "
)
)

charASCII.const.p(
charUTF8.const.p(
"dlerror",
"""
Provides diagnostic information corresponding to problems with calls to #dlopen(), #dlsym(), and #dlclose() in the same thread.
Expand Down

0 comments on commit f28e4ea

Please sign in to comment.