summaryrefslogtreecommitdiff
path: root/tests/run/withnogil.pyx
blob: a64779dfe48a5ea09229c0c083b5f6f8c8b61d18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
def f(x):
    """
    >>> f(1)
    (1, 17)
    """
    cdef int y
    z = 42
    with nogil:
        y = 17
    z = x
    return z,y

def g():
    """
    >>> g()
    1
    """
    with nogil:
        h()
    return 1

cdef int h() except -1 nogil:
    pass