From: Stefan Behnel Date: Thu, 16 Dec 2010 22:24:42 +0000 (+0100) Subject: fix compile crash X-Git-Tag: 0.14.1rc0~13^2~17 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e8d4299fa4f5da3bd0732dabf58bfc69bbaf0d9b;p=cython.git fix compile crash --- diff --git a/Cython/Compiler/Code.py b/Cython/Compiler/Code.py index 5134dcf2..47ca0e58 100644 --- a/Cython/Compiler/Code.py +++ b/Cython/Compiler/Code.py @@ -6,7 +6,7 @@ import cython cython.declare(re=object, Naming=object, Options=object, StringEncoding=object, Utils=object, SourceDescriptor=object, StringIOTree=object, - DebugFlags=object, none_or_sub=object) + DebugFlags=object, none_or_sub=object, basestring=object) import re import Naming @@ -19,9 +19,9 @@ import DebugFlags from Cython.Utils import none_or_sub try: - basestring -except NameError: - basestring = str + from __builtin__ import basestring +except ImportError: + from builtins import str as basestring class UtilityCode(object): # Stores utility code to add during code generation.