fix: change reducer to take pointer to AppState to avoid stack overflow

Co-authored-by: aider (deepseek/deepseek-coder) <aider@aider.chat>
This commit is contained in:
Loic Coenen
2026-05-05 09:32:21 +00:00
parent 4167419d54
commit 8e05c2f0ab
3 changed files with 192 additions and 194 deletions

View File

@@ -222,8 +222,8 @@ void dispatcher_get_state(AppState *out);
AppState* dispatcher_get_state_ptr(void);
// ============================================================
// Reducer - pure function
// Reducer - pure function (takes pointer to avoid stack copy)
// ============================================================
AppState reducer(AppState state, Action action);
void reducer(AppState *state, Action action);
#endif // DISPATCHER_H