Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
73895001
Commit
73895001
authored
Dec 04, 2012
by
Mark Florisson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Omit setting docstring for __getbuffer__/__releasebuffer__
parent
80d79c97
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+4
-1
tests/buffers/buffer.pyx
tests/buffers/buffer.pyx
+6
-0
No files found.
Cython/Compiler/ModuleNode.py
View file @
73895001
...
...
@@ -2355,7 +2355,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
(
...
...
tests/buffers/buffer.pyx
View file @
73895001
...
...
@@ -52,3 +52,9 @@ cdef class TestBuffer:
cdef
class
TestBufferRelease
(
TestBuffer
):
def
__releasebuffer__
(
self
,
Py_buffer
*
buffer
):
print
u"releasing!"
cdef
class
TestCompileWithDocstring
(
object
):
def
__getbuffer__
(
self
,
Py_buffer
*
buffer
,
int
flags
):
"I am a docstring!"
def
__releasebuffer__
(
self
,
Py_buffer
*
buf
):
"I am a docstring!"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment