mirror of
https://github.com/deltachat/deltachat-core.git
synced 2025-10-04 18:29:19 +02:00
Add support for the callback in python/cffi
This uses one global event handler function on the C level, as enforced by CFFI, and caters for registering a per-context event handeler. A simple fixture for doing this during tests is also implemented.
This commit is contained in:
parent
ee6798ec0e
commit
08689b2a04
4 changed files with 47 additions and 4 deletions
|
@ -28,6 +28,13 @@ def ffibuilder():
|
|||
output_file=dst_fp.name,
|
||||
macros=[('PY_CFFI', '1')])
|
||||
builder.cdef(dst_fp.read())
|
||||
builder.cdef("""
|
||||
extern "Python" uintptr_t py_dc_callback(
|
||||
dc_context_t* context,
|
||||
int event,
|
||||
uintptr_t data1,
|
||||
uintptr_t data2);
|
||||
""")
|
||||
return builder
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue