Skip to content

Commit 913a706

Browse files
committed
fix jni fastpath GetitemI for object storage with primitive contents
1 parent 802534b commit 913a706

File tree

1 file changed

+5
-0
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/hpy

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1621,6 +1621,11 @@ public final long ctxGetItemi(long hCollection, long lidx) {
16211621
return GraalHPyBoxing.boxHandle(createHandle(lresult).getId(this, ConditionProfile.getUncached()));
16221622
} else if (storage instanceof ObjectSequenceStorage) {
16231623
Object result = ((ObjectSequenceStorage) storage).getItemNormalized(idx);
1624+
if (result instanceof Integer) {
1625+
return GraalHPyBoxing.boxInt((int) result);
1626+
} else if (result instanceof Double) {
1627+
return GraalHPyBoxing.boxDouble((double) result);
1628+
}
16241629
return GraalHPyBoxing.boxHandle(createHandle(result).getId(this, ConditionProfile.getUncached()));
16251630
}
16261631
// TODO: other storages...

0 commit comments

Comments
 (0)