summaryrefslogtreecommitdiff
path: root/docs/examples/userguide/external_C_code/c_code_docstring.pyx
blob: 430e89c487da68309aab5f119a12ae965a1d7c57 (plain)
1
2
3
4
5
6
7
8
9
cdef extern from *:
    """
    /* This is C code which will be put
     * in the .c file output by Cython */
    static long square(long x) {return x * x;}
    #define assign(x, y) ((x) = (y))
    """
    long square(long x)
    void assign(long& x, long y)