-
-
Save robertwb/5ef2075bc55aee7e705659ba63cd9c48 to your computer and use it in GitHub Desktop.
Attachment defined.patch for http://trac.cython.org/ticket/27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -ruw Cython-0.9.8.orig/Cython/Compiler/Scanning.py Cython-0.9.8/Cython/Compiler/Scanning.py | |
--- Cython-0.9.8.orig/Cython/Compiler/Scanning.py 2008-06-11 14:25:34.000000000 -0400 | |
+++ Cython-0.9.8/Cython/Compiler/Scanning.py 2008-07-17 16:39:27.691882798 -0400 | |
@@ -186,6 +186,9 @@ | |
else: | |
raise | |
+ def defined(self, name): | |
+ return name in self.entries | |
+ | |
def initial_compile_time_env(): | |
benv = CompileTimeScope() | |
names = ('UNAME_SYSNAME', 'UNAME_NODENAME', 'UNAME_RELEASE', | |
@@ -201,6 +204,7 @@ | |
for name in names: | |
benv.declare(name, getattr(__builtin__, name)) | |
denv = CompileTimeScope(benv) | |
+ denv.declare('DEFINED', denv.defined) | |
return denv | |
#------------------------------------------------------------------ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment