You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add multi-callback regression test and release event callback dicts
Register PRESSED/RELEASED/CLICKED on one object in test_lvgl_cpython
to guard against add_event_cb clobbering regressions. Document fast
incremental rebuilds via setup.py build_ext --inplace. Release
per-registration callback dicts on event removal and object DELETE in
lvpy_runtime, with peek helpers for remove_event_cb wrappers.
Copy file name to clipboardExpand all lines: README.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -212,7 +212,7 @@ Phases 1–7 are enabled in the generator today. Smoke tests in `test_lvgl_cpyth
212
212
-**Display OO API**: no methods on `lv_display_t` wrappers; use `lv.display_*` module functions.
213
213
-**Prototype aliasing**: some widget `tp_methods` entries may point at the wrong C function when LVGL reuses prototypes; prefer module-level names when in doubt.
214
214
-**`C_Pointer` helper struct**: emitted late; a runtime stub is used until helper emission is complete.
215
-
-**Callback lifetime**: Python wrappers clear `lv_obj->user_data` on dealloc; long-running apps should keep references to objects that register callbacks.
215
+
-**Callback lifetime**: Per-registration callback dicts (`add_event_cb` with `user_data=None`) are released when the event is removed or the object is deleted. Python wrappers clear `lv_obj->user_data` on dealloc; long-running apps should still keep references to objects that register callbacks.
After the first full build, incremental rebuilds are much faster (only changed sources such as `generated/lvpy.c` are recompiled). From `lv_cpython_mod`, with `setuptools` and `wheel` installed in the target venv:
228
+
229
+
```bash
230
+
.venv/bin/python setup.py build_ext --inplace
231
+
```
232
+
233
+
With an editable install (`pip install -e .`), the updated `.so` / `.pyd` beside this repo is picked up immediately — no reinstall step needed.
234
+
227
235
Generator work lives in the [`lv_bindings`](https://github.com/PyDevices/lv_bindings) repository (`binding/emit_py_native.py`, `binding/emit_py_cp.py`, `binding/emit_cpython.py`). Runtime fixes and CPython-specific behavior belong here in `lvpy_runtime.c`.
0 commit comments