diff options
author | David Cournapeau <cournape@gmail.com> | 2008-08-15 12:30:37 +0000 |
---|---|---|
committer | David Cournapeau <cournape@gmail.com> | 2008-08-15 12:30:37 +0000 |
commit | 73d91a6b903497a7ad38aab97f48e51f21a1e5df (patch) | |
tree | c6399b6d0bda40f087d6b4adee356587d5809346 | |
parent | 1ab7e8f60f39c70ed0caf13b3945a6c65d213276 (diff) | |
download | numpy-73d91a6b903497a7ad38aab97f48e51f21a1e5df.tar.gz |
Split generated docstring literals for compilers which cannot handle long strings.z
-rw-r--r-- | numpy/core/code_generators/generate_umath.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/core/code_generators/generate_umath.py b/numpy/core/code_generators/generate_umath.py index 4fe24fae2..ba57d53e0 100644 --- a/numpy/core/code_generators/generate_umath.py +++ b/numpy/core/code_generators/generate_umath.py @@ -673,6 +673,10 @@ def make_ufuncs(funcdict): mlist = [] docstring = textwrap.dedent(uf.docstring).strip() docstring = docstring.encode('string-escape').replace(r'"', r'\"') + # Split the docstring because some compilers (like MS) do not like big + # string literal in C code. We split at endlines because textwrap.wrap + # do not play well with \n + docstring = '\\n\"\"'.join(docstring.split(r"\n")) mlist.append(\ r"""f = PyUFunc_FromFuncAndData(%s_functions, %s_data, %s_signatures, %d, %d, %d, %s, "%s", |