util: add inline attributes
This commit is contained in:
parent
7ab04e200b
commit
4cc4ba3579
@ -16,18 +16,21 @@ use std::str::from_utf8_unchecked;
|
|||||||
|
|
||||||
use ffi::*;
|
use ffi::*;
|
||||||
|
|
||||||
|
#[inline(always)]
|
||||||
pub fn version() -> u32 {
|
pub fn version() -> u32 {
|
||||||
unsafe {
|
unsafe {
|
||||||
avutil_version()
|
avutil_version()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline(always)]
|
||||||
pub fn configuration() -> &'static str {
|
pub fn configuration() -> &'static str {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_utf8_unchecked(CStr::from_ptr(avutil_configuration()).to_bytes())
|
from_utf8_unchecked(CStr::from_ptr(avutil_configuration()).to_bytes())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline(always)]
|
||||||
pub fn license() -> &'static str {
|
pub fn license() -> &'static str {
|
||||||
unsafe {
|
unsafe {
|
||||||
from_utf8_unchecked(CStr::from_ptr(avutil_license()).to_bytes())
|
from_utf8_unchecked(CStr::from_ptr(avutil_license()).to_bytes())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user