diff options
Diffstat (limited to 'Cython/Compiler/Main.py')
-rw-r--r-- | Cython/Compiler/Main.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Cython/Compiler/Main.py b/Cython/Compiler/Main.py index 411ef0a8f..1dfc4baf1 100644 --- a/Cython/Compiler/Main.py +++ b/Cython/Compiler/Main.py @@ -94,9 +94,18 @@ class Context(object): if language_level is not None: self.set_language_level(language_level) + if self.compiler_directives.get('str_is_str') is not None: + self.set_str_is_str(self.compiler_directives['str_is_str']) self.gdb_debug_outputwriter = None + def set_str_is_str(self, str_is_str): + from .Future import unicode_literals + if str_is_str: + self.future_directives.discard(unicode_literals) + else: + self.future_directives.add(unicode_literals) + def set_language_level(self, level): self.language_level = level if level >= 3: |