Skip to content

Commit 8c15891

Browse files
committed
fix asPath export message implementations in PString and PBytes to actually override the abstract implementation
1 parent eb32a82 commit 8c15891

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/bytes/PBytes.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030

3131
import com.oracle.graal.python.builtins.PythonBuiltinClassType;
3232
import com.oracle.graal.python.builtins.objects.common.SequenceStorageNodes;
33+
import com.oracle.graal.python.builtins.objects.function.PArguments.ThreadState;
3334
import com.oracle.graal.python.builtins.objects.object.PythonObjectLibrary;
3435
import com.oracle.graal.python.nodes.PRaiseNode;
3536
import com.oracle.graal.python.runtime.sequence.PImmutableSequence;
@@ -135,7 +136,8 @@ byte[] getBufferBytes(
135136
}
136137

137138
@ExportMessage
138-
public String asPath(@Cached PRaiseNode raise,
139+
public String asPathWithState(@SuppressWarnings("unused") ThreadState state,
140+
@Cached PRaiseNode raise,
139141
@Shared("toByteArrayNode") @Cached SequenceStorageNodes.ToByteArrayNode toBytes) {
140142
return newString(raise, toBytes.execute(getSequenceStorage()));
141143
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/str/PString.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,8 @@ static int subclassedString(PString self, ThreadState state,
179179
}
180180

181181
@ExportMessage
182-
public String asPath(@Cached CastToJavaStringNode castToJavaStringNode) {
182+
public String asPathWithState(@SuppressWarnings("unused") ThreadState state,
183+
@Cached CastToJavaStringNode castToJavaStringNode) {
183184
try {
184185
return castToJavaStringNode.execute(this);
185186
} catch (CannotCastException e) {

0 commit comments

Comments
 (0)