@@ -494,7 +494,7 @@ protected static PythonClassNativeWrapper wrapNativeClass(PythonManagedClass obj
494
494
495
495
static boolean isFallback (Object object , PythonObjectLibrary lib ) {
496
496
return !(object instanceof String || object instanceof Boolean || object instanceof Integer || object instanceof Long || object instanceof Double ||
497
- object instanceof PythonNativeNull || object instanceof PythonAbstractObject ) &&
497
+ object instanceof PythonNativeNull || object == DescriptorDeleteMarker . INSTANCE || object instanceof PythonAbstractObject ) &&
498
498
!(lib .isForeignObject (object ) && !CApiGuards .isNativeWrapper (object ));
499
499
}
500
500
@@ -656,6 +656,12 @@ static Object doNativeNull(CExtContext cextContext, PythonNativeNull object) {
656
656
return ToSulongNode .doNativeNull (cextContext , object );
657
657
}
658
658
659
+ @ Specialization
660
+ static Object doDeleteMarker (CExtContext cextContext , DescriptorDeleteMarker marker ,
661
+ @ Cached GetNativeNullNode getNativeNullNode ) {
662
+ return ToSulongNode .doDeleteMarker (cextContext , marker , getNativeNullNode );
663
+ }
664
+
659
665
@ Specialization (guards = {"object == cachedObject" , "isSpecialSingleton(cachedObject)" })
660
666
static Object doSingletonCached (CExtContext cextContext , @ SuppressWarnings ("unused" ) PythonAbstractObject object ,
661
667
@ Cached ("object" ) PythonAbstractObject cachedObject ,
@@ -827,6 +833,12 @@ static Object doNativeNull(CExtContext cextContext, PythonNativeNull object) {
827
833
return ToSulongNode .doNativeNull (cextContext , object );
828
834
}
829
835
836
+ @ Specialization
837
+ static Object doDeleteMarker (CExtContext cextContext , DescriptorDeleteMarker marker ,
838
+ @ Cached GetNativeNullNode getNativeNullNode ) {
839
+ return ToSulongNode .doDeleteMarker (cextContext , marker , getNativeNullNode );
840
+ }
841
+
830
842
@ Specialization (guards = {"object == cachedObject" , "isSpecialSingleton(cachedObject)" })
831
843
static Object doSingletonCached (CExtContext cextContext , @ SuppressWarnings ("unused" ) PythonAbstractObject object ,
832
844
@ Cached ("object" ) PythonAbstractObject cachedObject ,
@@ -1003,6 +1015,9 @@ protected static boolean isFallback(Object obj, GetLazyClassNode getClassNode, I
1003
1015
if (CApiGuards .isNativeNull (obj )) {
1004
1016
return false ;
1005
1017
}
1018
+ if (obj == DescriptorDeleteMarker .INSTANCE ) {
1019
+ return false ;
1020
+ }
1006
1021
if (PGuards .isAnyPythonObject (obj )) {
1007
1022
return false ;
1008
1023
}
0 commit comments