summaryrefslogtreecommitdiff
path: root/tests/run/cimport_cython_T505.pyx
blob: 20d2daf3ab00ea34a5ebd5e9dc18d7d1a3ad174f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# ticket: 505

cimport cython

cdef extern from "Python.h":
    cdef cython.unicode PyUnicode_DecodeUTF8(char* s, Py_ssize_t size, char* errors)

def test_capi():
    """
    >>> print(test_capi())
    abc
    """
    return PyUnicode_DecodeUTF8("abc", 3, NULL)