fix string typed compiler directives in Py3
authorStefan Behnel <scoder@users.berlios.de>
Fri, 21 Aug 2009 12:44:50 +0000 (14:44 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Fri, 21 Aug 2009 12:44:50 +0000 (14:44 +0200)
Cython/Compiler/ParseTreeTransforms.py

index 015fb9528d030bfdea56afc19885181669dcefb8..dafe86465c1b23ab32e0c77d659aa8d402e53f3e 100644 (file)
@@ -439,7 +439,7 @@ class InterpretCompilerDirectives(CythonTransform, SkipDeclarations):
                     if kwds is not None or len(args) != 1 or not isinstance(args[0], StringNode):
                         raise PostParseError(dec.function.pos,
                             'The %s option takes one compile-time string argument' % optname)
-                    return (optname, args[0].value)
+                    return (optname, str(args[0].value))
                 elif optiontype is dict:
                     if len(args) != 0:
                         raise PostParseError(dec.function.pos,