Skip to content

Commit

Permalink
Merge pull request #26 from Over-Run/update
Browse files Browse the repository at this point in the history
  • Loading branch information
squid233 authored Dec 6, 2024
2 parents 65fe677 + af0c7c0 commit 9690cf1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Import as a Gradle dependency:

```groovy
dependencies {
implementation("io.github.over-run:marshal:0.1.0-alpha.36-jdk23")
implementation("io.github.over-run:marshal:0.1.0-alpha.38-jdk23")
}
```

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ projGroupId=io.github.over-run
projArtifactId=marshal
# The project name should only contain lowercase letters, numbers and hyphen.
projName=marshal
projVersion=0.1.0-alpha.37-jdk23
projVersion=0.1.0-alpha.38-jdk23
projDesc=Marshal allows you to conveniently create native library bindings with FFM API.
# Uncomment them if you want to publish to maven repository.
projUrl=https://github.com/Over-Run/marshal
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/overrun/marshal/Unmarshal.java
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ public static boolean unmarshalAsBoolean(double v) {
* @return the array
*/
public static String @Nullable [] unmarshalAsStringArray(AddressLayout elementLayout, MemorySegment segment, Charset charset) {
return unmarshal(elementLayout, segment, String[]::new, s -> s.get(STR_LAYOUT, 0L).getString(0L, charset));
return unmarshal(elementLayout, segment, String[]::new, s -> unmarshalStringPointer(s, charset));
}

/**
Expand Down Expand Up @@ -567,7 +567,7 @@ public static void copy(MemorySegment src, String @Nullable [] dst) {
public static void copy(MemorySegment src, String @Nullable [] dst, Charset charset) {
if (isNullPointer(src) || dst == null) return;
for (int i = 0; i < dst.length; i++) {
dst[i] = ((MemorySegment) vh_stringArray.get(src, (long) i)).getString(0L, charset);
dst[i] = unmarshalAsString(((MemorySegment) vh_stringArray.get(src, (long) i)), charset);
}
}

Expand Down

0 comments on commit 9690cf1

Please sign in to comment.