Commit ace659a6 authored by Stefan Behnel's avatar Stefan Behnel

speed up lookup of Python object attributes a little

parent 94981010
......@@ -5131,8 +5131,10 @@ class AttributeNode(ExprNode):
def generate_result_code(self, code):
if self.is_py_attr:
code.globalstate.use_utility_code(
UtilityCode.load_cached("PyObjectGetAttrStr", "ObjectHandling.c"))
code.putln(
'%s = PyObject_GetAttr(%s, %s); %s' % (
'%s = __Pyx_PyObject_GetAttrStr(%s, %s); %s' % (
self.result(),
self.obj.py_result(),
code.intern_identifier(self.attribute),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment