You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The generated Strv class incorrectly interprets gchar** (a pointer to an array of strings) as an alias for a single String. This misinterpretation can lead to incorrect data handling, as gchar** should be represented as a list or array of strings, not as a single string.
Generated Class:
/** * A typedef alias for gchar**. This is mostly useful when used together with * {@code g_auto()}. */@Generated("io.github.jwharm.JavaGI")
publicclassStrvextendsAlias<String> {
/** * Create a new Strv with the provided value */publicStrv(Stringvalue) {
super(value);
}
publicstaticStrv[] fromNativeArray(MemorySegmentaddress, longlength, booleanfree) {
Strv[] array = newStrv[(int) length];
longbyteSize = ValueLayout.ADDRESS.byteSize();
MemorySegmentsegment = address.reinterpret(byteSize * length);
for (inti = 0; i < length; i++) {
array[i] = newStrv(Interop.getStringFrom(segment.get(ValueLayout.ADDRESS, i * byteSize), free));
}
if (free) GLib.free(address);
returnarray;
}
}
The text was updated successfully, but these errors were encountered:
The generated
Strv
class incorrectly interpretsgchar**
(a pointer to an array of strings) as an alias for a singleString
. This misinterpretation can lead to incorrect data handling, asgchar**
should be represented as a list or array of strings, not as a single string.Generated Class:
The text was updated successfully, but these errors were encountered: