File: ccallback.pxd

package info (click to toggle)
python-scipy 1.1.0-7
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 93,828 kB
  • sloc: python: 156,854; ansic: 82,925; fortran: 80,777; cpp: 7,505; makefile: 427; sh: 294
file content (31 lines) | stat: -rw-r--r-- 851 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# -*-cython-*-


from libc.setjmp cimport jmp_buf
from cpython.object cimport PyObject

cdef extern from "ccallback.h":
    ctypedef struct ccallback_signature_t:
        char *signature
        int value

    ctypedef struct ccallback_t:
        void *c_function
        PyObject *py_function
        void *user_data
        jmp_buf error_buf
        ccallback_t *prev_callback
        ccallback_signature_t *signature

        # Unused variables that can be used by the thunk etc. code for any purpose
        long info
        void *info_p

    int CCALLBACK_DEFAULTS
    int CCALLBACK_OBTAIN
    int CCALLBACK_PARSE

    ccallback_t *ccallback_obtain() nogil
    int ccallback_prepare(ccallback_t *callback, ccallback_signature_t *sigs,
                          object func, int flags) except -1
    void ccallback_release(ccallback_t *callback)