Skip to content

Commit 42f2eb9

Browse files
committed
Fix: wrap result into HPy handle
1 parent bc60c9b commit 42f2eb9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/hpy/GraalHPyContextFunctions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1263,7 +1263,7 @@ Object execute(Object[] arguments,
12631263
if (withSize) {
12641264
size = castToJavaIntNode.execute(arguments[2]);
12651265
if (size == 0) {
1266-
return factory.createBytes(new byte[size]);
1266+
return asHandleNode.execute(context, factory.createBytes(new byte[size]));
12671267
}
12681268
} else {
12691269
size = castToJavaIntNode.execute(callHelperNode.call(context, GraalHPyNativeSymbol.GRAAL_HPY_STRLEN, charPtr));

0 commit comments

Comments
 (0)