Commit fc4d504f authored by Robert Bradshaw's avatar Robert Bradshaw

Merge pull request #480 from insertinterestingnamehere/line_path_fix

Fix generated `#line` directives on Windows
parents 3588bcab ea76488c
...@@ -158,8 +158,11 @@ class SourceDescriptor(object): ...@@ -158,8 +158,11 @@ class SourceDescriptor(object):
def get_escaped_description(self): def get_escaped_description(self):
if self._escaped_description is None: if self._escaped_description is None:
self._escaped_description = \ esc_desc = \
self.get_description().encode('ASCII', 'replace').decode("ASCII") 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 return self._escaped_description
def __gt__(self, other): 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