1
0
Fork 0
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:
holger krekel 2018-09-04 15:38:18 +02:00
parent 9967b2127a
commit eec2261cca
4 changed files with 100 additions and 18 deletions

View file

@ -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