summaryrefslogtreecommitdiff
path: root/tests/errors/e_nogilfunctype.pyx
blob: ccac37b7ea46b0b0771f88df51ab03244a5cc8ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# mode: error
# tag: warnings

cdef extern from *:
    cdef void f()
    cdef void (*fp)() nogil
    ctypedef void (*fp_t)() nogil

fp = f
fp = <fp_t>f

_ERRORS = u"""
9:5: Cannot assign type 'void (void)' to 'void (*)(void) nogil'
"""

_WARNINGS = """
10:5: Casting a GIL-requiring function into a nogil function circumvents GIL validation
"""