mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 10:37:38 -04:00
plugins: Simplify plugin/codec API versioning
Replace the minimum version bound with a check on the size of the API struct. The version only needs to be incremented for ABI breaking changes. Additions to the API won't need to touch the version number, resulting in fewer merge conflicts. Change-Id: I916a04a7bf5890dcf5d615ce30087643165f8e1f
This commit is contained in:
parent
2fb2364686
commit
d40a598970
7 changed files with 49 additions and 37 deletions
|
@ -83,9 +83,8 @@ enum plugin_status run_overlay(const void* parameter,
|
|||
goto error_close;
|
||||
}
|
||||
|
||||
|
||||
if (hdr->api_version > PLUGIN_API_VERSION
|
||||
|| hdr->api_version < PLUGIN_MIN_API_VERSION)
|
||||
if (hdr->api_version != PLUGIN_API_VERSION ||
|
||||
p_hdr->api_size > sizeof(struct plugin_api))
|
||||
{
|
||||
rb->splashf(2*HZ, "%s overlay: Incompatible version.", name);
|
||||
goto error_close;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue