Commit 70b3c710 authored by Robert Bradshaw's avatar Robert Bradshaw

Fix cpdef, make corrupt c file older than pyx file.

parent 5191f30a
......@@ -375,7 +375,7 @@ class Scope:
def declare_pyfunction(self, name, pos):
# Add an entry for a Python function.
entry = self.lookup_here(name)
if entry:
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)
......
......@@ -30,7 +30,7 @@ def castrate_file(path, st):
"#error Do not use this file, it is the result of a failed Cython compilation.\n")
f.close()
if st:
os.utime(path, (st.st_atime, st.st_mtime))
os.utime(path, (st.st_atime, st.st_mtime-1))
def modification_time(path):
st = os.stat(path)
......
cdef class A:
cpdef a(self):
ma(self)
cpdef ma(x):
print x
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment