Skip to content

Commit 1b85b80

Browse files
committed
Fix: PyCapsule.getName() returns pointer
1 parent d3dd112 commit 1b85b80

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3232,7 +3232,6 @@ Object execute(Object[] arguments,
32323232
@CachedLibrary(limit = "1") InteropLibrary interopLib,
32333233
@Cached FromCharPointerNode fromCharPointerNode,
32343234
@Cached CastToTruffleStringNode castStr,
3235-
@Cached EncodeNativeStringNode encodeNativeStringNode,
32363235
@Cached TruffleString.EqualNode equalNode,
32373236
@Cached CastToJavaIntExactNode castInt,
32383237
@Cached PRaiseNode raiseNode,
@@ -3257,7 +3256,7 @@ Object execute(Object[] arguments,
32573256
result = pyCapsule.getContext();
32583257
break;
32593258
case CapsuleKey.Name:
3260-
result = new CByteArrayWrapper(encodeNativeStringNode.execute(StandardCharsets.UTF_8, pyCapsule.getName(), T_STRICT));
3259+
result = pyCapsule.getName();
32613260
break;
32623261
case CapsuleKey.Destructor:
32633262
result = pyCapsule.getDestructor();

0 commit comments

Comments
 (0)