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) {
404404 return object .getValue ();
405405 }
406406
407- @ Specialization (guards = " object.isNative()" )
407+ @ Specialization (guards = { "isPrimitiveNativeWrapper( object)" , "object .isNative()"} )
408408 Object doPrimitiveNativeWrapper (PrimitiveNativeWrapper object ) {
409409 return getMaterializeNode ().execute (object );
410410 }
@@ -473,7 +473,7 @@ Object run(Object obj) {
473473 }
474474
475475 protected static boolean isPrimitiveNativeWrapper (PythonNativeWrapper object ) {
476- return object instanceof PrimitiveNativeWrapper ;
476+ return object instanceof PrimitiveNativeWrapper && !( object instanceof BoolNativeWrapper ) ;
477477 }
478478
479479 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):
316316
317317@may_raise (- 1 )
318318def PyLong_AsPrimitive (n , signed , size ):
319- return TrufflePInt_AsPrimitive (n , signed , size )
319+ return TrufflePInt_AsPrimitive (int ( n ) , signed , size )
320320
321321
322322def _PyLong_Sign (n ):
You can’t perform that action at this time.
0 commit comments