From 6aaa09e22c1fd95702a14f99ec3d7a7b58163f77 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sun, 27 Jan 2013 06:45:58 +0100 Subject: [PATCH] use interned Python string constant instead of calling through __Pyx_GetAttrString() --- Cython/Compiler/ExprNodes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 5f488c6..681f75f 100755 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -9958,8 +9958,9 @@ class DocstringRefNode(ExprNode): pass def generate_result_code(self, code): - code.putln('%s = __Pyx_GetAttrString(%s, "__doc__"); %s' % ( + code.putln('%s = __Pyx_GetAttr(%s, %s); %s' % ( self.result(), self.body.result(), + code.intern_identifier(StringEncoding.EncodedString("__doc__")), code.error_goto_if_null(self.result(), self.pos))) code.put_gotref(self.result()) -- 2.7.4