From: Dag Sverre Seljebotn Date: Thu, 23 Apr 2009 18:08:25 +0000 (+0200) Subject: #290: whoops X-Git-Tag: 0.11.2.rc1~52^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0493847c4f3e5161c84f66b86291543e22793065;p=cython.git #290: whoops --- diff --git a/Cython/Compiler/Parsing.py b/Cython/Compiler/Parsing.py index 85919514..8cc72997 100644 --- a/Cython/Compiler/Parsing.py +++ b/Cython/Compiler/Parsing.py @@ -2168,7 +2168,7 @@ def p_c_struct_or_union_definition(s, pos, ctx): if s.systring == 'packed': packed = True s.next() - if s.sy != 'IDENT' and s.systring != 'struct': + if s.sy != 'IDENT' or s.systring != 'struct': s.expected('struct') # s.sy == ident 'struct' or 'union' kind = s.systring diff --git a/tests/errors/e2_packedstruct_T290.pyx b/tests/errors/e2_packedstruct_T290.pyx new file mode 100644 index 00000000..ee053ee2 --- /dev/null +++ b/tests/errors/e2_packedstruct_T290.pyx @@ -0,0 +1,6 @@ +cdef packed foo: + pass + +_ERRORS = u""" +1:12: Expected 'struct' +"""