projects
/
platform
/
upstream
/
python-cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9498101
)
speed up lookup of Python object attributes a little
author
Stefan Behnel
<stefan_ml@behnel.de>
Thu, 7 Mar 2013 21:00:01 +0000
(22:00 +0100)
committer
Stefan Behnel
<stefan_ml@behnel.de>
Thu, 7 Mar 2013 21:00:01 +0000
(22:00 +0100)
Cython/Compiler/ExprNodes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/ExprNodes.py
b/Cython/Compiler/ExprNodes.py
index
42e1293
..
05fee43
100755
(executable)
--- a/
Cython/Compiler/ExprNodes.py
+++ b/
Cython/Compiler/ExprNodes.py
@@
-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_GetAt
tr(%s, %s); %s' % (
+ '%s =
__Pyx_PyObject_GetAttrS
tr(%s, %s); %s' % (
self.result(),
self.obj.py_result(),
code.intern_identifier(self.attribute),