Skip to content

Commit 6160a58

Browse files
committed
Fix handling native objects in NativePtrToPythonNode
1 parent eb0319b commit 6160a58

File tree

1 file changed

+2
-2
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/capi/transitions

1 file changed

+2
-2
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/capi/transitions/CApiTransitions.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,7 +1560,7 @@ Object doNonWrapper(long pointer, boolean stealing,
15601560
Object ref = lookup.get();
15611561
if (createNativeProfile.profile(inliningTarget, ref == null)) {
15621562
LOGGER.fine(() -> "re-creating collected PythonAbstractNativeObject reference" + Long.toHexString(pointer));
1563-
return createAbstractNativeObject(nativeContext, pointer, stealing, pointer);
1563+
return createAbstractNativeObject(nativeContext, new NativePointer(pointer), stealing, pointer);
15641564
}
15651565
if (isNativeWrapperProfile.profile(inliningTarget, ref instanceof PythonNativeWrapper)) {
15661566
wrapper = (PythonNativeWrapper) ref;
@@ -1572,7 +1572,7 @@ Object doNonWrapper(long pointer, boolean stealing,
15721572
return result;
15731573
}
15741574
} else {
1575-
return createAbstractNativeObject(nativeContext, pointer, stealing, pointer);
1575+
return createAbstractNativeObject(nativeContext, new NativePointer(pointer), stealing, pointer);
15761576
}
15771577
}
15781578
return NativeToPythonNode.handleWrapper(inliningTarget, wrapperProfile, stealing, wrapper);

0 commit comments

Comments
 (0)