From: Robert Bradshaw <robertwb@math.washington.edu>
Date: Thu, 14 Aug 2008 05:08:51 +0000 (-0700)
Subject: Fix embed_position encoding bug.
X-Git-Tag: 0.9.8.1~49^2~2
X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b79430c5e9c90ed905ad1f589dc5c263a5fca38a;p=cython.git

Fix embed_position encoding bug.
---

diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py
index 5e954231..60071619 100644
--- a/Cython/Compiler/ModuleNode.py
+++ b/Cython/Compiler/ModuleNode.py
@@ -47,7 +47,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
         if Options.embed_pos_in_docstring:
             env.doc = EncodedString(u'File: %s (starting at line %s)' % Nodes.relative_position(self.pos))
             if not self.doc is None:
-                env.doc = EncodedString(env.doc + u'\\n' + self.doc)
+                env.doc = EncodedString(env.doc + u'\n' + self.doc)
                 env.doc.encoding = self.doc.encoding
         else:
             env.doc = self.doc
diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py
index 5b11be25..2b299a23 100644
--- a/Cython/Compiler/Nodes.py
+++ b/Cython/Compiler/Nodes.py
@@ -63,7 +63,7 @@ def embed_position(pos, docstring):
         # reuse the string encoding of the original docstring
         doc = EncodedString(pos_line)
     else:
-        doc = EncodedString(pos_line + u'\\n' + docstring)
+        doc = EncodedString(pos_line + u'\n' + docstring)
     doc.encoding = encoding
     return doc