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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
4479643d
Commit
4479643d
authored
Aug 15, 2008
by
david@evans-2.local
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Split docstring around \n for compilers who barf at long string literals (VS 2003).
parent
ba2630d1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+2
-2
Cython/Compiler/StringEncoding.py
Cython/Compiler/StringEncoding.py
+3
-0
No files found.
Cython/Compiler/Nodes.py
View file @
4479643d
...
...
@@ -13,7 +13,7 @@ from PyrexTypes import py_object_type, error_type, CTypedefType, CFuncType
from
Symtab
import
ModuleScope
,
LocalScope
,
GeneratorLocalScope
,
\
StructOrUnionScope
,
PyClassScope
,
CClassScope
from
Cython.Utils
import
open_new_file
,
replace_suffix
from
StringEncoding
import
EncodedString
,
escape_byte_string
from
StringEncoding
import
EncodedString
,
escape_byte_string
,
split_docstring
import
Options
import
ControlFlow
...
...
@@ -1533,7 +1533,7 @@ class DefNode(FuncDefNode):
code
.
putln
(
'static char %s[] = "%s";'
%
(
self
.
entry
.
doc_cname
,
escape_byte_string
(
docstr
)))
split_docstring
(
escape_byte_string
(
docstr
)
)))
if
with_pymethdef
:
code
.
put
(
"static PyMethodDef %s = "
%
...
...
Cython/Compiler/StringEncoding.py
View file @
4479643d
...
...
@@ -142,3 +142,6 @@ def escape_byte_string(s):
else
:
append
(
c
)
return
''
.
join
(
l
)
def
split_docstring
(
s
):
return
'
\
\
n
\
"
\
"
'
.
join
(
s
.
split
(
r'\n'
))
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