Skip to content

Commit e8e2359

Browse files
committed
Correctly get unbound function '__new__' for native wrapper.
1 parent d459c2d commit e8e2359

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
import com.oracle.graal.python.nodes.SpecialAttributeNames;
7070
import com.oracle.graal.python.nodes.SpecialMethodNames;
7171
import com.oracle.graal.python.nodes.attributes.GetAttributeNode;
72+
import com.oracle.graal.python.nodes.attributes.LookupAttributeInMRONode;
7273
import com.oracle.graal.python.nodes.attributes.LookupInheritedAttributeNode;
7374
import com.oracle.graal.python.nodes.call.special.LookupAndCallUnaryNode;
7475
import com.oracle.graal.python.nodes.object.GetClassNode;
@@ -220,7 +221,7 @@ Object doTpAsBuffer(PythonClass object, @SuppressWarnings("unused") String key)
220221

221222
@Specialization(guards = "eq(TP_NEW, key)")
222223
Object doTpNew(PythonClass object, @SuppressWarnings("unused") String key,
223-
@Cached("create()") GetAttributeNode getAttrNode) {
224+
@Cached("create()") LookupAttributeInMRONode getAttrNode) {
224225
return ManagedMethodWrappers.createKeywords(getAttrNode.execute(object, SpecialAttributeNames.__NEW__));
225226
}
226227

0 commit comments

Comments
 (0)