Skip to content

make runtime types internal - #557

Merged
Jamiras merged 5 commits into
RetroAchievements:developfrom
Jamiras:refactor/runtime_types
Oct 11, 2026
Merged

Jamiras merged 5 commits into
RetroAchievements:developfrom
Jamiras:refactor/runtime_types

Conversation

@Jamiras

@Jamiras Jamiras commented Oct 7, 2026

Copy link
Copy Markdown
Member

There shouldn't be anything interacting with the raw data structures anymore (rc_trigger_t, rc_lboard_t, etc). Clients should be interacting with an rc_runtime_t, or preferably an rc_client_t.

rc_runtime_types.h has been eliminated. All types previously defined in that file are now defined in individual header files in the src/runtime folder. If a client absolutely has need to use these types, they just need to move to the alternate headers.

Similarly, rc_internal.h has been broken up and the individual functions have been moved into their new type-specific internal header files.

Also, as part of this PR, I've removed the typedefs from forward-referenced types to eliminate pedantic compiler warnings without needing a bevy of #ifdefs. And I've cleaned up some of how the RC_ALLOC macro works.

@Jamiras Jamiras added this to the 13.0 milestone Oct 7, 2026
@Jamiras
Jamiras merged commit aed817f into RetroAchievements:develop Oct 11, 2026
7 checks passed
@Jamiras
Jamiras deleted the refactor/runtime_types branch October 11, 2026 13:04
scullymi added a commit to scullymi/rcheevos that referenced this pull request Oct 11, 2026
The conflicts in rc_alloc.c and rc_richpresence.c come from RetroAchievements#557: the checks are now made in the new rc_alloc() and rc_alloc_scratch(). Since RetroAchievements#557 the scratch pointer array is allocated on first use, so the first RC_ALLOC of a preparse can fail too: the root objects are checked before they are parsed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant