-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backport from dav1d 1.3.0: add dav1d_version_api
function
#771
Conversation
Signed-off-by: James Almer <[email protected]>
src/lib.rs
Outdated
/** | ||
* Get library API version. | ||
* | ||
* @return A value in the format 0x00XXYYZZ, where XX is the major version, | ||
* YY the minor version, and ZZ the patch version. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** | |
* Get library API version. | |
* | |
* @return A value in the format 0x00XXYYZZ, where XX is the major version, | |
* YY the minor version, and ZZ the patch version. | |
*/ | |
/// Get the `dav1d` library C API version. | |
/// | |
/// Return a value in the format `0x00XXYYZZ`, where `XX` is the major version, | |
/// `YY` the minor version, and `ZZ` the patch version. |
There's no reason to be so strict by ensuring the tool only works with a library built from the exact same git snapshot, when the only thing that matters is API availability and ABI compatibility. Signed-off-by: James Almer <[email protected]>
590fbc7
to
d7bdbcf
Compare
src/lib.rs
Outdated
#[no_mangle] | ||
#[cold] | ||
pub extern "C" fn dav1d_version_api() -> c_uint { | ||
<u32>::from_be_bytes([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need the <>
around u32
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No...
d7bdbcf
to
a005f95
Compare
Update test program to check API version.
No description provided.