Improve App callback mechanism #122

Merged
OragonEfreet merged 1 commit from release/1.0-update into release/1.0 2026-05-31 23:09:42 +02:00
Owner
  1. Setup callback signature changed:
    • Before: void (bj_app_setup_fn)(struct bj_app app, void** user_data)
    • After: void* (bj_app_setup_fn)(struct bj_app app, void* init_data)

Setup now returns void* (the user_data for other callbacks) instead of using an output parameter.
2. bj_run_app signature changed:
- Before: bj_run_app(setup, step, fixed_step, teardown)
- After: bj_run_app(setup, step, fixed_step, teardown, init_data)

Added init_data parameter at the end to pass configuration from main() to setup

Reviewed-on: #121

1. Setup callback signature changed: - Before: void (*bj_app_setup_fn)(struct bj_app* app, void** user_data) - After: void* (*bj_app_setup_fn)(struct bj_app* app, void* init_data) Setup now returns void* (the user_data for other callbacks) instead of using an output parameter. 2. bj_run_app signature changed: - Before: bj_run_app(setup, step, fixed_step, teardown) - After: bj_run_app(setup, step, fixed_step, teardown, init_data) Added init_data parameter at the end to pass configuration from main() to setup Reviewed-on: https://forge.codework-orange.com/OragonEfreet/banjo/pulls/121
Improve App callback mechanism
All checks were successful
Documentation / build-docs (push) Successful in 8s
QA / cert (push) Successful in 29s
Build and Test / linux-linux-gcc (push) Successful in 17s
Build and Test / linux-windows-mingw (push) Successful in 25s
Documentation / build-docs (pull_request) Successful in 8s
QA / cert (pull_request) Successful in 29s
Build and Test / linux-linux-gcc (pull_request) Successful in 17s
Build and Test / linux-windows-mingw (pull_request) Successful in 26s
c286d6ed2f
1. Setup callback signature changed:
    - Before: void (*bj_app_setup_fn)(struct bj_app* app, void** user_data)
    - After: void* (*bj_app_setup_fn)(struct bj_app* app, void* init_data)

  Setup now returns void* (the user_data for other callbacks) instead of using an output parameter.
  2. bj_run_app signature changed:
    - Before: bj_run_app(setup, step, fixed_step, teardown)
    - After: bj_run_app(setup, step, fixed_step, teardown, init_data)

  Added init_data parameter at the end to pass configuration from main() to setup

Reviewed-on: #121
OragonEfreet added this to the 1.0 milestone 2026-05-31 23:06:38 +02:00
OragonEfreet merged commit 4069592b40 into release/1.0 2026-05-31 23:09:42 +02:00
OragonEfreet deleted branch release/1.0-update 2026-05-31 23:09:42 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
OragonEfreet/banjo!122
No description provided.