summaryrefslogtreecommitdiff
path: root/cffi/recompiler.py
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2016-04-15 17:55:30 +0200
committerArmin Rigo <arigo@tunes.org>2016-04-15 17:55:30 +0200
commit9289e76f6e2f207be49f71734727194558c16351 (patch)
tree8ced82a041bcb115c8464436ef0e3e523d93f838 /cffi/recompiler.py
parentf99d62411a432b8830c2918e8a2a151fc26e13cb (diff)
downloadcffi-9289e76f6e2f207be49f71734727194558c16351.tar.gz
Test and fix for converting empty ffi's in embedding mode
Diffstat (limited to 'cffi/recompiler.py')
-rw-r--r--cffi/recompiler.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cffi/recompiler.py b/cffi/recompiler.py
index 1568d69..5e41228 100644
--- a/cffi/recompiler.py
+++ b/cffi/recompiler.py
@@ -1231,7 +1231,7 @@ class Recompiler:
if c == '\n': return '\\n'
return '\\%03o' % ord(c)
lines = []
- for line in s.splitlines(True):
+ for line in s.splitlines(True) or ['']:
lines.append('"%s"' % ''.join([_char_repr(c) for c in line]))
return ' \\\n'.join(lines)