From: Robert Bradshaw Date: Sun, 3 Aug 2008 04:53:04 +0000 (-0700) Subject: Minor fixes, all tests pass X-Git-Tag: 0.9.8.1~99 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cb5166acc1530cecad43c7d7f7cb6e5261af9a63;p=cython.git Minor fixes, all tests pass I don't know how long_literal used to work, must have ran tests before that refactor... --- diff --git a/Cython/Compiler/Symtab.py b/Cython/Compiler/Symtab.py index 476f3164..69b12d79 100644 --- a/Cython/Compiler/Symtab.py +++ b/Cython/Compiler/Symtab.py @@ -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 diff --git a/Cython/Utils.py b/Cython/Utils.py index cb59d2f8..5a23b58e 100644 --- a/Cython/Utils.py +++ b/Cython/Utils.py @@ -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 diff --git a/tests/compile/extimportedsubtype.pyx b/tests/compile/extimportedsubtype.pyx index dd081e0c..c1fb7514 100644 --- a/tests/compile/extimportedsubtype.pyx +++ b/tests/compile/extimportedsubtype.pyx @@ -4,4 +4,4 @@ cdef class Sub2(Crunchy): cdef char character cdef class Sub1(Sub2): - cdef char character + pass diff --git a/tests/run/pylistsubtype.pyx b/tests/run/pylistsubtype.pyx index 350f9d40..9911f048 100644 --- a/tests/run/pylistsubtype.pyx +++ b/tests/run/pylistsubtype.pyx @@ -29,4 +29,4 @@ cdef class Sub2(list): cdef char character cdef class Sub1(Sub2): - cdef char character + pass