Commit e02c446f authored by Robert Bradshaw's avatar Robert Bradshaw

Fix tests after #355

parent 5ce9ee47
......@@ -1014,6 +1014,8 @@ class ModuleScope(Scope):
# the non-typedef struct internally to avoid needing forward
# declarations for anonymous structs.
if typedef_flag and visibility != 'extern':
if visibility != 'public':
warning(pos, "ctypedef only valid for public and extern classes", 2)
objtypedef_cname = objstruct_cname
objstruct_cname = None
typedef_flag = 0
......
......@@ -8,16 +8,10 @@ ctypedef struct Blarg:
cdef struct Blarg
cdef class Spam
ctypedef class Spam:
pass
cdef Foo f
cdef Blarg b
_ERRORS = u"""
3:0: 'Foo' previously declared using 'cdef'
9:5: 'Blarg' previously declared using 'ctypedef'
13:0: 'Spam' previously declared using 'cdef'
"""
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