diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2019-03-03 22:58:07 +0100 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2019-03-03 22:58:07 +0100 |
commit | deb6c36613379c9ca6c05c8290da0fba31e0a23c (patch) | |
tree | eb558e34db7f2d5ced0adaa3e25e35be44afcde6 /Cython/Compiler/ModuleNode.py | |
parent | 95bf3e767ea0e1a7b24014efeb4cfe07d81a6939 (diff) | |
download | cython-gh884_docstrings.tar.gz |
Support CPython builds with docstrings disabled by wrapping docstring literals in the `PyDoc_STR()` macro.gh884_docstrings
Closes GH-884.
Diffstat (limited to 'Cython/Compiler/ModuleNode.py')
-rw-r--r-- | Cython/Compiler/ModuleNode.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index 62f027d2c..71d97de97 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -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( |