Minor fixes, all tests pass
authorRobert Bradshaw <robertwb@math.washington.edu>
Sun, 3 Aug 2008 04:53:04 +0000 (21:53 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Sun, 3 Aug 2008 04:53:04 +0000 (21:53 -0700)
I don't know how long_literal used to work, must have ran tests before
that refactor...

Cython/Compiler/Symtab.py
Cython/Utils.py
tests/compile/extimportedsubtype.pyx
tests/run/pylistsubtype.pyx

index 476f3164d4b0b59030b05607e814c4709a3c456b..69b12d7916356ac2017b0cbab40f09923866c462 100644 (file)
@@ -401,7 +401,7 @@ class Scope:
         if entry and not entry.type.is_cfunction:
             # This is legal Python, but for now will produce invalid C.
             error(pos, "'%s' already declared" % name)
-        entry = self.declare_var(name, py_object_type, pos)
+        entry = self.declare_var(name, py_object_type, pos, visibility='extern')
         entry.signature = pyfunction_signature
         self.pyfunc_entries.append(entry)
         return entry
index cb59d2f8b72233bf35018f88fd74ba00d539465a..5a23b58e5f83afe11d1be3bc8560e78cecdda797 100644 (file)
@@ -121,7 +121,9 @@ def long_literal(value):
         if len(value) < 2:
             value = int(value)
         elif value[0] == 0:
-            return int(value, 8)
+            value = int(value, 8)
         elif value[1] in 'xX':
-            return int(value[2:], 16)
+            value = int(value[2:], 16)
+        else:
+            value = int(value)
     return not -2**31 <= value < 2**31
index dd081e0c7f9bc86f343f37f092c19c693b353f50..c1fb75141947ac8e1d144ae873fe2f76183867ad 100644 (file)
@@ -4,4 +4,4 @@ cdef class Sub2(Crunchy):
     cdef char character
 
 cdef class Sub1(Sub2):
-    cdef char character
+    pass
index 350f9d4024af805616c70679791d96e5dbae891d..9911f0483253f33702c92937879a488fd73544fa 100644 (file)
@@ -29,4 +29,4 @@ cdef class Sub2(list):
     cdef char character
 
 cdef class Sub1(Sub2):
-    cdef char character
+    pass