forked from scipy/scipy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ccallback.pxd
31 lines (24 loc) · 851 Bytes
/
ccallback.pxd
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)