Skip to content

Commit 7a05f97

Browse files
committed
make PExternalFunctionWrapper a plain interop object
1 parent 468edec commit 7a05f97

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/PythonCextBuiltins.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1583,19 +1583,17 @@ Object call(Object self, PBuiltinFunction function) {
15831583
}
15841584
}
15851585

1586-
public abstract static class PExternalFunctionWrapper extends PythonBuiltinObject {
1586+
public abstract static class PExternalFunctionWrapper extends Object implements TruffleObject {
15871587

15881588
private final Supplier<ConvertArgsToSulongNode> convertArgsNodeSupplier;
15891589
private final Supplier<CheckFunctionResultNode> checkFunctionResultNodeSupplier;
15901590

15911591
public PExternalFunctionWrapper(Supplier<ConvertArgsToSulongNode> convertArgsNodeSupplier) {
1592-
super(PythonBuiltinClassType.PythonObject, PythonBuiltinClassType.PythonObject.getInstanceShape());
15931592
this.convertArgsNodeSupplier = convertArgsNodeSupplier;
15941593
this.checkFunctionResultNodeSupplier = DefaultCheckFunctionResultNodeGen::create;
15951594
}
15961595

15971596
public PExternalFunctionWrapper(Supplier<ConvertArgsToSulongNode> convertArgsNodeSupplier, Supplier<CheckFunctionResultNode> checkFunctionResultNodeSupplier) {
1598-
super(PythonBuiltinClassType.PythonObject, PythonBuiltinClassType.PythonObject.getInstanceShape());
15991597
this.convertArgsNodeSupplier = convertArgsNodeSupplier;
16001598
this.checkFunctionResultNodeSupplier = checkFunctionResultNodeSupplier;
16011599
}
@@ -1611,11 +1609,6 @@ protected ConvertArgsToSulongNode createConvertArgsToSulongNode() {
16111609
public CheckFunctionResultNode getCheckFunctionResultNode() {
16121610
return checkFunctionResultNodeSupplier.get();
16131611
}
1614-
1615-
@Override
1616-
public int compareTo(Object o) {
1617-
throw CompilerDirectives.shouldNotReachHere();
1618-
}
16191612
}
16201613

16211614
@Builtin(name = "METH_DIRECT")

0 commit comments

Comments
 (0)