File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ PythonAbstractObject doNativeWrapper(PythonObjectNativeWrapper object) {
160
160
return object .getPythonObject ();
161
161
}
162
162
163
- @ Specialization (guards = "isForeignObject(object)" )
163
+ @ Specialization (guards = { "isForeignObject(object)" , "!isNativeWrapper(object)" } )
164
164
PythonAbstractObject doNativeObject (TruffleObject object ) {
165
165
return factory ().createNativeObjectWrapper (object );
166
166
}
@@ -204,6 +204,10 @@ protected boolean isForeignObject(TruffleObject obj) {
204
204
return getClassNode .execute (obj ) == getCore ().getForeignClass ();
205
205
}
206
206
207
+ protected boolean isNativeWrapper (Object obj ) {
208
+ return obj instanceof PythonNativeWrapper ;
209
+ }
210
+
207
211
@ TruffleBoundary
208
212
public static Object doSlowPath (Object object ) {
209
213
if (object instanceof PythonObjectNativeWrapper ) {
You can’t perform that action at this time.
0 commit comments