fix: change dispatcher_get_state to avoid stack copy of AppState
Co-authored-by: aider (deepseek/deepseek-coder) <aider@aider.chat>
This commit is contained in:
@@ -111,11 +111,10 @@ static void notify_subscribers(AppState *state) {
|
||||
// State access
|
||||
// ============================================================
|
||||
|
||||
AppState dispatcher_get_state(void) {
|
||||
void dispatcher_get_state(AppState *out) {
|
||||
pthread_mutex_lock(&dispatcher.state_mutex);
|
||||
AppState state = dispatcher.state;
|
||||
*out = dispatcher.state;
|
||||
pthread_mutex_unlock(&dispatcher.state_mutex);
|
||||
return state;
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
|
||||
Reference in New Issue
Block a user