fix(raw.rs): pkg_cache_find_name_arch function signature
Removed from the function signature the parameter (arch: *const c_char) for alt-linux cfg
This commit is contained in:
parent
c7c7159bb1
commit
9a359a5e63
@ -35,10 +35,17 @@ extern "C" {
|
|||||||
|
|
||||||
pub fn pkg_cache_pkg_iter(cache: PCache) -> PPkgIterator;
|
pub fn pkg_cache_pkg_iter(cache: PCache) -> PPkgIterator;
|
||||||
pub fn pkg_cache_find_name(cache: PCache, name: *const c_char) -> PPkgIterator;
|
pub fn pkg_cache_find_name(cache: PCache, name: *const c_char) -> PPkgIterator;
|
||||||
|
#[cfg(feature = "alt-linux")]
|
||||||
pub fn pkg_cache_find_name_arch(
|
pub fn pkg_cache_find_name_arch(
|
||||||
cache: PCache,
|
cache: PCache,
|
||||||
name: *const c_char,
|
name: *const c_char,
|
||||||
) -> PPkgIterator;
|
) -> PPkgIterator;
|
||||||
|
#[cfg(not(feature = "alt-linux"))]
|
||||||
|
pub fn pkg_cache_find_name_arch(
|
||||||
|
cache: PCache,
|
||||||
|
name: *const c_char,
|
||||||
|
) -> PPkgIterator;
|
||||||
|
|
||||||
pub fn pkg_iter_release(iterator: PPkgIterator);
|
pub fn pkg_iter_release(iterator: PPkgIterator);
|
||||||
|
|
||||||
pub fn pkg_iter_next(iterator: PPkgIterator);
|
pub fn pkg_iter_next(iterator: PPkgIterator);
|
||||||
|
@ -66,7 +66,13 @@ impl Cache {
|
|||||||
unsafe {
|
unsafe {
|
||||||
let name = ffi::CString::new(name).unwrap();
|
let name = ffi::CString::new(name).unwrap();
|
||||||
let arch = ffi::CString::new(arch).unwrap();
|
let arch = ffi::CString::new(arch).unwrap();
|
||||||
|
|
||||||
|
#[cfg(feature = "alt-linux")]
|
||||||
|
let ptr = raw::pkg_cache_find_name_arch(lock.ptr, name.as_ptr());
|
||||||
|
|
||||||
|
#[cfg(not(feature = "alt-linux"))]
|
||||||
let ptr = raw::pkg_cache_find_name_arch(lock.ptr, name.as_ptr(), arch.as_ptr());
|
let ptr = raw::pkg_cache_find_name_arch(lock.ptr, name.as_ptr(), arch.as_ptr());
|
||||||
|
|
||||||
PkgIterator::new(lock, ptr)
|
PkgIterator::new(lock, ptr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user