summaryrefslogtreecommitdiff
path: root/tests/run/withnogil.pyx
blob: 55b7896a75739b4e2d21e7942227a18fcbc50371 (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() nogil except -1:
    pass