Skip to content

Commit cfd64d3

Browse files
committed
Fix: ternary wrapper needs to pass None instead of NULL
1 parent d39d920 commit cfd64d3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,8 @@ private Object getArg2(VirtualFrame frame) {
528528
CompilerDirectives.transferToInterpreterAndInvalidate();
529529
readArg2Node = insert(ReadIndexedArgumentNode.create(2));
530530
}
531-
return readArg2Node.execute(frame);
531+
Object arg2 = readArg2Node.execute(frame);
532+
return arg2 != PNone.NO_VALUE ? arg2 : PNone.NONE;
532533
}
533534

534535
@Override

0 commit comments

Comments
 (0)