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-04 13:15:51 +0100 |
commit | 19468dd99be65269f3c54fabb599efdbc44127d9 (patch) | |
tree | 05d6d0b4507ed28bbb928be35eaba42e6fa05f1c /Cython/Compiler/ModuleNode.py | |
parent | d6ea7356b28b7f5a41893a810e11315bb5af8ec5 (diff) | |
download | cython-19468dd99be65269f3c54fabb599efdbc44127d9.tar.gz |
Support CPython builds with docstrings disabled by wrapping docstring literals in the `PyDoc_STR()` macro.
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( |