Commit ea76488c authored by Ian Henriksen's avatar Ian Henriksen

Use forward slashes as path separators in #line directives to avoid

errors from incorrect escape sequences when compiling on Windows.
parent 02234c6a
......@@ -158,8 +158,11 @@ class SourceDescriptor(object):
def get_escaped_description(self):
if self._escaped_description is None:
self._escaped_description = \
esc_desc = \
self.get_description().encode('ASCII', 'replace').decode("ASCII")
# Use foreward slashes on Windows since these paths
# will be used in the #line directives in the C/C++ files.
self._escaped_description = esc_desc.replace('\\', '/')
return self._escaped_description
def __gt__(self, other):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment