1 cimport e_bufaccess_pxd # was needed to provoke a bug involving ErrorType
5 cdef object[e_bufaccess_pxd.T] buf
7 def withnogil_access_fail():
8 cdef object[int] buf = None
12 @cython.boundscheck(False)
13 def withnogil_access_ok():
14 cdef object[int] buf = None
16 buf[2] = 2 # No error should be triggered here
18 @cython.boundscheck(False)
19 def withnogil_access_fail_2():
20 cdef object[object] buf = None
22 buf[2] = 2 # Not OK as dtype is object
24 def withnogil_acquire(x):
30 3:9: 'nothing' is not a type identifier
31 10:11: Cannot check buffer index bounds without gil; use boundscheck(False) directive
32 22:11: Cannot access buffer with object dtype without gil
33 22:11: Assignment of Python object not allowed without gil
34 27:12: Assignment of Python object not allowed without gil