Skip to content

Commit d276dfa

Browse files
committed
Consider managed case
1 parent 9ec9943 commit d276dfa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

graalpython/com.oracle.graal.python.cext/src/floatobject.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ PyFloat_AsDouble(PyObject *op)
301301
{
302302
// GraalPy change: read from native object stub or upcall for managed
303303
if (points_to_py_handle_space(op)) {
304+
#ifndef GRAALVM_PYTHON_LLVM_MANAGED
304305
if (PyFloat_Check(op)) {
305306
double val = ((GraalPyFloatObject*) pointer_to_stub(op))->ob_fval;
306307
#ifndef NDEBUG
@@ -310,9 +311,8 @@ PyFloat_AsDouble(PyObject *op)
310311
#endif
311312
return val;
312313
}
313-
else {
314-
return GraalPyTruffleFloat_AsDouble(op);
315-
}
314+
#endif /* GRAALVM_PYTHON_LLVM_MANAGED */
315+
return GraalPyTruffleFloat_AsDouble(op);
316316
}
317317

318318
PyNumberMethods *nb;

0 commit comments

Comments
 (0)