88
88
import com .oracle .graal .python .builtins .objects .cext .CExtNodes ;
89
89
import com .oracle .graal .python .builtins .objects .cext .CExtNodes .PCallCapiFunction ;
90
90
import com .oracle .graal .python .builtins .objects .cext .CExtNodesFactory ;
91
+ import com .oracle .graal .python .builtins .objects .cext .PythonAbstractNativeObject ;
91
92
import com .oracle .graal .python .builtins .objects .cext .PythonNativeClass ;
92
93
import com .oracle .graal .python .builtins .objects .cext .PythonNativeVoidPtr ;
93
94
import com .oracle .graal .python .builtins .objects .code .CodeNodes ;
@@ -2390,7 +2391,7 @@ private CastToStringNode ensureCastToStringNode() {
2390
2391
}
2391
2392
}
2392
2393
2393
- @ Builtin (name = MODULE , minNumOfPositionalArgs = 1 , takesVarArgs = true , takesVarKeywordArgs = true , constructsClass = PythonBuiltinClassType .PythonObject , isPublic = false )
2394
+ @ Builtin (name = MODULE , minNumOfPositionalArgs = 1 , takesVarArgs = true , takesVarKeywordArgs = true , constructsClass = PythonBuiltinClassType .PythonModule , isPublic = false )
2394
2395
@ GenerateNodeFactory
2395
2396
@ TypeSystemReference (PythonArithmeticTypes .class )
2396
2397
public abstract static class ModuleNode extends PythonBuiltinNode {
@@ -2411,6 +2412,12 @@ Object doManaged(PythonManagedClass self, Object[] varargs, PKeyword[] kwargs) {
2411
2412
Object doType (PythonBuiltinClassType self , Object [] varargs , PKeyword [] kwargs ) {
2412
2413
return factory ().createPythonModule (self );
2413
2414
}
2415
+
2416
+ @ Specialization
2417
+ @ SuppressWarnings ("unused" )
2418
+ Object doNative (PythonAbstractNativeObject self , Object [] varargs , PKeyword [] kwargs ) {
2419
+ return factory ().createPythonModule (self );
2420
+ }
2414
2421
}
2415
2422
2416
2423
@ Builtin (name = "NotImplementedType" , minNumOfPositionalArgs = 1 , constructsClass = PythonBuiltinClassType .PNotImplemented , isPublic = false )
0 commit comments