File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
graalpython/com.oracle.graal.python.cext/src Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -185,14 +185,12 @@ inline void* native_to_java(PyObject* obj) {
185185
186186__attribute__((always_inline ))
187187inline void * native_type_to_java (PyTypeObject * type ) {
188- PyObject * obj = (PyObject * )type ;
189- void * refcnt = obj -> ob_refcnt ;
190- if (!truffle_cannot_be_handle (refcnt )) {
191- return resolve_handle (cache , refcnt );
192- } else if (IS_POINTER (refcnt )) {
193- return refcnt ;
188+ if (IS_POINTER (((PyObject * )type )-> ob_refcnt )) {
189+ return (void * )((PyObject * )type )-> ob_refcnt ;
190+ } else if (!truffle_cannot_be_handle (((PyObject * )type )-> ob_refcnt )) {
191+ return resolve_handle (cache , ((PyObject * )type )-> ob_refcnt );
194192 }
195- return obj ;
193+ return ( void * ) type ;
196194}
197195
198196extern void * to_java (PyObject * obj );
You can’t perform that action at this time.
0 commit comments