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
Gwenaël Samain
cython
Commits
a1b85697
Commit
a1b85697
authored
Mar 04, 2019
by
Stefan Behnel
Committed by
GitHub
Mar 04, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2883 from cython/gh884_docstrings
Support CPython builds with docstrings disabled
parents
d6ea7356
19468dd9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+1
-1
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+1
-1
Cython/Compiler/TypeSlots.py
Cython/Compiler/TypeSlots.py
+1
-1
No files found.
Cython/Compiler/ModuleNode.py
View file @
a1b85697
...
...
@@ -2209,7 +2209,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
if
doc
:
if
doc
.
is_unicode
:
doc
=
doc
.
as_utf8_string
()
doc_code
=
doc
.
as_c_string_literal
()
doc_code
=
"PyDoc_STR(%s)"
%
doc
.
as_c_string_literal
()
else
:
doc_code
=
"0"
code
.
putln
(
...
...
Cython/Compiler/Nodes.py
View file @
a1b85697
...
...
@@ -3483,7 +3483,7 @@ class DefNodeWrapper(FuncDefNode):
docstr
=
docstr
.
as_utf8_string
()
if
not
(
entry
.
is_special
and
entry
.
name
in
(
'__getbuffer__'
,
'__releasebuffer__'
)):
code
.
putln
(
'
static char %s[] = %s
;'
%
(
code
.
putln
(
'
PyDoc_STRVAR(%s, %s)
;'
%
(
entry
.
doc_cname
,
docstr
.
as_c_string_literal
()))
...
...
Cython/Compiler/TypeSlots.py
View file @
a1b85697
...
...
@@ -446,7 +446,7 @@ class DocStringSlot(SlotDescriptor):
return
"0"
if
doc
.
is_unicode
:
doc
=
doc
.
as_utf8_string
()
return
doc
.
as_c_string_literal
()
return
"PyDoc_STR(%s)"
%
doc
.
as_c_string_literal
()
class
SuiteSlot
(
SlotDescriptor
):
...
...
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