Skip to content

Commit c722323

Browse files
committed
always fall back to original_Long for augment_Long
1 parent 9b9ccc8 commit c722323

File tree

1 file changed

+2
-3
lines changed
  • graalpython/com.oracle.graal.python.jni/src

1 file changed

+2
-3
lines changed

graalpython/com.oracle.graal.python.jni/src/hpy_jni.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,14 +280,13 @@ static void *augment_AsStruct(HPyContext *ctx, HPy h) {
280280

281281
static HPy augment_Long(HPyContext *ctx, HPy h) {
282282
uint64_t bits = toBits(h);
283-
if (isBoxedHandle(bits)) {
284-
return original_Long(ctx, h);
285-
} else if (isBoxedInt(bits)) {
283+
if (isBoxedInt(bits)) {
286284
return h;
287285
} else if (isBoxedDouble(bits)) {
288286
double v = unboxDouble(bits);
289287
return toPtr(boxInt((int) v));
290288
}
289+
return original_Long(ctx, h);
291290
}
292291

293292
static HPy augment_Float_FromDouble(HPyContext *ctx, double v) {

0 commit comments

Comments
 (0)