From: Robert Bradshaw Date: Wed, 19 Sep 2012 14:54:40 +0000 (-0700) Subject: Another const test. X-Git-Tag: 0.18b1~227 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9330be0f475f42422dfd30a485787ff6c3d27e8a;p=platform%2Fupstream%2Fpython-cython.git Another const test. --- diff --git a/tests/errors/const_decl_errors.pyx b/tests/errors/const_decl_errors.pyx index 23f5195..c04b1d2 100644 --- a/tests/errors/const_decl_errors.pyx +++ b/tests/errors/const_decl_errors.pyx @@ -7,15 +7,20 @@ cdef const object o # as it's not needed for agreeing with external libraries. cdef const int x = 10 -cdef func(const int a, const int* b, const (int*) c): +cdef struct S: + int member + +cdef func(const int a, const int* b, const (int*) c, const S s): a = 10 - b[0] = 100 c = NULL + b[0] = 100 + s.member = 1000 _ERRORS = """ 3:5: Const base type cannot be a Python object 8:5: Assignment to const 'x' -11:6: Assignment to const 'a' -12:5: Assignment to const dereference -13:6: Assignment to const 'c' +14:6: Assignment to const 'a' +15:6: Assignment to const 'c' +16:5: Assignment to const dereference +17:5: Assignment to const attribute 'member' """