Skip to content

Commit c373b11

Browse files
committed
Use type 'wrapper_descriptor' for slot functions
1 parent a1dce91 commit c373b11

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/capi/ExternalFunctionNodes.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,17 @@ public static PBuiltinFunction createWrapperFunction(String name, Object callabl
416416
defaults = PythonUtils.EMPTY_OBJECT_ARRAY;
417417
}
418418
Object type = SpecialMethodNames.__NEW__.equals(name) ? null : enclosingType;
419-
return factory.createBuiltinFunction(name, type, defaults, ExternalFunctionNodes.createKwDefaults(callable), flags, callTarget);
419+
// TODO(fa): this should eventually go away
420+
switch (sig) {
421+
case NOARGS:
422+
case O:
423+
case VARARGS:
424+
case KEYWORDS:
425+
case FASTCALL:
426+
case FASTCALL_WITH_KEYWORDS:
427+
return factory.createBuiltinFunction(name, type, defaults, ExternalFunctionNodes.createKwDefaults(callable), flags, callTarget);
428+
}
429+
return factory.createWrapperDescriptor(name, type, defaults, ExternalFunctionNodes.createKwDefaults(callable), flags, callTarget);
420430
}
421431

422432
private static int getCompareOpCode(PExternalFunctionWrapper sig) {

0 commit comments

Comments
 (0)