Skip to content

Commit e9bd6ee

Browse files
committed
Do not use a dispatched library for PMethod message export
1 parent 83f4863 commit e9bd6ee

File tree

1 file changed

+3
-3
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/method

1 file changed

+3
-3
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/method/PMethod.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
@ExportLibrary(PythonObjectLibrary.class)
4040
public final class PMethod extends PythonBuiltinObject {
4141

42-
private final Object function;
42+
final Object function;
4343
private final Object self;
4444

4545
public PMethod(LazyPythonClass cls, Object self, Object function) {
@@ -69,12 +69,12 @@ public boolean isCallable() {
6969
}
7070

7171
@ExportMessage
72-
protected SourceSection getSourceLocation(@CachedLibrary(limit = "1") InteropLibrary lib) throws UnsupportedMessageException {
72+
protected SourceSection getSourceLocation(@CachedLibrary("this.function") InteropLibrary lib) throws UnsupportedMessageException {
7373
return lib.getSourceLocation(function);
7474
}
7575

7676
@ExportMessage
77-
protected boolean hasSourceLocation(@CachedLibrary(limit = "1") InteropLibrary lib) {
77+
protected boolean hasSourceLocation(@CachedLibrary("this.function") InteropLibrary lib) {
7878
return lib.hasSourceLocation(function);
7979
}
8080
}

0 commit comments

Comments
 (0)