File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -404,7 +404,7 @@ long doLongNativeWrapper(LongNativeWrapper object) {
404
404
return object .getValue ();
405
405
}
406
406
407
- @ Specialization (guards = " object.isNative()" )
407
+ @ Specialization (guards = { "isPrimitiveNativeWrapper( object)" , "object .isNative()"} )
408
408
Object doPrimitiveNativeWrapper (PrimitiveNativeWrapper object ) {
409
409
return getMaterializeNode ().execute (object );
410
410
}
@@ -473,7 +473,7 @@ Object run(Object obj) {
473
473
}
474
474
475
475
protected static boolean isPrimitiveNativeWrapper (PythonNativeWrapper object ) {
476
- return object instanceof PrimitiveNativeWrapper ;
476
+ return object instanceof PrimitiveNativeWrapper && !( object instanceof BoolNativeWrapper ) ;
477
477
}
478
478
479
479
protected boolean isForeignObject (TruffleObject obj , GetLazyClassNode getClassNode , IsBuiltinClassProfile isForeignClassProfile ) {
Original file line number Diff line number Diff line change @@ -316,7 +316,7 @@ def PyList_Size(listObj):
316
316
317
317
@may_raise (- 1 )
318
318
def PyLong_AsPrimitive (n , signed , size ):
319
- return TrufflePInt_AsPrimitive (n , signed , size )
319
+ return TrufflePInt_AsPrimitive (int ( n ) , signed , size )
320
320
321
321
322
322
def _PyLong_Sign (n ):
You can’t perform that action at this time.
0 commit comments