diff options
author | Mark Florisson <markflorisson88@gmail.com> | 2012-12-04 22:10:46 +0000 |
---|---|---|
committer | Mark Florisson <markflorisson88@gmail.com> | 2012-12-04 22:10:46 +0000 |
commit | 08796381d1b3d47f4c365f9dc453d4c1564c3e17 (patch) | |
tree | 660efe653541e67a13e8bfb33d1ef3701bf8f0b1 /Cython/Compiler/ModuleNode.py | |
parent | c81b103adc894b8f3505a7e467d0d73e762ebd36 (diff) | |
download | cython-08796381d1b3d47f4c365f9dc453d4c1564c3e17.tar.gz |
Omit setting docstring for __getbuffer__/__releasebuffer__
--HG--
extra : transplant_source : %04%AD%9D%8Dy%E4%7F%D04ib%0E%90%DB%D48%C3%88%19g
Diffstat (limited to 'Cython/Compiler/ModuleNode.py')
-rw-r--r-- | Cython/Compiler/ModuleNode.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index 5bce33198..a3e1a481c 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -2353,7 +2353,10 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): # unless we let PyType_Ready create the slot wrappers we have # a significant performance hit. (See trac #561.) for func in entry.type.scope.pyfunc_entries: - if func.is_special and Options.docstrings and func.wrapperbase_cname: + is_buffer = func.name in ('__getbuffer__', + '__releasebuffer__') + if (func.is_special and Options.docstrings and + func.wrapperbase_cname and not is_buffer): code.putln('#if CYTHON_COMPILING_IN_CPYTHON') code.putln("{") code.putln( |