mirror of
https://github.com/deltachat/deltachat-core.git
synced 2025-10-06 03:50:08 +02:00
some initial test code, also fixing callback machinery to actually call the callback (thanks flub for the hint), also test file rename
This commit is contained in:
parent
9967b2127a
commit
eec2261cca
4 changed files with 100 additions and 18 deletions
|
@ -11,4 +11,8 @@ def py_dc_callback(ctx, evt, data1, data2):
|
|||
CFFI only allows us to set one global event handler, so this one
|
||||
looks up the correct event handler for the given context.
|
||||
"""
|
||||
return _DC_CALLBACK_MAP.get(ctx, lambda *a: 0)
|
||||
callback = _DC_CALLBACK_MAP.get(ctx, lambda *a: 0)
|
||||
ret = callback(ctx, evt, data1, data2)
|
||||
if ret is None:
|
||||
return 0
|
||||
return ret
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue