diff --git a/alpm-sys/src/ffi.rs b/alpm-sys/src/ffi.rs index a5b24ad..e2c36fd 100644 --- a/alpm-sys/src/ffi.rs +++ b/alpm-sys/src/ffi.rs @@ -1,6 +1,5 @@ -/* automatically generated by rust-bindgen 0.58.1 */ +/* automatically generated by rust-bindgen 0.66.1 */ -pub type __int64_t = ::std::os::raw::c_long; pub type __mode_t = ::std::os::raw::c_uint; pub type __off_t = ::std::os::raw::c_long; pub type mode_t = __mode_t; @@ -17,7 +16,7 @@ pub struct archive_entry { _unused: [u8; 0], } #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct __alpm_list_t { pub data: *mut ::std::os::raw::c_void, pub prev: *mut __alpm_list_t, @@ -25,6 +24,8 @@ pub struct __alpm_list_t { } #[test] fn bindgen_test_layout___alpm_list_t() { + const UNINIT: ::std::mem::MaybeUninit<__alpm_list_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__alpm_list_t>(), 24usize, @@ -36,7 +37,7 @@ fn bindgen_test_layout___alpm_list_t() { concat!("Alignment of ", stringify!(__alpm_list_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__alpm_list_t>())).data as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -46,7 +47,7 @@ fn bindgen_test_layout___alpm_list_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__alpm_list_t>())).prev as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).prev) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -56,7 +57,7 @@ fn bindgen_test_layout___alpm_list_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__alpm_list_t>())).next as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -216,48 +217,19 @@ extern "C" { size: usize, ) -> *mut ::std::os::raw::c_void; } -#[doc = " The libalpm context handle."] -#[doc = ""] -#[doc = " This struct represents an instance of libalpm."] -#[doc = " @ingroup libalpm_handle"] +#[doc = " The libalpm context handle.\n\n This struct represents an instance of libalpm.\n @ingroup libalpm_handle"] pub type alpm_handle_t = u8; -#[doc = " A database."] -#[doc = ""] -#[doc = " A database is a container that stores metadata about packages."] -#[doc = ""] -#[doc = " A database can be located on the local filesystem or on a remote server."] -#[doc = ""] -#[doc = " To use a database, it must first be registered via \\link alpm_register_syncdb \\endlink."] -#[doc = " If the database is already present in dbpath then it will be usable. Otherwise,"] -#[doc = " the database needs to be downloaded using \\link alpm_db_update \\endlink. Even if the"] -#[doc = " source of the database is the local filesystem."] -#[doc = ""] -#[doc = " After this, the database can be used to query packages and groups. Any packages or groups"] -#[doc = " from the database will continue to be owned by the database and do not need to be freed by"] -#[doc = " the user. They will be freed when the database is unregistered."] -#[doc = ""] -#[doc = " Databases are automatically unregistered when the \\link alpm_handle_t \\endlink is released."] -#[doc = " @ingroup libalpm_databases"] +#[doc = " A database.\n\n A database is a container that stores metadata about packages.\n\n A database can be located on the local filesystem or on a remote server.\n\n To use a database, it must first be registered via \\link alpm_register_syncdb \\endlink.\n If the database is already present in dbpath then it will be usable. Otherwise,\n the database needs to be downloaded using \\link alpm_db_update \\endlink. Even if the\n source of the database is the local filesystem.\n\n After this, the database can be used to query packages and groups. Any packages or groups\n from the database will continue to be owned by the database and do not need to be freed by\n the user. They will be freed when the database is unregistered.\n\n Databases are automatically unregistered when the \\link alpm_handle_t \\endlink is released.\n @ingroup libalpm_databases"] pub type alpm_db_t = u8; -#[doc = " A package."] -#[doc = ""] -#[doc = " A package can be loaded from disk via \\link alpm_pkg_load \\endlink or retrieved from a database."] -#[doc = " Packages from databases are automatically freed when the database is unregistered. Packages loaded"] -#[doc = " from a file must be freed manually."] -#[doc = ""] -#[doc = " Packages can then be queried for metadata or added to a \\link alpm_trans_t transaction \\endlink"] -#[doc = " to be added or removed from the system."] -#[doc = " @ingroup libalpm_packages"] +#[doc = " A package.\n\n A package can be loaded from disk via \\link alpm_pkg_load \\endlink or retrieved from a database.\n Packages from databases are automatically freed when the database is unregistered. Packages loaded\n from a file must be freed manually.\n\n Packages can then be queried for metadata or added to a \\link alpm_trans_t transaction \\endlink\n to be added or removed from the system.\n @ingroup libalpm_packages"] pub type alpm_pkg_t = u8; -#[doc = " Transaction structure used internally by libalpm"] -#[doc = " @ingroup libalpm_trans"] +#[doc = " Transaction structure used internally by libalpm\n @ingroup libalpm_trans"] pub type alpm_trans_t = u8; -#[doc = " The time type used by libalpm. Represents a unix time stamp"] -#[doc = " @ingroup libalpm_misc"] +#[doc = " The time type used by libalpm. Represents a unix time stamp\n @ingroup libalpm_misc"] pub type alpm_time_t = i64; #[doc = " File in a package"] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_file_t { #[doc = " Name of the file"] pub name: *mut ::std::os::raw::c_char, @@ -268,6 +240,8 @@ pub struct _alpm_file_t { } #[test] fn bindgen_test_layout__alpm_file_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_file_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_file_t>(), 24usize, @@ -279,7 +253,7 @@ fn bindgen_test_layout__alpm_file_t() { concat!("Alignment of ", stringify!(_alpm_file_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_file_t>())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -289,7 +263,7 @@ fn bindgen_test_layout__alpm_file_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_file_t>())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -299,7 +273,7 @@ fn bindgen_test_layout__alpm_file_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_file_t>())).mode as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -313,7 +287,7 @@ fn bindgen_test_layout__alpm_file_t() { pub type alpm_file_t = _alpm_file_t; #[doc = " Package filelist container"] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_filelist_t { #[doc = " Amount of files in the array"] pub count: usize, @@ -322,6 +296,8 @@ pub struct _alpm_filelist_t { } #[test] fn bindgen_test_layout__alpm_filelist_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_filelist_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_filelist_t>(), 16usize, @@ -333,7 +309,7 @@ fn bindgen_test_layout__alpm_filelist_t() { concat!("Alignment of ", stringify!(_alpm_filelist_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_filelist_t>())).count as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -343,7 +319,7 @@ fn bindgen_test_layout__alpm_filelist_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_filelist_t>())).files as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).files) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -357,7 +333,7 @@ fn bindgen_test_layout__alpm_filelist_t() { pub type alpm_filelist_t = _alpm_filelist_t; #[doc = " Local package or package file backup entry"] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_backup_t { #[doc = " Name of the file (without .pacsave extension)"] pub name: *mut ::std::os::raw::c_char, @@ -366,6 +342,8 @@ pub struct _alpm_backup_t { } #[test] fn bindgen_test_layout__alpm_backup_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_backup_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_backup_t>(), 16usize, @@ -377,7 +355,7 @@ fn bindgen_test_layout__alpm_backup_t() { concat!("Alignment of ", stringify!(_alpm_backup_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_backup_t>())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -387,7 +365,7 @@ fn bindgen_test_layout__alpm_backup_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_backup_t>())).hash as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -400,13 +378,7 @@ fn bindgen_test_layout__alpm_backup_t() { #[doc = " Local package or package file backup entry"] pub type alpm_backup_t = _alpm_backup_t; extern "C" { - #[doc = " Determines whether a package filelist contains a given path."] - #[doc = " The provided path should be relative to the install root with no leading"] - #[doc = " slashes, e.g. \"etc/localtime\". When searching for directories, the path must"] - #[doc = " have a trailing slash."] - #[doc = " @param filelist a pointer to a package filelist"] - #[doc = " @param path the path to search for in the package"] - #[doc = " @return a pointer to the matching file or NULL if not found"] + #[doc = " Determines whether a package filelist contains a given path.\n The provided path should be relative to the install root with no leading\n slashes, e.g. \"etc/localtime\". When searching for directories, the path must\n have a trailing slash.\n @param filelist a pointer to a package filelist\n @param path the path to search for in the package\n @return a pointer to the matching file or NULL if not found"] pub fn alpm_filelist_contains( filelist: *mut alpm_filelist_t, path: *const ::std::os::raw::c_char, @@ -414,7 +386,7 @@ extern "C" { } #[doc = " Package group"] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_group_t { #[doc = " group name"] pub name: *mut ::std::os::raw::c_char, @@ -423,6 +395,8 @@ pub struct _alpm_group_t { } #[test] fn bindgen_test_layout__alpm_group_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_group_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_group_t>(), 16usize, @@ -434,7 +408,7 @@ fn bindgen_test_layout__alpm_group_t() { concat!("Alignment of ", stringify!(_alpm_group_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_group_t>())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -444,7 +418,7 @@ fn bindgen_test_layout__alpm_group_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_group_t>())).packages as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).packages) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -457,12 +431,7 @@ fn bindgen_test_layout__alpm_group_t() { #[doc = " Package group"] pub type alpm_group_t = _alpm_group_t; extern "C" { - #[doc = " Find group members across a list of databases."] - #[doc = " If a member exists in several databases, only the first database is used."] - #[doc = " IgnorePkg is also handled."] - #[doc = " @param dbs the list of alpm_db_t *"] - #[doc = " @param name the name of the group"] - #[doc = " @return the list of alpm_pkg_t * (caller is responsible for alpm_list_free)"] + #[doc = " Find group members across a list of databases.\n If a member exists in several databases, only the first database is used.\n IgnorePkg is also handled.\n @param dbs the list of alpm_db_t *\n @param name the name of the group\n @return the list of alpm_pkg_t * (caller is responsible for alpm_list_free)"] pub fn alpm_find_group_pkgs( dbs: *mut alpm_list_t, name: *const ::std::os::raw::c_char, @@ -470,7 +439,7 @@ extern "C" { } #[repr(u32)] #[doc = " libalpm's error type"] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum _alpm_errno_t { #[doc = " No error"] ALPM_ERR_OK = 0, @@ -586,25 +555,15 @@ pub enum _alpm_errno_t { #[doc = " libalpm's error type"] pub use self::_alpm_errno_t as alpm_errno_t; extern "C" { - #[doc = " Returns the current error code from the handle."] - #[doc = " @param handle the context handle"] - #[doc = " @return the current error code of the handle"] + #[doc = " Returns the current error code from the handle.\n @param handle the context handle\n @return the current error code of the handle"] pub fn alpm_errno(handle: *mut alpm_handle_t) -> alpm_errno_t; } extern "C" { - #[doc = " Returns the string corresponding to an error number."] - #[doc = " @param err the error code to get the string for"] - #[doc = " @return the string relating to the given error code"] + #[doc = " Returns the string corresponding to an error number.\n @param err the error code to get the string for\n @return the string relating to the given error code"] pub fn alpm_strerror(err: alpm_errno_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Initializes the library."] - #[doc = " Creates handle, connects to database and creates lockfile."] - #[doc = " This must be called before any other functions are called."] - #[doc = " @param root the root path for all filesystem operations"] - #[doc = " @param dbpath the absolute path to the libalpm database"] - #[doc = " @param err an optional variable to hold any error return codes"] - #[doc = " @return a context handle on success, NULL on error, err will be set if provided"] + #[doc = " Initializes the library.\n Creates handle, connects to database and creates lockfile.\n This must be called before any other functions are called.\n @param root the root path for all filesystem operations\n @param dbpath the absolute path to the libalpm database\n @param err an optional variable to hold any error return codes\n @return a context handle on success, NULL on error, err will be set if provided"] pub fn alpm_initialize( root: *const ::std::os::raw::c_char, dbpath: *const ::std::os::raw::c_char, @@ -612,13 +571,7 @@ extern "C" { ) -> *mut alpm_handle_t; } extern "C" { - #[doc = " Release the library."] - #[doc = " Disconnects from the database, removes handle and lockfile"] - #[doc = " This should be the last alpm call you make."] - #[doc = " After this returns, handle should be considered invalid and cannot be reused"] - #[doc = " in any way."] - #[doc = " @param handle the context handle"] - #[doc = " @return 0 on success, -1 on error"] + #[doc = " Release the library.\n Disconnects from the database, removes handle and lockfile\n This should be the last alpm call you make.\n After this returns, handle should be considered invalid and cannot be reused\n in any way.\n @param handle the context handle\n @return 0 on success, -1 on error"] pub fn alpm_release(handle: *mut alpm_handle_t) -> ::std::os::raw::c_int; } pub mod _alpm_siglevel_t { @@ -626,18 +579,15 @@ pub mod _alpm_siglevel_t { pub type Type = ::std::os::raw::c_uint; #[doc = " Packages require a signature"] pub const ALPM_SIG_PACKAGE: Type = 1; - #[doc = " Packages do not require a signature,"] - #[doc = " but check packages that do have signatures"] + #[doc = " Packages do not require a signature,\n but check packages that do have signatures"] pub const ALPM_SIG_PACKAGE_OPTIONAL: Type = 2; - #[doc = " Packages do not require a signature,"] - #[doc = " but check packages that do have signatures"] + #[doc = " Packages do not require a signature,\n but check packages that do have signatures"] pub const ALPM_SIG_PACKAGE_MARGINAL_OK: Type = 4; #[doc = " Allow packages with signatures that are unknown trust"] pub const ALPM_SIG_PACKAGE_UNKNOWN_OK: Type = 8; #[doc = " Databases require a signature"] pub const ALPM_SIG_DATABASE: Type = 1024; - #[doc = " Databases do not require a signature,"] - #[doc = " but check databases that do have signatures"] + #[doc = " Databases do not require a signature,\n but check databases that do have signatures"] pub const ALPM_SIG_DATABASE_OPTIONAL: Type = 2048; #[doc = " Allow databases with signatures that are marginal trust"] pub const ALPM_SIG_DATABASE_MARGINAL_OK: Type = 4096; @@ -650,7 +600,7 @@ pub mod _alpm_siglevel_t { pub use self::_alpm_siglevel_t::Type as alpm_siglevel_t; #[repr(u32)] #[doc = " PGP signature verification status return codes"] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum _alpm_sigstatus_t { #[doc = " Signature is valid"] ALPM_SIGSTATUS_VALID = 0, @@ -669,7 +619,7 @@ pub enum _alpm_sigstatus_t { pub use self::_alpm_sigstatus_t as alpm_sigstatus_t; #[repr(u32)] #[doc = " The trust level of a PGP key"] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum _alpm_sigvalidity_t { #[doc = " The signature is fully trusted"] ALPM_SIGVALIDITY_FULL = 0, @@ -684,7 +634,7 @@ pub enum _alpm_sigvalidity_t { pub use self::_alpm_sigvalidity_t as alpm_sigvalidity_t; #[doc = " A PGP key"] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_pgpkey_t { #[doc = " The actual key data"] pub data: *mut ::std::os::raw::c_void, @@ -704,16 +654,13 @@ pub struct _alpm_pgpkey_t { pub length: ::std::os::raw::c_uint, #[doc = " has the key been revoked"] pub revoked: ::std::os::raw::c_uint, - #[doc = " A character representing the encryption algorithm used by the public key"] - #[doc = ""] - #[doc = " ? = unknown"] - #[doc = " R = RSA"] - #[doc = " D = DSA"] - #[doc = " E = EDDSA"] + #[doc = " A character representing the encryption algorithm used by the public key\n\n ? = unknown\n R = RSA\n D = DSA\n E = EDDSA"] pub pubkey_algo: ::std::os::raw::c_char, } #[test] fn bindgen_test_layout__alpm_pgpkey_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_pgpkey_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_pgpkey_t>(), 72usize, @@ -725,7 +672,7 @@ fn bindgen_test_layout__alpm_pgpkey_t() { concat!("Alignment of ", stringify!(_alpm_pgpkey_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_pgpkey_t>())).data as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -735,7 +682,7 @@ fn bindgen_test_layout__alpm_pgpkey_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_pgpkey_t>())).fingerprint as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).fingerprint) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -745,7 +692,7 @@ fn bindgen_test_layout__alpm_pgpkey_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_pgpkey_t>())).uid as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).uid) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -755,7 +702,7 @@ fn bindgen_test_layout__alpm_pgpkey_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_pgpkey_t>())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -765,7 +712,7 @@ fn bindgen_test_layout__alpm_pgpkey_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_pgpkey_t>())).email as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).email) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -775,7 +722,7 @@ fn bindgen_test_layout__alpm_pgpkey_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_pgpkey_t>())).created as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).created) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -785,7 +732,7 @@ fn bindgen_test_layout__alpm_pgpkey_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_pgpkey_t>())).expires as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).expires) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -795,7 +742,7 @@ fn bindgen_test_layout__alpm_pgpkey_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_pgpkey_t>())).length as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -805,7 +752,7 @@ fn bindgen_test_layout__alpm_pgpkey_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_pgpkey_t>())).revoked as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).revoked) as usize - ptr as usize }, 60usize, concat!( "Offset of field: ", @@ -815,7 +762,7 @@ fn bindgen_test_layout__alpm_pgpkey_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_pgpkey_t>())).pubkey_algo as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pubkey_algo) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", @@ -827,10 +774,9 @@ fn bindgen_test_layout__alpm_pgpkey_t() { } #[doc = " A PGP key"] pub type alpm_pgpkey_t = _alpm_pgpkey_t; -#[doc = " Signature result. Contains the key, status, and validity of a given"] -#[doc = " signature."] +#[doc = " Signature result. Contains the key, status, and validity of a given\n signature."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_sigresult_t { #[doc = " The key of the signature"] pub key: alpm_pgpkey_t, @@ -841,6 +787,8 @@ pub struct _alpm_sigresult_t { } #[test] fn bindgen_test_layout__alpm_sigresult_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_sigresult_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_sigresult_t>(), 80usize, @@ -852,7 +800,7 @@ fn bindgen_test_layout__alpm_sigresult_t() { concat!("Alignment of ", stringify!(_alpm_sigresult_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_sigresult_t>())).key as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -862,7 +810,7 @@ fn bindgen_test_layout__alpm_sigresult_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_sigresult_t>())).status as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", @@ -872,7 +820,7 @@ fn bindgen_test_layout__alpm_sigresult_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_sigresult_t>())).validity as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).validity) as usize - ptr as usize }, 76usize, concat!( "Offset of field: ", @@ -882,13 +830,11 @@ fn bindgen_test_layout__alpm_sigresult_t() { ) ); } -#[doc = " Signature result. Contains the key, status, and validity of a given"] -#[doc = " signature."] +#[doc = " Signature result. Contains the key, status, and validity of a given\n signature."] pub type alpm_sigresult_t = _alpm_sigresult_t; -#[doc = " Signature list. Contains the number of signatures found and a pointer to an"] -#[doc = " array of results. The array is of size count."] +#[doc = " Signature list. Contains the number of signatures found and a pointer to an\n array of results. The array is of size count."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_siglist_t { #[doc = " The amount of results in the array"] pub count: usize, @@ -897,6 +843,8 @@ pub struct _alpm_siglist_t { } #[test] fn bindgen_test_layout__alpm_siglist_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_siglist_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_siglist_t>(), 16usize, @@ -908,7 +856,7 @@ fn bindgen_test_layout__alpm_siglist_t() { concat!("Alignment of ", stringify!(_alpm_siglist_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_siglist_t>())).count as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -918,7 +866,7 @@ fn bindgen_test_layout__alpm_siglist_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_siglist_t>())).results as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).results) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -928,43 +876,28 @@ fn bindgen_test_layout__alpm_siglist_t() { ) ); } -#[doc = " Signature list. Contains the number of signatures found and a pointer to an"] -#[doc = " array of results. The array is of size count."] +#[doc = " Signature list. Contains the number of signatures found and a pointer to an\n array of results. The array is of size count."] pub type alpm_siglist_t = _alpm_siglist_t; extern "C" { - #[doc = " Check the PGP signature for the given package file."] - #[doc = " @param pkg the package to check"] - #[doc = " @param siglist a pointer to storage for signature results"] - #[doc = " @return a int value : 0 (valid), 1 (invalid), -1 (an error occurred)"] + #[doc = " Check the PGP signature for the given package file.\n @param pkg the package to check\n @param siglist a pointer to storage for signature results\n @return a int value : 0 (valid), 1 (invalid), -1 (an error occurred)"] pub fn alpm_pkg_check_pgp_signature( pkg: *mut alpm_pkg_t, siglist: *mut alpm_siglist_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Check the PGP signature for the given database."] - #[doc = " @param db the database to check"] - #[doc = " @param siglist a pointer to storage for signature results"] - #[doc = " @return a int value : 0 (valid), 1 (invalid), -1 (an error occurred)"] + #[doc = " Check the PGP signature for the given database.\n @param db the database to check\n @param siglist a pointer to storage for signature results\n @return a int value : 0 (valid), 1 (invalid), -1 (an error occurred)"] pub fn alpm_db_check_pgp_signature( db: *mut alpm_db_t, siglist: *mut alpm_siglist_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Clean up and free a signature result list."] - #[doc = " Note that this does not free the siglist object itself in case that"] - #[doc = " was allocated on the stack; this is the responsibility of the caller."] - #[doc = " @param siglist a pointer to storage for signature results"] - #[doc = " @return 0 on success, -1 on error"] + #[doc = " Clean up and free a signature result list.\n Note that this does not free the siglist object itself in case that\n was allocated on the stack; this is the responsibility of the caller.\n @param siglist a pointer to storage for signature results\n @return 0 on success, -1 on error"] pub fn alpm_siglist_cleanup(siglist: *mut alpm_siglist_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Decode a loaded signature in base64 form."] - #[doc = " @param base64_data the signature to attempt to decode"] - #[doc = " @param data the decoded data; must be freed by the caller"] - #[doc = " @param data_len the length of the returned data"] - #[doc = " @return 0 on success, -1 on failure to properly decode"] + #[doc = " Decode a loaded signature in base64 form.\n @param base64_data the signature to attempt to decode\n @param data the decoded data; must be freed by the caller\n @param data_len the length of the returned data\n @return 0 on success, -1 on failure to properly decode"] pub fn alpm_decode_signature( base64_data: *const ::std::os::raw::c_char, data: *mut *mut ::std::os::raw::c_uchar, @@ -972,14 +905,7 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Extract the Issuer Key ID from a signature"] - #[doc = " @param handle the context handle"] - #[doc = " @param identifier the identifier of the key."] - #[doc = " This may be the name of the package or the path to the package."] - #[doc = " @param sig PGP signature"] - #[doc = " @param len length of signature"] - #[doc = " @param keys a pointer to storage for key IDs"] - #[doc = " @return 0 on success, -1 on error"] + #[doc = " Extract the Issuer Key ID from a signature\n @param handle the context handle\n @param identifier the identifier of the key.\n This may be the name of the package or the path to the package.\n @param sig PGP signature\n @param len length of signature\n @param keys a pointer to storage for key IDs\n @return 0 on success, -1 on error"] pub fn alpm_extract_keyid( handle: *mut alpm_handle_t, identifier: *const ::std::os::raw::c_char, @@ -990,7 +916,7 @@ extern "C" { } #[repr(u32)] #[doc = " Types of version constraints in dependency specs."] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum _alpm_depmod_t { #[doc = " No version constraint"] ALPM_DEP_MOD_ANY = 1, @@ -1008,26 +934,19 @@ pub enum _alpm_depmod_t { #[doc = " Types of version constraints in dependency specs."] pub use self::_alpm_depmod_t as alpm_depmod_t; #[repr(u32)] -#[doc = " File conflict type."] -#[doc = " Whether the conflict results from a file existing on the filesystem, or with"] -#[doc = " another target in the transaction."] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +#[doc = " File conflict type.\n Whether the conflict results from a file existing on the filesystem, or with\n another target in the transaction."] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum _alpm_fileconflicttype_t { #[doc = " The conflict results with a another target in the transaction"] ALPM_FILECONFLICT_TARGET = 1, #[doc = " The conflict results from a file existing on the filesystem"] ALPM_FILECONFLICT_FILESYSTEM = 2, } -#[doc = " File conflict type."] -#[doc = " Whether the conflict results from a file existing on the filesystem, or with"] -#[doc = " another target in the transaction."] +#[doc = " File conflict type.\n Whether the conflict results from a file existing on the filesystem, or with\n another target in the transaction."] pub use self::_alpm_fileconflicttype_t as alpm_fileconflicttype_t; -#[doc = " The basic dependency type."] -#[doc = ""] -#[doc = " This type is used throughout libalpm, not just for dependencies"] -#[doc = " but also conflicts and providers."] +#[doc = " The basic dependency type.\n\n This type is used throughout libalpm, not just for dependencies\n but also conflicts and providers."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_depend_t { #[doc = " Name of the provider to satisfy this dependency"] pub name: *mut ::std::os::raw::c_char, @@ -1042,6 +961,8 @@ pub struct _alpm_depend_t { } #[test] fn bindgen_test_layout__alpm_depend_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_depend_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_depend_t>(), 40usize, @@ -1053,7 +974,7 @@ fn bindgen_test_layout__alpm_depend_t() { concat!("Alignment of ", stringify!(_alpm_depend_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_depend_t>())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1063,7 +984,7 @@ fn bindgen_test_layout__alpm_depend_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_depend_t>())).version as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1073,7 +994,7 @@ fn bindgen_test_layout__alpm_depend_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_depend_t>())).desc as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).desc) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1083,7 +1004,7 @@ fn bindgen_test_layout__alpm_depend_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_depend_t>())).name_hash as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name_hash) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -1093,7 +1014,7 @@ fn bindgen_test_layout__alpm_depend_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_depend_t>())).mod_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).mod_) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -1103,25 +1024,23 @@ fn bindgen_test_layout__alpm_depend_t() { ) ); } -#[doc = " The basic dependency type."] -#[doc = ""] -#[doc = " This type is used throughout libalpm, not just for dependencies"] -#[doc = " but also conflicts and providers."] +#[doc = " The basic dependency type.\n\n This type is used throughout libalpm, not just for dependencies\n but also conflicts and providers."] pub type alpm_depend_t = _alpm_depend_t; #[doc = " Missing dependency."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_depmissing_t { #[doc = " Name of the package that has the dependency"] pub target: *mut ::std::os::raw::c_char, #[doc = " The dependency that was wanted"] pub depend: *mut alpm_depend_t, - #[doc = " If the depmissing was caused by a conflict, the name of the package"] - #[doc = " that would be installed, causing the satisfying package to be removed"] + #[doc = " If the depmissing was caused by a conflict, the name of the package\n that would be installed, causing the satisfying package to be removed"] pub causingpkg: *mut ::std::os::raw::c_char, } #[test] fn bindgen_test_layout__alpm_depmissing_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_depmissing_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_depmissing_t>(), 24usize, @@ -1133,7 +1052,7 @@ fn bindgen_test_layout__alpm_depmissing_t() { concat!("Alignment of ", stringify!(_alpm_depmissing_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_depmissing_t>())).target as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).target) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1143,7 +1062,7 @@ fn bindgen_test_layout__alpm_depmissing_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_depmissing_t>())).depend as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).depend) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1153,7 +1072,7 @@ fn bindgen_test_layout__alpm_depmissing_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_depmissing_t>())).causingpkg as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).causingpkg) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1167,13 +1086,11 @@ fn bindgen_test_layout__alpm_depmissing_t() { pub type alpm_depmissing_t = _alpm_depmissing_t; #[doc = " A conflict that has occurred between two packages."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_conflict_t { - #[doc = " Hash of the first package name"] - #[doc = " (used internally to speed up conflict checks)"] + #[doc = " Hash of the first package name\n (used internally to speed up conflict checks)"] pub package1_hash: ::std::os::raw::c_ulong, - #[doc = " Hash of the second package name"] - #[doc = " (used internally to speed up conflict checks)"] + #[doc = " Hash of the second package name\n (used internally to speed up conflict checks)"] pub package2_hash: ::std::os::raw::c_ulong, #[doc = " Name of the first package"] pub package1: *mut ::std::os::raw::c_char, @@ -1184,6 +1101,8 @@ pub struct _alpm_conflict_t { } #[test] fn bindgen_test_layout__alpm_conflict_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_conflict_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_conflict_t>(), 40usize, @@ -1195,7 +1114,7 @@ fn bindgen_test_layout__alpm_conflict_t() { concat!("Alignment of ", stringify!(_alpm_conflict_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_conflict_t>())).package1_hash as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).package1_hash) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1205,7 +1124,7 @@ fn bindgen_test_layout__alpm_conflict_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_conflict_t>())).package2_hash as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).package2_hash) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1215,7 +1134,7 @@ fn bindgen_test_layout__alpm_conflict_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_conflict_t>())).package1 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).package1) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1225,7 +1144,7 @@ fn bindgen_test_layout__alpm_conflict_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_conflict_t>())).package2 as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).package2) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -1235,7 +1154,7 @@ fn bindgen_test_layout__alpm_conflict_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_conflict_t>())).reason as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reason) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -1247,13 +1166,9 @@ fn bindgen_test_layout__alpm_conflict_t() { } #[doc = " A conflict that has occurred between two packages."] pub type alpm_conflict_t = _alpm_conflict_t; -#[doc = " File conflict."] -#[doc = ""] -#[doc = " A conflict that has happened due to a two packages containing the same file,"] -#[doc = " or a package contains a file that is already on the filesystem and not owned"] -#[doc = " by that package."] +#[doc = " File conflict.\n\n A conflict that has happened due to a two packages containing the same file,\n or a package contains a file that is already on the filesystem and not owned\n by that package."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_fileconflict_t { #[doc = " The name of the package that caused the conflict"] pub target: *mut ::std::os::raw::c_char, @@ -1266,6 +1181,8 @@ pub struct _alpm_fileconflict_t { } #[test] fn bindgen_test_layout__alpm_fileconflict_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_fileconflict_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_fileconflict_t>(), 32usize, @@ -1277,7 +1194,7 @@ fn bindgen_test_layout__alpm_fileconflict_t() { concat!("Alignment of ", stringify!(_alpm_fileconflict_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_fileconflict_t>())).target as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).target) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1287,7 +1204,7 @@ fn bindgen_test_layout__alpm_fileconflict_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_fileconflict_t>())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1297,7 +1214,7 @@ fn bindgen_test_layout__alpm_fileconflict_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_fileconflict_t>())).file as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).file) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1307,7 +1224,7 @@ fn bindgen_test_layout__alpm_fileconflict_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_fileconflict_t>())).ctarget as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ctarget) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -1317,21 +1234,10 @@ fn bindgen_test_layout__alpm_fileconflict_t() { ) ); } -#[doc = " File conflict."] -#[doc = ""] -#[doc = " A conflict that has happened due to a two packages containing the same file,"] -#[doc = " or a package contains a file that is already on the filesystem and not owned"] -#[doc = " by that package."] +#[doc = " File conflict.\n\n A conflict that has happened due to a two packages containing the same file,\n or a package contains a file that is already on the filesystem and not owned\n by that package."] pub type alpm_fileconflict_t = _alpm_fileconflict_t; extern "C" { - #[doc = " Checks dependencies and returns missing ones in a list."] - #[doc = " Dependencies can include versions with depmod operators."] - #[doc = " @param handle the context handle"] - #[doc = " @param pkglist the list of local packages"] - #[doc = " @param remove an alpm_list_t* of packages to be removed"] - #[doc = " @param upgrade an alpm_list_t* of packages to be upgraded (remove-then-upgrade)"] - #[doc = " @param reversedeps handles the backward dependencies"] - #[doc = " @return an alpm_list_t* of alpm_depmissing_t pointers."] + #[doc = " Checks dependencies and returns missing ones in a list.\n Dependencies can include versions with depmod operators.\n @param handle the context handle\n @param pkglist the list of local packages\n @param remove an alpm_list_t* of packages to be removed\n @param upgrade an alpm_list_t* of packages to be upgraded (remove-then-upgrade)\n @param reversedeps handles the backward dependencies\n @return an alpm_list_t* of alpm_depmissing_t pointers."] pub fn alpm_checkdeps( handle: *mut alpm_handle_t, pkglist: *mut alpm_list_t, @@ -1341,28 +1247,14 @@ extern "C" { ) -> *mut alpm_list_t; } extern "C" { - #[doc = " Find a package satisfying a specified dependency."] - #[doc = " The dependency can include versions with depmod operators."] - #[doc = " @param pkgs an alpm_list_t* of alpm_pkg_t where the satisfyer will be searched"] - #[doc = " @param depstring package or provision name, versioned or not"] - #[doc = " @return a alpm_pkg_t* satisfying depstring"] + #[doc = " Find a package satisfying a specified dependency.\n The dependency can include versions with depmod operators.\n @param pkgs an alpm_list_t* of alpm_pkg_t where the satisfyer will be searched\n @param depstring package or provision name, versioned or not\n @return a alpm_pkg_t* satisfying depstring"] pub fn alpm_find_satisfier( pkgs: *mut alpm_list_t, depstring: *const ::std::os::raw::c_char, ) -> *mut alpm_pkg_t; } extern "C" { - #[doc = " Find a package satisfying a specified dependency."] - #[doc = " First look for a literal, going through each db one by one. Then look for"] - #[doc = " providers. The first satisfyer that belongs to an installed package is"] - #[doc = " returned. If no providers belong to an installed package then an"] - #[doc = " alpm_question_select_provider_t is created to select the provider."] - #[doc = " The dependency can include versions with depmod operators."] - #[doc = ""] - #[doc = " @param handle the context handle"] - #[doc = " @param dbs an alpm_list_t* of alpm_db_t where the satisfyer will be searched"] - #[doc = " @param depstring package or provision name, versioned or not"] - #[doc = " @return a alpm_pkg_t* satisfying depstring"] + #[doc = " Find a package satisfying a specified dependency.\n First look for a literal, going through each db one by one. Then look for\n providers. The first satisfyer that belongs to an installed package is\n returned. If no providers belong to an installed package then an\n alpm_question_select_provider_t is created to select the provider.\n The dependency can include versions with depmod operators.\n\n @param handle the context handle\n @param dbs an alpm_list_t* of alpm_db_t where the satisfyer will be searched\n @param depstring package or provision name, versioned or not\n @return a alpm_pkg_t* satisfying depstring"] pub fn alpm_find_dbs_satisfier( handle: *mut alpm_handle_t, dbs: *mut alpm_list_t, @@ -1370,53 +1262,39 @@ extern "C" { ) -> *mut alpm_pkg_t; } extern "C" { - #[doc = " Check the package conflicts in a database"] - #[doc = ""] - #[doc = " @param handle the context handle"] - #[doc = " @param pkglist the list of packages to check"] - #[doc = ""] - #[doc = " @return an alpm_list_t of alpm_conflict_t"] + #[doc = " Check the package conflicts in a database\n\n @param handle the context handle\n @param pkglist the list of packages to check\n\n @return an alpm_list_t of alpm_conflict_t"] pub fn alpm_checkconflicts( handle: *mut alpm_handle_t, pkglist: *mut alpm_list_t, ) -> *mut alpm_list_t; } extern "C" { - #[doc = " Returns a newly allocated string representing the dependency information."] - #[doc = " @param dep a dependency info structure"] - #[doc = " @return a formatted string, e.g. \"glibc>=2.12\""] + #[doc = " Returns a newly allocated string representing the dependency information.\n @param dep a dependency info structure\n @return a formatted string, e.g. \"glibc>=2.12\""] pub fn alpm_dep_compute_string(dep: *const alpm_depend_t) -> *mut ::std::os::raw::c_char; } extern "C" { - #[doc = " Return a newly allocated dependency information parsed from a string"] - #[doc = "\\link alpm_dep_free should be used to free the dependency \\endlink"] - #[doc = " @param depstring a formatted string, e.g. \"glibc=2.12\""] - #[doc = " @return a dependency info structure"] + #[doc = " Return a newly allocated dependency information parsed from a string\n\\link alpm_dep_free should be used to free the dependency \\endlink\n @param depstring a formatted string, e.g. \"glibc=2.12\"\n @return a dependency info structure"] pub fn alpm_dep_from_string(depstring: *const ::std::os::raw::c_char) -> *mut alpm_depend_t; } extern "C" { - #[doc = " Free a dependency info structure"] - #[doc = " @param dep struct to free"] + #[doc = " Free a dependency info structure\n @param dep struct to free"] pub fn alpm_dep_free(dep: *mut alpm_depend_t); } extern "C" { - #[doc = " Free a fileconflict and its members."] - #[doc = " @param conflict the fileconflict to free"] + #[doc = " Free a fileconflict and its members.\n @param conflict the fileconflict to free"] pub fn alpm_fileconflict_free(conflict: *mut alpm_fileconflict_t); } extern "C" { - #[doc = " Free a depmissing and its members"] - #[doc = " @param miss the depmissing to free"] + #[doc = " Free a depmissing and its members\n @param miss the depmissing to free"] pub fn alpm_depmissing_free(miss: *mut alpm_depmissing_t); } extern "C" { - #[doc = " Free a conflict and its members."] - #[doc = " @param conflict the conflict to free"] + #[doc = " Free a conflict and its members.\n @param conflict the conflict to free"] pub fn alpm_conflict_free(conflict: *mut alpm_conflict_t); } #[repr(u32)] #[doc = " Type of events."] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum _alpm_event_type_t { #[doc = " Dependencies will be computed for a package."] ALPM_EVENT_CHECKDEPS_START = 1, @@ -1438,11 +1316,9 @@ pub enum _alpm_event_type_t { ALPM_EVENT_TRANSACTION_START = 9, #[doc = " Processing the package transaction is finished."] ALPM_EVENT_TRANSACTION_DONE = 10, - #[doc = " Package will be installed/upgraded/downgraded/re-installed/removed; See"] - #[doc = " alpm_event_package_operation_t for arguments."] + #[doc = " Package will be installed/upgraded/downgraded/re-installed/removed; See\n alpm_event_package_operation_t for arguments."] ALPM_EVENT_PACKAGE_OPERATION_START = 11, - #[doc = " Package was installed/upgraded/downgraded/re-installed/removed; See"] - #[doc = " alpm_event_package_operation_t for arguments."] + #[doc = " Package was installed/upgraded/downgraded/re-installed/removed; See\n alpm_event_package_operation_t for arguments."] ALPM_EVENT_PACKAGE_OPERATION_DONE = 12, #[doc = " Target package's integrity will be checked."] ALPM_EVENT_INTEGRITY_START = 13, @@ -1452,8 +1328,7 @@ pub enum _alpm_event_type_t { ALPM_EVENT_LOAD_START = 15, #[doc = " Target package is finished loading."] ALPM_EVENT_LOAD_DONE = 16, - #[doc = " Scriptlet has printed information; See alpm_event_scriptlet_info_t for"] - #[doc = " arguments."] + #[doc = " Scriptlet has printed information; See alpm_event_scriptlet_info_t for\n arguments."] ALPM_EVENT_SCRIPTLET_INFO = 17, #[doc = " Database files will be downloaded from a repository."] ALPM_EVENT_DB_RETRIEVE_START = 18, @@ -1471,11 +1346,9 @@ pub enum _alpm_event_type_t { ALPM_EVENT_DISKSPACE_START = 24, #[doc = " Disk space usage was computed for a package."] ALPM_EVENT_DISKSPACE_DONE = 25, - #[doc = " An optdepend for another package is being removed; See"] - #[doc = " alpm_event_optdep_removal_t for arguments."] + #[doc = " An optdepend for another package is being removed; See\n alpm_event_optdep_removal_t for arguments."] ALPM_EVENT_OPTDEP_REMOVAL = 26, - #[doc = " A configured repository database is missing; See"] - #[doc = " alpm_event_database_missing_t for arguments."] + #[doc = " A configured repository database is missing; See\n alpm_event_database_missing_t for arguments."] ALPM_EVENT_DATABASE_MISSING = 27, #[doc = " Checking keys used to create signatures are in keyring."] ALPM_EVENT_KEYRING_START = 28, @@ -1487,8 +1360,7 @@ pub enum _alpm_event_type_t { ALPM_EVENT_KEY_DOWNLOAD_DONE = 31, #[doc = " A .pacnew file was created; See alpm_event_pacnew_created_t for arguments."] ALPM_EVENT_PACNEW_CREATED = 32, - #[doc = " A .pacsave file was created; See alpm_event_pacsave_created_t for"] - #[doc = " arguments."] + #[doc = " A .pacsave file was created; See alpm_event_pacsave_created_t for\n arguments."] ALPM_EVENT_PACSAVE_CREATED = 33, #[doc = " Processing hooks will be started."] ALPM_EVENT_HOOK_START = 34, @@ -1503,13 +1375,15 @@ pub enum _alpm_event_type_t { pub use self::_alpm_event_type_t as alpm_event_type_t; #[doc = " An event that may represent any event."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_event_any_t { #[doc = " Type of event"] pub type_: alpm_event_type_t, } #[test] fn bindgen_test_layout__alpm_event_any_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_event_any_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_event_any_t>(), 4usize, @@ -1521,7 +1395,7 @@ fn bindgen_test_layout__alpm_event_any_t() { concat!("Alignment of ", stringify!(_alpm_event_any_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_any_t>())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1535,7 +1409,7 @@ fn bindgen_test_layout__alpm_event_any_t() { pub type alpm_event_any_t = _alpm_event_any_t; #[repr(u32)] #[doc = " An enum over the kind of package operations."] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum _alpm_package_operation_t { #[doc = " Package (to be) installed. (No oldpkg)"] ALPM_PACKAGE_INSTALL = 1, @@ -1552,7 +1426,7 @@ pub enum _alpm_package_operation_t { pub use self::_alpm_package_operation_t as alpm_package_operation_t; #[doc = " A package operation event occurred."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_event_package_operation_t { #[doc = " Type of event"] pub type_: alpm_event_type_t, @@ -1565,6 +1439,9 @@ pub struct _alpm_event_package_operation_t { } #[test] fn bindgen_test_layout__alpm_event_package_operation_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_event_package_operation_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_event_package_operation_t>(), 24usize, @@ -1576,9 +1453,7 @@ fn bindgen_test_layout__alpm_event_package_operation_t() { concat!("Alignment of ", stringify!(_alpm_event_package_operation_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_package_operation_t>())).type_ as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1588,10 +1463,7 @@ fn bindgen_test_layout__alpm_event_package_operation_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_package_operation_t>())).operation as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).operation) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -1601,9 +1473,7 @@ fn bindgen_test_layout__alpm_event_package_operation_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_package_operation_t>())).oldpkg as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).oldpkg) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1613,9 +1483,7 @@ fn bindgen_test_layout__alpm_event_package_operation_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_package_operation_t>())).newpkg as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).newpkg) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1629,7 +1497,7 @@ fn bindgen_test_layout__alpm_event_package_operation_t() { pub type alpm_event_package_operation_t = _alpm_event_package_operation_t; #[doc = " An optional dependency was removed."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_event_optdep_removal_t { #[doc = " Type of event"] pub type_: alpm_event_type_t, @@ -1640,6 +1508,9 @@ pub struct _alpm_event_optdep_removal_t { } #[test] fn bindgen_test_layout__alpm_event_optdep_removal_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_event_optdep_removal_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_event_optdep_removal_t>(), 24usize, @@ -1651,9 +1522,7 @@ fn bindgen_test_layout__alpm_event_optdep_removal_t() { concat!("Alignment of ", stringify!(_alpm_event_optdep_removal_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_optdep_removal_t>())).type_ as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1663,9 +1532,7 @@ fn bindgen_test_layout__alpm_event_optdep_removal_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_optdep_removal_t>())).pkg as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pkg) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1675,9 +1542,7 @@ fn bindgen_test_layout__alpm_event_optdep_removal_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_optdep_removal_t>())).optdep as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).optdep) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1691,7 +1556,7 @@ fn bindgen_test_layout__alpm_event_optdep_removal_t() { pub type alpm_event_optdep_removal_t = _alpm_event_optdep_removal_t; #[doc = " A scriptlet was ran."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_event_scriptlet_info_t { #[doc = " Type of event"] pub type_: alpm_event_type_t, @@ -1700,6 +1565,9 @@ pub struct _alpm_event_scriptlet_info_t { } #[test] fn bindgen_test_layout__alpm_event_scriptlet_info_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_event_scriptlet_info_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_event_scriptlet_info_t>(), 16usize, @@ -1711,9 +1579,7 @@ fn bindgen_test_layout__alpm_event_scriptlet_info_t() { concat!("Alignment of ", stringify!(_alpm_event_scriptlet_info_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_scriptlet_info_t>())).type_ as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1723,9 +1589,7 @@ fn bindgen_test_layout__alpm_event_scriptlet_info_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_scriptlet_info_t>())).line as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1737,11 +1601,9 @@ fn bindgen_test_layout__alpm_event_scriptlet_info_t() { } #[doc = " A scriptlet was ran."] pub type alpm_event_scriptlet_info_t = _alpm_event_scriptlet_info_t; -#[doc = " A database is missing."] -#[doc = ""] -#[doc = " The database is registered but has not been downloaded"] +#[doc = " A database is missing.\n\n The database is registered but has not been downloaded"] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_event_database_missing_t { #[doc = " Type of event"] pub type_: alpm_event_type_t, @@ -1750,6 +1612,9 @@ pub struct _alpm_event_database_missing_t { } #[test] fn bindgen_test_layout__alpm_event_database_missing_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_event_database_missing_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_event_database_missing_t>(), 16usize, @@ -1761,9 +1626,7 @@ fn bindgen_test_layout__alpm_event_database_missing_t() { concat!("Alignment of ", stringify!(_alpm_event_database_missing_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_database_missing_t>())).type_ as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1773,9 +1636,7 @@ fn bindgen_test_layout__alpm_event_database_missing_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_database_missing_t>())).dbname as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).dbname) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1785,13 +1646,11 @@ fn bindgen_test_layout__alpm_event_database_missing_t() { ) ); } -#[doc = " A database is missing."] -#[doc = ""] -#[doc = " The database is registered but has not been downloaded"] +#[doc = " A database is missing.\n\n The database is registered but has not been downloaded"] pub type alpm_event_database_missing_t = _alpm_event_database_missing_t; #[doc = " A package was downloaded."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_event_pkgdownload_t { #[doc = " Type of event"] pub type_: alpm_event_type_t, @@ -1800,6 +1659,9 @@ pub struct _alpm_event_pkgdownload_t { } #[test] fn bindgen_test_layout__alpm_event_pkgdownload_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_event_pkgdownload_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_event_pkgdownload_t>(), 16usize, @@ -1811,7 +1673,7 @@ fn bindgen_test_layout__alpm_event_pkgdownload_t() { concat!("Alignment of ", stringify!(_alpm_event_pkgdownload_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_pkgdownload_t>())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1821,7 +1683,7 @@ fn bindgen_test_layout__alpm_event_pkgdownload_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_pkgdownload_t>())).file as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).file) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1835,7 +1697,7 @@ fn bindgen_test_layout__alpm_event_pkgdownload_t() { pub type alpm_event_pkgdownload_t = _alpm_event_pkgdownload_t; #[doc = " A pacnew file was created."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_event_pacnew_created_t { #[doc = " Type of event"] pub type_: alpm_event_type_t, @@ -1850,6 +1712,9 @@ pub struct _alpm_event_pacnew_created_t { } #[test] fn bindgen_test_layout__alpm_event_pacnew_created_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_event_pacnew_created_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_event_pacnew_created_t>(), 32usize, @@ -1861,9 +1726,7 @@ fn bindgen_test_layout__alpm_event_pacnew_created_t() { concat!("Alignment of ", stringify!(_alpm_event_pacnew_created_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_pacnew_created_t>())).type_ as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1873,10 +1736,7 @@ fn bindgen_test_layout__alpm_event_pacnew_created_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_pacnew_created_t>())).from_noupgrade as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).from_noupgrade) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -1886,9 +1746,7 @@ fn bindgen_test_layout__alpm_event_pacnew_created_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_pacnew_created_t>())).oldpkg as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).oldpkg) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1898,9 +1756,7 @@ fn bindgen_test_layout__alpm_event_pacnew_created_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_pacnew_created_t>())).newpkg as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).newpkg) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1910,9 +1766,7 @@ fn bindgen_test_layout__alpm_event_pacnew_created_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_pacnew_created_t>())).file as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).file) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -1926,7 +1780,7 @@ fn bindgen_test_layout__alpm_event_pacnew_created_t() { pub type alpm_event_pacnew_created_t = _alpm_event_pacnew_created_t; #[doc = " A pacsave file was created."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_event_pacsave_created_t { #[doc = " Type of event"] pub type_: alpm_event_type_t, @@ -1937,6 +1791,9 @@ pub struct _alpm_event_pacsave_created_t { } #[test] fn bindgen_test_layout__alpm_event_pacsave_created_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_event_pacsave_created_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_event_pacsave_created_t>(), 24usize, @@ -1948,9 +1805,7 @@ fn bindgen_test_layout__alpm_event_pacsave_created_t() { concat!("Alignment of ", stringify!(_alpm_event_pacsave_created_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_pacsave_created_t>())).type_ as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1960,9 +1815,7 @@ fn bindgen_test_layout__alpm_event_pacsave_created_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_pacsave_created_t>())).oldpkg as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).oldpkg) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1972,9 +1825,7 @@ fn bindgen_test_layout__alpm_event_pacsave_created_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_pacsave_created_t>())).file as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).file) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1988,7 +1839,7 @@ fn bindgen_test_layout__alpm_event_pacsave_created_t() { pub type alpm_event_pacsave_created_t = _alpm_event_pacsave_created_t; #[repr(u32)] #[doc = " Kind of hook."] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum _alpm_hook_when_t { ALPM_HOOK_PRE_TRANSACTION = 1, ALPM_HOOK_POST_TRANSACTION = 2, @@ -1997,7 +1848,7 @@ pub enum _alpm_hook_when_t { pub use self::_alpm_hook_when_t as alpm_hook_when_t; #[doc = " pre/post transaction hooks are to be ran."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_event_hook_t { #[doc = " Type of event"] pub type_: alpm_event_type_t, @@ -2006,6 +1857,8 @@ pub struct _alpm_event_hook_t { } #[test] fn bindgen_test_layout__alpm_event_hook_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_event_hook_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_event_hook_t>(), 8usize, @@ -2017,7 +1870,7 @@ fn bindgen_test_layout__alpm_event_hook_t() { concat!("Alignment of ", stringify!(_alpm_event_hook_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_hook_t>())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2027,7 +1880,7 @@ fn bindgen_test_layout__alpm_event_hook_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_hook_t>())).when as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).when) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2041,7 +1894,7 @@ fn bindgen_test_layout__alpm_event_hook_t() { pub type alpm_event_hook_t = _alpm_event_hook_t; #[doc = " A pre/post transaction hook was ran."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_event_hook_run_t { #[doc = " Type of event"] pub type_: alpm_event_type_t, @@ -2056,6 +1909,9 @@ pub struct _alpm_event_hook_run_t { } #[test] fn bindgen_test_layout__alpm_event_hook_run_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_event_hook_run_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_event_hook_run_t>(), 40usize, @@ -2067,7 +1923,7 @@ fn bindgen_test_layout__alpm_event_hook_run_t() { concat!("Alignment of ", stringify!(_alpm_event_hook_run_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_hook_run_t>())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2077,7 +1933,7 @@ fn bindgen_test_layout__alpm_event_hook_run_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_hook_run_t>())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -2087,7 +1943,7 @@ fn bindgen_test_layout__alpm_event_hook_run_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_hook_run_t>())).desc as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).desc) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -2097,7 +1953,7 @@ fn bindgen_test_layout__alpm_event_hook_run_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_hook_run_t>())).position as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).position) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -2107,7 +1963,7 @@ fn bindgen_test_layout__alpm_event_hook_run_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_hook_run_t>())).total as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).total) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -2121,7 +1977,7 @@ fn bindgen_test_layout__alpm_event_hook_run_t() { pub type alpm_event_hook_run_t = _alpm_event_hook_run_t; #[doc = " Packages downloading about to start."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_event_pkg_retrieve_t { #[doc = " Type of event"] pub type_: alpm_event_type_t, @@ -2132,6 +1988,9 @@ pub struct _alpm_event_pkg_retrieve_t { } #[test] fn bindgen_test_layout__alpm_event_pkg_retrieve_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_event_pkg_retrieve_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_event_pkg_retrieve_t>(), 24usize, @@ -2143,9 +2002,7 @@ fn bindgen_test_layout__alpm_event_pkg_retrieve_t() { concat!("Alignment of ", stringify!(_alpm_event_pkg_retrieve_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_pkg_retrieve_t>())).type_ as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2155,7 +2012,7 @@ fn bindgen_test_layout__alpm_event_pkg_retrieve_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_pkg_retrieve_t>())).num as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).num) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -2165,9 +2022,7 @@ fn bindgen_test_layout__alpm_event_pkg_retrieve_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_pkg_retrieve_t>())).total_size as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).total_size) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -2179,11 +2034,7 @@ fn bindgen_test_layout__alpm_event_pkg_retrieve_t() { } #[doc = " Packages downloading about to start."] pub type alpm_event_pkg_retrieve_t = _alpm_event_pkg_retrieve_t; -#[doc = " Events."] -#[doc = " This is a union passed to the callback that allows the frontend to know"] -#[doc = " which type of event was triggered (via type). It is then possible to"] -#[doc = " typecast the pointer to the right structure, or use the union field, in order"] -#[doc = " to access event-specific data."] +#[doc = " Events.\n This is a union passed to the callback that allows the frontend to know\n which type of event was triggered (via type). It is then possible to\n typecast the pointer to the right structure, or use the union field, in order\n to access event-specific data."] #[repr(C)] #[derive(Copy, Clone)] pub union _alpm_event_t { @@ -2214,6 +2065,8 @@ pub union _alpm_event_t { } #[test] fn bindgen_test_layout__alpm_event_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_event_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_event_t>(), 40usize, @@ -2225,7 +2078,7 @@ fn bindgen_test_layout__alpm_event_t() { concat!("Alignment of ", stringify!(_alpm_event_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_t>())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2235,7 +2088,7 @@ fn bindgen_test_layout__alpm_event_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_t>())).any as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).any) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2245,7 +2098,7 @@ fn bindgen_test_layout__alpm_event_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_t>())).package_operation as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).package_operation) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2255,7 +2108,7 @@ fn bindgen_test_layout__alpm_event_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_t>())).optdep_removal as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).optdep_removal) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2265,7 +2118,7 @@ fn bindgen_test_layout__alpm_event_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_t>())).scriptlet_info as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).scriptlet_info) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2275,7 +2128,7 @@ fn bindgen_test_layout__alpm_event_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_t>())).database_missing as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).database_missing) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2285,7 +2138,7 @@ fn bindgen_test_layout__alpm_event_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_t>())).pkgdownload as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pkgdownload) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2295,7 +2148,7 @@ fn bindgen_test_layout__alpm_event_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_t>())).pacnew_created as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pacnew_created) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2305,7 +2158,7 @@ fn bindgen_test_layout__alpm_event_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_t>())).pacsave_created as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pacsave_created) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2315,7 +2168,7 @@ fn bindgen_test_layout__alpm_event_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_t>())).hook as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hook) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2325,7 +2178,7 @@ fn bindgen_test_layout__alpm_event_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_t>())).hook_run as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hook_run) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2335,7 +2188,7 @@ fn bindgen_test_layout__alpm_event_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_t>())).pkg_retrieve as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pkg_retrieve) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2345,25 +2198,14 @@ fn bindgen_test_layout__alpm_event_t() { ) ); } -#[doc = " Events."] -#[doc = " This is a union passed to the callback that allows the frontend to know"] -#[doc = " which type of event was triggered (via type). It is then possible to"] -#[doc = " typecast the pointer to the right structure, or use the union field, in order"] -#[doc = " to access event-specific data."] +#[doc = " Events.\n This is a union passed to the callback that allows the frontend to know\n which type of event was triggered (via type). It is then possible to\n typecast the pointer to the right structure, or use the union field, in order\n to access event-specific data."] pub type alpm_event_t = _alpm_event_t; -#[doc = " Event callback."] -#[doc = ""] -#[doc = " Called when an event occurs"] -#[doc = " @param ctx user-provided context"] -#[doc = " @param event the event that occurred"] +#[doc = " Event callback.\n\n Called when an event occurs\n @param ctx user-provided context\n @param event the event that occurred"] pub type alpm_cb_event = ::std::option::Option< unsafe extern "C" fn(ctx: *mut ::std::os::raw::c_void, arg1: *mut alpm_event_t), >; pub mod _alpm_question_type_t { - #[doc = " Type of question."] - #[doc = " Unlike the events or progress enumerations, this enum has bitmask values"] - #[doc = " so a frontend can use a bitmask map to supply preselected answers to the"] - #[doc = " different types of questions."] + #[doc = " Type of question.\n Unlike the events or progress enumerations, this enum has bitmask values\n so a frontend can use a bitmask map to supply preselected answers to the\n different types of questions."] pub type Type = ::std::os::raw::c_uint; #[doc = " Should target in ignorepkg be installed anyway?"] pub const ALPM_QUESTION_INSTALL_IGNOREPKG: Type = 1; @@ -2380,14 +2222,11 @@ pub mod _alpm_question_type_t { #[doc = " Should a key be imported?"] pub const ALPM_QUESTION_IMPORT_KEY: Type = 64; } -#[doc = " Type of question."] -#[doc = " Unlike the events or progress enumerations, this enum has bitmask values"] -#[doc = " so a frontend can use a bitmask map to supply preselected answers to the"] -#[doc = " different types of questions."] +#[doc = " Type of question.\n Unlike the events or progress enumerations, this enum has bitmask values\n so a frontend can use a bitmask map to supply preselected answers to the\n different types of questions."] pub use self::_alpm_question_type_t::Type as alpm_question_type_t; #[doc = " A question that can represent any other question."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_question_any_t { #[doc = " Type of question"] pub type_: alpm_question_type_t, @@ -2396,6 +2235,8 @@ pub struct _alpm_question_any_t { } #[test] fn bindgen_test_layout__alpm_question_any_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_question_any_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_question_any_t>(), 8usize, @@ -2407,7 +2248,7 @@ fn bindgen_test_layout__alpm_question_any_t() { concat!("Alignment of ", stringify!(_alpm_question_any_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_question_any_t>())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2417,7 +2258,7 @@ fn bindgen_test_layout__alpm_question_any_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_question_any_t>())).answer as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).answer) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2431,7 +2272,7 @@ fn bindgen_test_layout__alpm_question_any_t() { pub type alpm_question_any_t = _alpm_question_any_t; #[doc = " Should target in ignorepkg be installed anyway?"] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_question_install_ignorepkg_t { #[doc = " Type of question"] pub type_: alpm_question_type_t, @@ -2442,6 +2283,9 @@ pub struct _alpm_question_install_ignorepkg_t { } #[test] fn bindgen_test_layout__alpm_question_install_ignorepkg_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_question_install_ignorepkg_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_question_install_ignorepkg_t>(), 16usize, @@ -2456,10 +2300,7 @@ fn bindgen_test_layout__alpm_question_install_ignorepkg_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_install_ignorepkg_t>())).type_ as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2469,10 +2310,7 @@ fn bindgen_test_layout__alpm_question_install_ignorepkg_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_install_ignorepkg_t>())).install as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).install) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2482,9 +2320,7 @@ fn bindgen_test_layout__alpm_question_install_ignorepkg_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_install_ignorepkg_t>())).pkg as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pkg) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -2498,7 +2334,7 @@ fn bindgen_test_layout__alpm_question_install_ignorepkg_t() { pub type alpm_question_install_ignorepkg_t = _alpm_question_install_ignorepkg_t; #[doc = " Should a package be replaced?"] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_question_replace_t { #[doc = " Type of question"] pub type_: alpm_question_type_t, @@ -2513,6 +2349,9 @@ pub struct _alpm_question_replace_t { } #[test] fn bindgen_test_layout__alpm_question_replace_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_question_replace_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_question_replace_t>(), 32usize, @@ -2524,7 +2363,7 @@ fn bindgen_test_layout__alpm_question_replace_t() { concat!("Alignment of ", stringify!(_alpm_question_replace_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_question_replace_t>())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2534,9 +2373,7 @@ fn bindgen_test_layout__alpm_question_replace_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_replace_t>())).replace as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).replace) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2546,7 +2383,7 @@ fn bindgen_test_layout__alpm_question_replace_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_question_replace_t>())).oldpkg as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).oldpkg) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -2556,7 +2393,7 @@ fn bindgen_test_layout__alpm_question_replace_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_question_replace_t>())).newpkg as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).newpkg) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -2566,7 +2403,7 @@ fn bindgen_test_layout__alpm_question_replace_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_question_replace_t>())).newdb as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).newdb) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -2580,7 +2417,7 @@ fn bindgen_test_layout__alpm_question_replace_t() { pub type alpm_question_replace_t = _alpm_question_replace_t; #[doc = " Should a conflicting package be removed?"] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_question_conflict_t { #[doc = " Type of question"] pub type_: alpm_question_type_t, @@ -2591,6 +2428,9 @@ pub struct _alpm_question_conflict_t { } #[test] fn bindgen_test_layout__alpm_question_conflict_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_question_conflict_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_question_conflict_t>(), 16usize, @@ -2602,7 +2442,7 @@ fn bindgen_test_layout__alpm_question_conflict_t() { concat!("Alignment of ", stringify!(_alpm_question_conflict_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_question_conflict_t>())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2612,9 +2452,7 @@ fn bindgen_test_layout__alpm_question_conflict_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_conflict_t>())).remove as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).remove) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2624,9 +2462,7 @@ fn bindgen_test_layout__alpm_question_conflict_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_conflict_t>())).conflict as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).conflict) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -2640,7 +2476,7 @@ fn bindgen_test_layout__alpm_question_conflict_t() { pub type alpm_question_conflict_t = _alpm_question_conflict_t; #[doc = " Should a corrupted package be deleted?"] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_question_corrupted_t { #[doc = " Type of question"] pub type_: alpm_question_type_t, @@ -2653,6 +2489,9 @@ pub struct _alpm_question_corrupted_t { } #[test] fn bindgen_test_layout__alpm_question_corrupted_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_question_corrupted_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_question_corrupted_t>(), 24usize, @@ -2664,9 +2503,7 @@ fn bindgen_test_layout__alpm_question_corrupted_t() { concat!("Alignment of ", stringify!(_alpm_question_corrupted_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_corrupted_t>())).type_ as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2676,9 +2513,7 @@ fn bindgen_test_layout__alpm_question_corrupted_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_corrupted_t>())).remove as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).remove) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2688,9 +2523,7 @@ fn bindgen_test_layout__alpm_question_corrupted_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_corrupted_t>())).filepath as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).filepath) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -2700,9 +2533,7 @@ fn bindgen_test_layout__alpm_question_corrupted_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_corrupted_t>())).reason as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).reason) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -2716,7 +2547,7 @@ fn bindgen_test_layout__alpm_question_corrupted_t() { pub type alpm_question_corrupted_t = _alpm_question_corrupted_t; #[doc = " Should unresolvable targets be removed from the transaction?"] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_question_remove_pkgs_t { #[doc = " Type of question"] pub type_: alpm_question_type_t, @@ -2727,6 +2558,9 @@ pub struct _alpm_question_remove_pkgs_t { } #[test] fn bindgen_test_layout__alpm_question_remove_pkgs_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_question_remove_pkgs_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_question_remove_pkgs_t>(), 16usize, @@ -2738,9 +2572,7 @@ fn bindgen_test_layout__alpm_question_remove_pkgs_t() { concat!("Alignment of ", stringify!(_alpm_question_remove_pkgs_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_remove_pkgs_t>())).type_ as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2750,9 +2582,7 @@ fn bindgen_test_layout__alpm_question_remove_pkgs_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_remove_pkgs_t>())).skip as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).skip) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2762,9 +2592,7 @@ fn bindgen_test_layout__alpm_question_remove_pkgs_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_remove_pkgs_t>())).packages as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).packages) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -2778,7 +2606,7 @@ fn bindgen_test_layout__alpm_question_remove_pkgs_t() { pub type alpm_question_remove_pkgs_t = _alpm_question_remove_pkgs_t; #[doc = " Provider selection"] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_question_select_provider_t { #[doc = " Type of question"] pub type_: alpm_question_type_t, @@ -2791,6 +2619,9 @@ pub struct _alpm_question_select_provider_t { } #[test] fn bindgen_test_layout__alpm_question_select_provider_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_question_select_provider_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_question_select_provider_t>(), 24usize, @@ -2805,9 +2636,7 @@ fn bindgen_test_layout__alpm_question_select_provider_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_select_provider_t>())).type_ as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2817,10 +2646,7 @@ fn bindgen_test_layout__alpm_question_select_provider_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_select_provider_t>())).use_index as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).use_index) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2830,10 +2656,7 @@ fn bindgen_test_layout__alpm_question_select_provider_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_select_provider_t>())).providers as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).providers) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -2843,9 +2666,7 @@ fn bindgen_test_layout__alpm_question_select_provider_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_select_provider_t>())).depend as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).depend) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -2859,7 +2680,7 @@ fn bindgen_test_layout__alpm_question_select_provider_t() { pub type alpm_question_select_provider_t = _alpm_question_select_provider_t; #[doc = " Should a key be imported?"] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_question_import_key_t { #[doc = " Type of question"] pub type_: alpm_question_type_t, @@ -2870,6 +2691,9 @@ pub struct _alpm_question_import_key_t { } #[test] fn bindgen_test_layout__alpm_question_import_key_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_question_import_key_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_question_import_key_t>(), 16usize, @@ -2881,9 +2705,7 @@ fn bindgen_test_layout__alpm_question_import_key_t() { concat!("Alignment of ", stringify!(_alpm_question_import_key_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_import_key_t>())).type_ as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2893,9 +2715,7 @@ fn bindgen_test_layout__alpm_question_import_key_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_import_key_t>())).import as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).import) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2905,7 +2725,7 @@ fn bindgen_test_layout__alpm_question_import_key_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_question_import_key_t>())).key as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -2917,18 +2737,13 @@ fn bindgen_test_layout__alpm_question_import_key_t() { } #[doc = " Should a key be imported?"] pub type alpm_question_import_key_t = _alpm_question_import_key_t; -#[doc = " Questions."] -#[doc = " This is an union passed to the callback that allows the frontend to know"] -#[doc = " which type of question was triggered (via type). It is then possible to"] -#[doc = " typecast the pointer to the right structure, or use the union field, in order"] -#[doc = " to access question-specific data."] +#[doc = " Questions.\n This is an union passed to the callback that allows the frontend to know\n which type of question was triggered (via type). It is then possible to\n typecast the pointer to the right structure, or use the union field, in order\n to access question-specific data."] #[repr(C)] #[derive(Copy, Clone)] pub union _alpm_question_t { #[doc = " The type of question. It's always safe to access this."] pub type_: alpm_question_type_t, - #[doc = " A question that can represent any question."] - #[doc = " It's always safe to access this."] + #[doc = " A question that can represent any question.\n It's always safe to access this."] pub any: alpm_question_any_t, #[doc = " Should target in ignorepkg be installed anyway?"] pub install_ignorepkg: alpm_question_install_ignorepkg_t, @@ -2947,6 +2762,8 @@ pub union _alpm_question_t { } #[test] fn bindgen_test_layout__alpm_question_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_question_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_question_t>(), 32usize, @@ -2958,7 +2775,7 @@ fn bindgen_test_layout__alpm_question_t() { concat!("Alignment of ", stringify!(_alpm_question_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_question_t>())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2968,7 +2785,7 @@ fn bindgen_test_layout__alpm_question_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_question_t>())).any as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).any) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2978,9 +2795,7 @@ fn bindgen_test_layout__alpm_question_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_t>())).install_ignorepkg as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).install_ignorepkg) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2990,7 +2805,7 @@ fn bindgen_test_layout__alpm_question_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_question_t>())).replace as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).replace) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3000,7 +2815,7 @@ fn bindgen_test_layout__alpm_question_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_question_t>())).conflict as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).conflict) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3010,7 +2825,7 @@ fn bindgen_test_layout__alpm_question_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_question_t>())).corrupted as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).corrupted) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3020,7 +2835,7 @@ fn bindgen_test_layout__alpm_question_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_question_t>())).remove_pkgs as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).remove_pkgs) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3030,9 +2845,7 @@ fn bindgen_test_layout__alpm_question_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_t>())).select_provider as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).select_provider) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3042,7 +2855,7 @@ fn bindgen_test_layout__alpm_question_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_question_t>())).import_key as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).import_key) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3052,23 +2865,15 @@ fn bindgen_test_layout__alpm_question_t() { ) ); } -#[doc = " Questions."] -#[doc = " This is an union passed to the callback that allows the frontend to know"] -#[doc = " which type of question was triggered (via type). It is then possible to"] -#[doc = " typecast the pointer to the right structure, or use the union field, in order"] -#[doc = " to access question-specific data."] +#[doc = " Questions.\n This is an union passed to the callback that allows the frontend to know\n which type of question was triggered (via type). It is then possible to\n typecast the pointer to the right structure, or use the union field, in order\n to access question-specific data."] pub type alpm_question_t = _alpm_question_t; -#[doc = " Question callback."] -#[doc = ""] -#[doc = " This callback allows user to give input and decide what to do during certain events"] -#[doc = " @param ctx user-provided context"] -#[doc = " @param question the question being asked."] +#[doc = " Question callback.\n\n This callback allows user to give input and decide what to do during certain events\n @param ctx user-provided context\n @param question the question being asked."] pub type alpm_cb_question = ::std::option::Option< unsafe extern "C" fn(ctx: *mut ::std::os::raw::c_void, arg1: *mut alpm_question_t), >; #[repr(u32)] #[doc = " An enum over different kinds of progress alerts."] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum _alpm_progress_t { #[doc = " Package install"] ALPM_PROGRESS_ADD_START = 0, @@ -3093,17 +2898,7 @@ pub enum _alpm_progress_t { } #[doc = " An enum over different kinds of progress alerts."] pub use self::_alpm_progress_t as alpm_progress_t; -#[doc = " Progress callback"] -#[doc = ""] -#[doc = " Alert the front end about the progress of certain events."] -#[doc = " Allows the implementation of loading bars for events that"] -#[doc = " make take a while to complete."] -#[doc = " @param ctx user-provided context"] -#[doc = " @param progress the kind of event that is progressing"] -#[doc = " @param pkg for package operations, the name of the package being operated on"] -#[doc = " @param percent the percent completion of the action"] -#[doc = " @param howmany the total amount of items in the action"] -#[doc = " @param current the current amount of items completed"] +#[doc = " Progress callback\n\n Alert the front end about the progress of certain events.\n Allows the implementation of loading bars for events that\n make take a while to complete.\n @param ctx user-provided context\n @param progress the kind of event that is progressing\n @param pkg for package operations, the name of the package being operated on\n @param percent the percent completion of the action\n @param howmany the total amount of items in the action\n @param current the current amount of items completed\n/\n/** Progress callback"] pub type alpm_cb_progress = ::std::option::Option< unsafe extern "C" fn( ctx: *mut ::std::os::raw::c_void, @@ -3115,9 +2910,8 @@ pub type alpm_cb_progress = ::std::option::Option< ), >; #[repr(u32)] -#[doc = " File download events."] -#[doc = " These events are reported by ALPM via download callback."] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +#[doc = " File download events.\n These events are reported by ALPM via download callback."] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum _alpm_download_event_type_t { #[doc = " A download was started"] ALPM_DOWNLOAD_INIT = 0, @@ -3128,18 +2922,20 @@ pub enum _alpm_download_event_type_t { #[doc = " A download completed"] ALPM_DOWNLOAD_COMPLETED = 3, } -#[doc = " File download events."] -#[doc = " These events are reported by ALPM via download callback."] +#[doc = " File download events.\n These events are reported by ALPM via download callback."] pub use self::_alpm_download_event_type_t as alpm_download_event_type_t; #[doc = " Context struct for when a download starts."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_download_event_init_t { #[doc = " whether this file is optional and thus the errors could be ignored"] pub optional: ::std::os::raw::c_int, } #[test] fn bindgen_test_layout__alpm_download_event_init_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_download_event_init_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_download_event_init_t>(), 4usize, @@ -3151,9 +2947,7 @@ fn bindgen_test_layout__alpm_download_event_init_t() { concat!("Alignment of ", stringify!(_alpm_download_event_init_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_download_event_init_t>())).optional as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).optional) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3167,7 +2961,7 @@ fn bindgen_test_layout__alpm_download_event_init_t() { pub type alpm_download_event_init_t = _alpm_download_event_init_t; #[doc = " Context struct for when a download progresses."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_download_event_progress_t { #[doc = " Amount of data downloaded"] pub downloaded: off_t, @@ -3176,6 +2970,9 @@ pub struct _alpm_download_event_progress_t { } #[test] fn bindgen_test_layout__alpm_download_event_progress_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_download_event_progress_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_download_event_progress_t>(), 16usize, @@ -3187,10 +2984,7 @@ fn bindgen_test_layout__alpm_download_event_progress_t() { concat!("Alignment of ", stringify!(_alpm_download_event_progress_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_download_event_progress_t>())).downloaded as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).downloaded) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3200,9 +2994,7 @@ fn bindgen_test_layout__alpm_download_event_progress_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_download_event_progress_t>())).total as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).total) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -3216,13 +3008,16 @@ fn bindgen_test_layout__alpm_download_event_progress_t() { pub type alpm_download_event_progress_t = _alpm_download_event_progress_t; #[doc = " Context struct for when a download retries."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_download_event_retry_t { #[doc = " If the download will resume or start over"] pub resume: ::std::os::raw::c_int, } #[test] fn bindgen_test_layout__alpm_download_event_retry_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_download_event_retry_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_download_event_retry_t>(), 4usize, @@ -3234,9 +3029,7 @@ fn bindgen_test_layout__alpm_download_event_retry_t() { concat!("Alignment of ", stringify!(_alpm_download_event_retry_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_download_event_retry_t>())).resume as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).resume) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3250,18 +3043,18 @@ fn bindgen_test_layout__alpm_download_event_retry_t() { pub type alpm_download_event_retry_t = _alpm_download_event_retry_t; #[doc = " Context struct for when a download completes."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_download_event_completed_t { #[doc = " Total bytes in file"] pub total: off_t, - #[doc = " download result code:"] - #[doc = " 0 - download completed successfully"] - #[doc = " 1 - the file is up-to-date"] - #[doc = " -1 - error"] + #[doc = " download result code:\n 0 - download completed successfully\n 1 - the file is up-to-date\n -1 - error"] pub result: ::std::os::raw::c_int, } #[test] fn bindgen_test_layout__alpm_download_event_completed_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_download_event_completed_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_download_event_completed_t>(), 16usize, @@ -3276,9 +3069,7 @@ fn bindgen_test_layout__alpm_download_event_completed_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_download_event_completed_t>())).total as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).total) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3288,9 +3079,7 @@ fn bindgen_test_layout__alpm_download_event_completed_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_download_event_completed_t>())).result as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).result) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -3302,11 +3091,7 @@ fn bindgen_test_layout__alpm_download_event_completed_t() { } #[doc = " Context struct for when a download completes."] pub type alpm_download_event_completed_t = _alpm_download_event_completed_t; -#[doc = " Type of download progress callbacks."] -#[doc = " @param ctx user-provided context"] -#[doc = " @param filename the name of the file being downloaded"] -#[doc = " @param event the event type"] -#[doc = " @param data the event data of type alpm_download_event_*_t"] +#[doc = " Type of download progress callbacks.\n @param ctx user-provided context\n @param filename the name of the file being downloaded\n @param event the event type\n @param data the event data of type alpm_download_event_*_t"] pub type alpm_cb_download = ::std::option::Option< unsafe extern "C" fn( ctx: *mut ::std::os::raw::c_void, @@ -3315,13 +3100,7 @@ pub type alpm_cb_download = ::std::option::Option< data: *mut ::std::os::raw::c_void, ), >; -#[doc = " A callback for downloading files"] -#[doc = " @param ctx user-provided context"] -#[doc = " @param url the URL of the file to be downloaded"] -#[doc = " @param localpath the directory to which the file should be downloaded"] -#[doc = " @param force whether to force an update, even if the file is the same"] -#[doc = " @return 0 on success, 1 if the file exists and is identical, -1 on"] -#[doc = " error."] +#[doc = " A callback for downloading files\n @param ctx user-provided context\n @param url the URL of the file to be downloaded\n @param localpath the directory to which the file should be downloaded\n @param force whether to force an update, even if the file is the same\n @return 0 on success, 1 if the file exists and is identical, -1 on\n error."] pub type alpm_cb_fetch = ::std::option::Option< unsafe extern "C" fn( ctx: *mut ::std::os::raw::c_void, @@ -3331,31 +3110,15 @@ pub type alpm_cb_fetch = ::std::option::Option< ) -> ::std::os::raw::c_int, >; extern "C" { - #[doc = " Get the database of locally installed packages."] - #[doc = " The returned pointer points to an internal structure"] - #[doc = " of libalpm which should only be manipulated through"] - #[doc = " libalpm functions."] - #[doc = " @return a reference to the local database"] + #[doc = " Get the database of locally installed packages.\n The returned pointer points to an internal structure\n of libalpm which should only be manipulated through\n libalpm functions.\n @return a reference to the local database"] pub fn alpm_get_localdb(handle: *mut alpm_handle_t) -> *mut alpm_db_t; } extern "C" { - #[doc = " Get the list of sync databases."] - #[doc = " Returns a list of alpm_db_t structures, one for each registered"] - #[doc = " sync database."] - #[doc = ""] - #[doc = " @param handle the context handle"] - #[doc = " @return a reference to an internal list of alpm_db_t structures"] + #[doc = " Get the list of sync databases.\n Returns a list of alpm_db_t structures, one for each registered\n sync database.\n\n @param handle the context handle\n @return a reference to an internal list of alpm_db_t structures"] pub fn alpm_get_syncdbs(handle: *mut alpm_handle_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Register a sync database of packages."] - #[doc = " Databases can not be registered when there is an active transaction."] - #[doc = ""] - #[doc = " @param handle the context handle"] - #[doc = " @param treename the name of the sync repository"] - #[doc = " @param level what level of signature checking to perform on the"] - #[doc = " database; note that this must be a '.sig' file type verification"] - #[doc = " @return an alpm_db_t* on success (the value), NULL on error"] + #[doc = " Register a sync database of packages.\n Databases can not be registered when there is an active transaction.\n\n @param handle the context handle\n @param treename the name of the sync repository\n @param level what level of signature checking to perform on the\n database; note that this must be a '.sig' file type verification\n @return an alpm_db_t* on success (the value), NULL on error"] pub fn alpm_register_syncdb( handle: *mut alpm_handle_t, treename: *const ::std::os::raw::c_char, @@ -3363,108 +3126,52 @@ extern "C" { ) -> *mut alpm_db_t; } extern "C" { - #[doc = " Unregister all package databases."] - #[doc = " Databases can not be unregistered while there is an active transaction."] - #[doc = ""] - #[doc = " @param handle the context handle"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Unregister all package databases.\n Databases can not be unregistered while there is an active transaction.\n\n @param handle the context handle\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_unregister_all_syncdbs(handle: *mut alpm_handle_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Unregister a package database."] - #[doc = " Databases can not be unregistered when there is an active transaction."] - #[doc = ""] - #[doc = " @param db pointer to the package database to unregister"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Unregister a package database.\n Databases can not be unregistered when there is an active transaction.\n\n @param db pointer to the package database to unregister\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_db_unregister(db: *mut alpm_db_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Get the name of a package database."] - #[doc = " @param db pointer to the package database"] - #[doc = " @return the name of the package database, NULL on error"] + #[doc = " Get the name of a package database.\n @param db pointer to the package database\n @return the name of the package database, NULL on error"] pub fn alpm_db_get_name(db: *const alpm_db_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Get the signature verification level for a database."] - #[doc = " Will return the default verification level if this database is set up"] - #[doc = " with ALPM_SIG_USE_DEFAULT."] - #[doc = " @param db pointer to the package database"] - #[doc = " @return the signature verification level"] + #[doc = " Get the signature verification level for a database.\n Will return the default verification level if this database is set up\n with ALPM_SIG_USE_DEFAULT.\n @param db pointer to the package database\n @return the signature verification level"] pub fn alpm_db_get_siglevel(db: *mut alpm_db_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Check the validity of a database."] - #[doc = " This is most useful for sync databases and verifying signature status."] - #[doc = " If invalid, the handle error code will be set accordingly."] - #[doc = " @param db pointer to the package database"] - #[doc = " @return 0 if valid, -1 if invalid (pm_errno is set accordingly)"] + #[doc = " Check the validity of a database.\n This is most useful for sync databases and verifying signature status.\n If invalid, the handle error code will be set accordingly.\n @param db pointer to the package database\n @return 0 if valid, -1 if invalid (pm_errno is set accordingly)"] pub fn alpm_db_get_valid(db: *mut alpm_db_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Get the list of servers assigned to this db."] - #[doc = " @param db pointer to the database to get the servers from"] - #[doc = " @return a char* list of servers"] + #[doc = " Get the list of servers assigned to this db.\n @param db pointer to the database to get the servers from\n @return a char* list of servers"] pub fn alpm_db_get_servers(db: *const alpm_db_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Sets the list of servers for the database to use."] - #[doc = " @param db the database to set the servers. The list will be duped and"] - #[doc = " the original will still need to be freed by the caller."] - #[doc = " @param servers a char* list of servers."] + #[doc = " Sets the list of servers for the database to use.\n @param db the database to set the servers. The list will be duped and\n the original will still need to be freed by the caller.\n @param servers a char* list of servers."] pub fn alpm_db_set_servers( db: *mut alpm_db_t, servers: *mut alpm_list_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Add a download server to a database."] - #[doc = " @param db database pointer"] - #[doc = " @param url url of the server"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Add a download server to a database.\n @param db database pointer\n @param url url of the server\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_db_add_server( db: *mut alpm_db_t, url: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Remove a download server from a database."] - #[doc = " @param db database pointer"] - #[doc = " @param url url of the server"] - #[doc = " @return 0 on success, 1 on server not present,"] - #[doc = " -1 on error (pm_errno is set accordingly)"] + #[doc = " Remove a download server from a database.\n @param db database pointer\n @param url url of the server\n @return 0 on success, 1 on server not present,\n -1 on error (pm_errno is set accordingly)"] pub fn alpm_db_remove_server( db: *mut alpm_db_t, url: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Update package databases."] - #[doc = ""] - #[doc = " An update of the package databases in the list \\a dbs will be attempted."] - #[doc = " Unless \\a force is true, the update will only be performed if the remote"] - #[doc = " databases were modified since the last update."] - #[doc = ""] - #[doc = " This operation requires a database lock, and will return an applicable error"] - #[doc = " if the lock could not be obtained."] - #[doc = ""] - #[doc = " Example:"] - #[doc = " @code"] - #[doc = " alpm_list_t *dbs = alpm_get_syncdbs(config->handle);"] - #[doc = " ret = alpm_db_update(config->handle, dbs, force);"] - #[doc = " if(ret < 0) {"] - #[doc = " pm_printf(ALPM_LOG_ERROR, _(\"failed to synchronize all databases (%s)\\n\"),"] - #[doc = " alpm_strerror(alpm_errno(config->handle)));"] - #[doc = " }"] - #[doc = " @endcode"] - #[doc = ""] - #[doc = " @note After a successful update, the \\link alpm_db_get_pkgcache()"] - #[doc = " package cache \\endlink will be invalidated"] - #[doc = " @param handle the context handle"] - #[doc = " @param dbs list of package databases to update"] - #[doc = " @param force if true, then forces the update, otherwise update only in case"] - #[doc = " the databases aren't up to date"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly),"] - #[doc = " 1 if all databases are up to to date"] + #[doc = " Update package databases.\n\n An update of the package databases in the list \\a dbs will be attempted.\n Unless \\a force is true, the update will only be performed if the remote\n databases were modified since the last update.\n\n This operation requires a database lock, and will return an applicable error\n if the lock could not be obtained.\n\n Example:\n @code\n alpm_list_t *dbs = alpm_get_syncdbs(config->handle);\n ret = alpm_db_update(config->handle, dbs, force);\n if(ret < 0) {\n pm_printf(ALPM_LOG_ERROR, _(\"failed to synchronize all databases (%s)\\n\"),\n alpm_strerror(alpm_errno(config->handle)));\n }\n @endcode\n\n @note After a successful update, the \\link alpm_db_get_pkgcache()\n package cache \\endlink will be invalidated\n @param handle the context handle\n @param dbs list of package databases to update\n @param force if true, then forces the update, otherwise update only in case\n the databases aren't up to date\n @return 0 on success, -1 on error (pm_errno is set accordingly),\n 1 if all databases are up to to date"] pub fn alpm_db_update( handle: *mut alpm_handle_t, dbs: *mut alpm_list_t, @@ -3472,49 +3179,29 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Get a package entry from a package database."] - #[doc = " Looking up a package is O(1) and will be significantly faster than"] - #[doc = " iterating over the pkgcahe."] - #[doc = " @param db pointer to the package database to get the package from"] - #[doc = " @param name of the package"] - #[doc = " @return the package entry on success, NULL on error"] + #[doc = " Get a package entry from a package database.\n Looking up a package is O(1) and will be significantly faster than\n iterating over the pkgcahe.\n @param db pointer to the package database to get the package from\n @param name of the package\n @return the package entry on success, NULL on error"] pub fn alpm_db_get_pkg( db: *mut alpm_db_t, name: *const ::std::os::raw::c_char, ) -> *mut alpm_pkg_t; } extern "C" { - #[doc = " Get the package cache of a package database."] - #[doc = " This is a list of all packages the db contains."] - #[doc = " @param db pointer to the package database to get the package from"] - #[doc = " @return the list of packages on success, NULL on error"] + #[doc = " Get the package cache of a package database.\n This is a list of all packages the db contains.\n @param db pointer to the package database to get the package from\n @return the list of packages on success, NULL on error"] pub fn alpm_db_get_pkgcache(db: *mut alpm_db_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Get a group entry from a package database."] - #[doc = " Looking up a group is O(1) and will be significantly faster than"] - #[doc = " iterating over the groupcahe."] - #[doc = " @param db pointer to the package database to get the group from"] - #[doc = " @param name of the group"] - #[doc = " @return the groups entry on success, NULL on error"] + #[doc = " Get a group entry from a package database.\n Looking up a group is O(1) and will be significantly faster than\n iterating over the groupcahe.\n @param db pointer to the package database to get the group from\n @param name of the group\n @return the groups entry on success, NULL on error"] pub fn alpm_db_get_group( db: *mut alpm_db_t, name: *const ::std::os::raw::c_char, ) -> *mut alpm_group_t; } extern "C" { - #[doc = " Get the group cache of a package database."] - #[doc = " @param db pointer to the package database to get the group from"] - #[doc = " @return the list of groups on success, NULL on error"] + #[doc = " Get the group cache of a package database.\n @param db pointer to the package database to get the group from\n @return the list of groups on success, NULL on error"] pub fn alpm_db_get_groupcache(db: *mut alpm_db_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Searches a database with regular expressions."] - #[doc = " @param db pointer to the package database to search in"] - #[doc = " @param needles a list of regular expressions to search for"] - #[doc = " @param ret pointer to list for storing packages matching all"] - #[doc = " regular expressions - must point to an empty (NULL) alpm_list_t *."] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Searches a database with regular expressions.\n @param db pointer to the package database to search in\n @param needles a list of regular expressions to search for\n @param ret pointer to list for storing packages matching all\n regular expressions - must point to an empty (NULL) alpm_list_t *.\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_db_search( db: *mut alpm_db_t, needles: *const alpm_list_t, @@ -3538,20 +3225,14 @@ pub mod _alpm_db_usage_t { #[doc = " The usage level of a database."] pub use self::_alpm_db_usage_t::Type as alpm_db_usage_t; extern "C" { - #[doc = " Sets the usage of a database."] - #[doc = " @param db pointer to the package database to set the status for"] - #[doc = " @param usage a bitmask of alpm_db_usage_t values"] - #[doc = " @return 0 on success, or -1 on error"] + #[doc = " Sets the usage of a database.\n @param db pointer to the package database to set the status for\n @param usage a bitmask of alpm_db_usage_t values\n @return 0 on success, or -1 on error"] pub fn alpm_db_set_usage( db: *mut alpm_db_t, usage: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Gets the usage of a database."] - #[doc = " @param db pointer to the package database to get the status of"] - #[doc = " @param usage pointer to an alpm_db_usage_t to store db's status"] - #[doc = " @return 0 on success, or -1 on error"] + #[doc = " Gets the usage of a database.\n @param db pointer to the package database to get the status of\n @param usage pointer to an alpm_db_usage_t to store db's status\n @return 0 on success, or -1 on error"] pub fn alpm_db_get_usage( db: *mut alpm_db_t, usage: *mut ::std::os::raw::c_int, @@ -3571,15 +3252,7 @@ pub mod _alpm_loglevel_t { } #[doc = " Logging Levels"] pub use self::_alpm_loglevel_t::Type as alpm_loglevel_t; -#[doc = " The callback type for logging."] -#[doc = ""] -#[doc = " libalpm will call this function whenever something is to be logged."] -#[doc = " many libalpm will produce log output. Additionally any calls to \\link alpm_logaction"] -#[doc = " \\endlink will also call this callback."] -#[doc = " @param ctx user-provided context"] -#[doc = " @param level the currently set loglevel"] -#[doc = " @param fmt the printf like format string"] -#[doc = " @param args printf like arguments"] +#[doc = " The callback type for logging.\n\n libalpm will call this function whenever something is to be logged.\n many libalpm will produce log output. Additionally any calls to \\link alpm_logaction\n \\endlink will also call this callback.\n @param ctx user-provided context\n @param level the currently set loglevel\n @param fmt the printf like format string\n @param args printf like arguments"] pub type alpm_cb_log = ::std::option::Option< unsafe extern "C" fn( ctx: *mut ::std::os::raw::c_void, @@ -3589,11 +3262,7 @@ pub type alpm_cb_log = ::std::option::Option< ), >; extern "C" { - #[doc = " A printf-like function for logging."] - #[doc = " @param handle the context handle"] - #[doc = " @param prefix caller-specific prefix for the log"] - #[doc = " @param fmt output format"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " A printf-like function for logging.\n @param handle the context handle\n @param prefix caller-specific prefix for the log\n @param fmt output format\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_logaction( handle: *mut alpm_handle_t, prefix: *const ::std::os::raw::c_char, @@ -3602,23 +3271,15 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Returns the callback used for logging."] - #[doc = " @param handle the context handle"] - #[doc = " @return the currently set log callback"] + #[doc = " Returns the callback used for logging.\n @param handle the context handle\n @return the currently set log callback"] pub fn alpm_option_get_logcb(handle: *mut alpm_handle_t) -> alpm_cb_log; } extern "C" { - #[doc = " Returns the callback used for logging."] - #[doc = " @param handle the context handle"] - #[doc = " @return the currently set log callback context"] + #[doc = " Returns the callback used for logging.\n @param handle the context handle\n @return the currently set log callback context"] pub fn alpm_option_get_logcb_ctx(handle: *mut alpm_handle_t) -> *mut ::std::os::raw::c_void; } extern "C" { - #[doc = " Sets the callback used for logging."] - #[doc = " @param handle the context handle"] - #[doc = " @param cb the cb to use"] - #[doc = " @param ctx user-provided context to pass to cb"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Sets the callback used for logging.\n @param handle the context handle\n @param cb the cb to use\n @param ctx user-provided context to pass to cb\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_logcb( handle: *mut alpm_handle_t, cb: alpm_cb_log, @@ -3626,23 +3287,15 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Returns the callback used to report download progress."] - #[doc = " @param handle the context handle"] - #[doc = " @return the currently set download callback"] + #[doc = " Returns the callback used to report download progress.\n @param handle the context handle\n @return the currently set download callback"] pub fn alpm_option_get_dlcb(handle: *mut alpm_handle_t) -> alpm_cb_download; } extern "C" { - #[doc = " Returns the callback used to report download progress."] - #[doc = " @param handle the context handle"] - #[doc = " @return the currently set download callback context"] + #[doc = " Returns the callback used to report download progress.\n @param handle the context handle\n @return the currently set download callback context"] pub fn alpm_option_get_dlcb_ctx(handle: *mut alpm_handle_t) -> *mut ::std::os::raw::c_void; } extern "C" { - #[doc = " Sets the callback used to report download progress."] - #[doc = " @param handle the context handle"] - #[doc = " @param cb the cb to use"] - #[doc = " @param ctx user-provided context to pass to cb"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Sets the callback used to report download progress.\n @param handle the context handle\n @param cb the cb to use\n @param ctx user-provided context to pass to cb\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_dlcb( handle: *mut alpm_handle_t, cb: alpm_cb_download, @@ -3650,23 +3303,15 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Returns the downloading callback."] - #[doc = " @param handle the context handle"] - #[doc = " @return the currently set fetch callback"] + #[doc = " Returns the downloading callback.\n @param handle the context handle\n @return the currently set fetch callback"] pub fn alpm_option_get_fetchcb(handle: *mut alpm_handle_t) -> alpm_cb_fetch; } extern "C" { - #[doc = " Returns the downloading callback."] - #[doc = " @param handle the context handle"] - #[doc = " @return the currently set fetch callback context"] + #[doc = " Returns the downloading callback.\n @param handle the context handle\n @return the currently set fetch callback context"] pub fn alpm_option_get_fetchcb_ctx(handle: *mut alpm_handle_t) -> *mut ::std::os::raw::c_void; } extern "C" { - #[doc = " Sets the downloading callback."] - #[doc = " @param handle the context handle"] - #[doc = " @param cb the cb to use"] - #[doc = " @param ctx user-provided context to pass to cb"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Sets the downloading callback.\n @param handle the context handle\n @param cb the cb to use\n @param ctx user-provided context to pass to cb\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_fetchcb( handle: *mut alpm_handle_t, cb: alpm_cb_fetch, @@ -3674,23 +3319,15 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Returns the callback used for events."] - #[doc = " @param handle the context handle"] - #[doc = " @return the currently set event callback"] + #[doc = " Returns the callback used for events.\n @param handle the context handle\n @return the currently set event callback"] pub fn alpm_option_get_eventcb(handle: *mut alpm_handle_t) -> alpm_cb_event; } extern "C" { - #[doc = " Returns the callback used for events."] - #[doc = " @param handle the context handle"] - #[doc = " @return the currently set event callback context"] + #[doc = " Returns the callback used for events.\n @param handle the context handle\n @return the currently set event callback context"] pub fn alpm_option_get_eventcb_ctx(handle: *mut alpm_handle_t) -> *mut ::std::os::raw::c_void; } extern "C" { - #[doc = " Sets the callback used for events."] - #[doc = " @param handle the context handle"] - #[doc = " @param cb the cb to use"] - #[doc = " @param ctx user-provided context to pass to cb"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Sets the callback used for events.\n @param handle the context handle\n @param cb the cb to use\n @param ctx user-provided context to pass to cb\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_eventcb( handle: *mut alpm_handle_t, cb: alpm_cb_event, @@ -3698,25 +3335,17 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Returns the callback used for questions."] - #[doc = " @param handle the context handle"] - #[doc = " @return the currently set question callback"] + #[doc = " Returns the callback used for questions.\n @param handle the context handle\n @return the currently set question callback"] pub fn alpm_option_get_questioncb(handle: *mut alpm_handle_t) -> alpm_cb_question; } extern "C" { - #[doc = " Returns the callback used for questions."] - #[doc = " @param handle the context handle"] - #[doc = " @return the currently set question callback context"] + #[doc = " Returns the callback used for questions.\n @param handle the context handle\n @return the currently set question callback context"] pub fn alpm_option_get_questioncb_ctx( handle: *mut alpm_handle_t, ) -> *mut ::std::os::raw::c_void; } extern "C" { - #[doc = " Sets the callback used for questions."] - #[doc = " @param handle the context handle"] - #[doc = " @param cb the cb to use"] - #[doc = " @param ctx user-provided context to pass to cb"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Sets the callback used for questions.\n @param handle the context handle\n @param cb the cb to use\n @param ctx user-provided context to pass to cb\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_questioncb( handle: *mut alpm_handle_t, cb: alpm_cb_question, @@ -3724,25 +3353,17 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = "Returns the callback used for operation progress."] - #[doc = " @param handle the context handle"] - #[doc = " @return the currently set progress callback"] + #[doc = "Returns the callback used for operation progress.\n @param handle the context handle\n @return the currently set progress callback"] pub fn alpm_option_get_progresscb(handle: *mut alpm_handle_t) -> alpm_cb_progress; } extern "C" { - #[doc = "Returns the callback used for operation progress."] - #[doc = " @param handle the context handle"] - #[doc = " @return the currently set progress callback context"] + #[doc = "Returns the callback used for operation progress.\n @param handle the context handle\n @return the currently set progress callback context"] pub fn alpm_option_get_progresscb_ctx( handle: *mut alpm_handle_t, ) -> *mut ::std::os::raw::c_void; } extern "C" { - #[doc = " Sets the callback used for operation progress."] - #[doc = " @param handle the context handle"] - #[doc = " @param cb the cb to use"] - #[doc = " @param ctx user-provided context to pass to cb"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Sets the callback used for operation progress.\n @param handle the context handle\n @param cb the cb to use\n @param ctx user-provided context to pass to cb\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_progresscb( handle: *mut alpm_handle_t, cb: alpm_cb_progress, @@ -3750,524 +3371,360 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Returns the root path. Read-only."] - #[doc = " @param handle the context handle"] + #[doc = " Returns the root path. Read-only.\n @param handle the context handle"] pub fn alpm_option_get_root(handle: *mut alpm_handle_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Returns the path to the database directory. Read-only."] - #[doc = " @param handle the context handle"] + #[doc = " Returns the path to the database directory. Read-only.\n @param handle the context handle"] pub fn alpm_option_get_dbpath(handle: *mut alpm_handle_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Get the name of the database lock file. Read-only."] - #[doc = " This is the name that the lockfile would have. It does not"] - #[doc = " matter if the lockfile actually exists on disk."] - #[doc = " @param handle the context handle"] + #[doc = " Get the name of the database lock file. Read-only.\n This is the name that the lockfile would have. It does not\n matter if the lockfile actually exists on disk.\n @param handle the context handle"] pub fn alpm_option_get_lockfile(handle: *mut alpm_handle_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Gets the currently configured cachedirs,"] - #[doc = " @param handle the context handle"] - #[doc = " @return a char* list of cache directories"] + #[doc = " Gets the currently configured cachedirs,\n @param handle the context handle\n @return a char* list of cache directories"] pub fn alpm_option_get_cachedirs(handle: *mut alpm_handle_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Sets the cachedirs."] - #[doc = " @param handle the context handle"] - #[doc = " @param cachedirs a char* list of cachdirs. The list will be duped and"] - #[doc = " the original will still need to be freed by the caller."] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Sets the cachedirs.\n @param handle the context handle\n @param cachedirs a char* list of cachdirs. The list will be duped and\n the original will still need to be freed by the caller.\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_cachedirs( handle: *mut alpm_handle_t, cachedirs: *mut alpm_list_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Append a cachedir to the configured cachedirs."] - #[doc = " @param handle the context handle"] - #[doc = " @param cachedir the cachedir to add"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Append a cachedir to the configured cachedirs.\n @param handle the context handle\n @param cachedir the cachedir to add\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_add_cachedir( handle: *mut alpm_handle_t, cachedir: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Remove a cachedir from the configured cachedirs."] - #[doc = " @param handle the context handle"] - #[doc = " @param cachedir the cachedir to remove"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Remove a cachedir from the configured cachedirs.\n @param handle the context handle\n @param cachedir the cachedir to remove\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_remove_cachedir( handle: *mut alpm_handle_t, cachedir: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Gets the currently configured hookdirs,"] - #[doc = " @param handle the context handle"] - #[doc = " @return a char* list of hook directories"] + #[doc = " Gets the currently configured hookdirs,\n @param handle the context handle\n @return a char* list of hook directories"] pub fn alpm_option_get_hookdirs(handle: *mut alpm_handle_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Sets the hookdirs."] - #[doc = " @param handle the context handle"] - #[doc = " @param hookdirs a char* list of hookdirs. The list will be duped and"] - #[doc = " the original will still need to be freed by the caller."] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Sets the hookdirs.\n @param handle the context handle\n @param hookdirs a char* list of hookdirs. The list will be duped and\n the original will still need to be freed by the caller.\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_hookdirs( handle: *mut alpm_handle_t, hookdirs: *mut alpm_list_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Append a hookdir to the configured hookdirs."] - #[doc = " @param handle the context handle"] - #[doc = " @param hookdir the hookdir to add"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Append a hookdir to the configured hookdirs.\n @param handle the context handle\n @param hookdir the hookdir to add\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_add_hookdir( handle: *mut alpm_handle_t, hookdir: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Remove a hookdir from the configured hookdirs."] - #[doc = " @param handle the context handle"] - #[doc = " @param hookdir the hookdir to remove"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Remove a hookdir from the configured hookdirs.\n @param handle the context handle\n @param hookdir the hookdir to remove\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_remove_hookdir( handle: *mut alpm_handle_t, hookdir: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Gets the currently configured overwritable files,"] - #[doc = " @param handle the context handle"] - #[doc = " @return a char* list of overwritable file globs"] + #[doc = " Gets the currently configured overwritable files,\n @param handle the context handle\n @return a char* list of overwritable file globs"] pub fn alpm_option_get_overwrite_files(handle: *mut alpm_handle_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Sets the overwritable files."] - #[doc = " @param handle the context handle"] - #[doc = " @param globs a char* list of overwritable file globs. The list will be duped and"] - #[doc = " the original will still need to be freed by the caller."] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Sets the overwritable files.\n @param handle the context handle\n @param globs a char* list of overwritable file globs. The list will be duped and\n the original will still need to be freed by the caller.\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_overwrite_files( handle: *mut alpm_handle_t, globs: *mut alpm_list_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Append an overwritable file to the configured overwritable files."] - #[doc = " @param handle the context handle"] - #[doc = " @param glob the file glob to add"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Append an overwritable file to the configured overwritable files.\n @param handle the context handle\n @param glob the file glob to add\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_add_overwrite_file( handle: *mut alpm_handle_t, glob: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Remove a file glob from the configured overwritable files globs."] - #[doc = " @note The overwritable file list contains a list of globs. The glob to"] - #[doc = " remove must exactly match the entry to remove. There is no glob expansion."] - #[doc = " @param handle the context handle"] - #[doc = " @param glob the file glob to remove"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Remove a file glob from the configured overwritable files globs.\n @note The overwritable file list contains a list of globs. The glob to\n remove must exactly match the entry to remove. There is no glob expansion.\n @param handle the context handle\n @param glob the file glob to remove\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_remove_overwrite_file( handle: *mut alpm_handle_t, glob: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Gets the filepath to the currently set logfile."] - #[doc = " @param handle the context handle"] - #[doc = " @return the path to the logfile"] + #[doc = " Gets the filepath to the currently set logfile.\n @param handle the context handle\n @return the path to the logfile"] pub fn alpm_option_get_logfile(handle: *mut alpm_handle_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Sets the logfile path."] - #[doc = " @param handle the context handle"] - #[doc = " @param logfile path to the new location of the logfile"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Sets the logfile path.\n @param handle the context handle\n @param logfile path to the new location of the logfile\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_logfile( handle: *mut alpm_handle_t, logfile: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Returns the path to libalpm's GnuPG home directory."] - #[doc = " @param handle the context handle"] - #[doc = " @return the path to libalpms's GnuPG home directory"] + #[doc = " Returns the path to libalpm's GnuPG home directory.\n @param handle the context handle\n @return the path to libalpms's GnuPG home directory"] pub fn alpm_option_get_gpgdir(handle: *mut alpm_handle_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Sets the path to libalpm's GnuPG home directory."] - #[doc = " @param handle the context handle"] - #[doc = " @param gpgdir the gpgdir to set"] + #[doc = " Sets the path to libalpm's GnuPG home directory.\n @param handle the context handle\n @param gpgdir the gpgdir to set"] pub fn alpm_option_set_gpgdir( handle: *mut alpm_handle_t, gpgdir: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Returns whether to use syslog (0 is FALSE, TRUE otherwise)."] - #[doc = " @param handle the context handle"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Returns whether to use syslog (0 is FALSE, TRUE otherwise).\n @param handle the context handle\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_get_usesyslog(handle: *mut alpm_handle_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Sets whether to use syslog (0 is FALSE, TRUE otherwise)."] - #[doc = " @param handle the context handle"] - #[doc = " @param usesyslog whether to use the syslog (0 is FALSE, TRUE otherwise)"] + #[doc = " Sets whether to use syslog (0 is FALSE, TRUE otherwise).\n @param handle the context handle\n @param usesyslog whether to use the syslog (0 is FALSE, TRUE otherwise)"] pub fn alpm_option_set_usesyslog( handle: *mut alpm_handle_t, usesyslog: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Get the list of no-upgrade files"] - #[doc = " @param handle the context handle"] - #[doc = " @return the char* list of no-upgrade files"] + #[doc = " Get the list of no-upgrade files\n @param handle the context handle\n @return the char* list of no-upgrade files"] pub fn alpm_option_get_noupgrades(handle: *mut alpm_handle_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Add a file to the no-upgrade list"] - #[doc = " @param handle the context handle"] - #[doc = " @param path the path to add"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Add a file to the no-upgrade list\n @param handle the context handle\n @param path the path to add\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_add_noupgrade( handle: *mut alpm_handle_t, path: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Sets the list of no-upgrade files"] - #[doc = " @param handle the context handle"] - #[doc = " @param noupgrade a char* list of file to not upgrade."] - #[doc = " The list will be duped and the original will still need to be freed by the caller."] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Sets the list of no-upgrade files\n @param handle the context handle\n @param noupgrade a char* list of file to not upgrade.\n The list will be duped and the original will still need to be freed by the caller.\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_noupgrades( handle: *mut alpm_handle_t, noupgrade: *mut alpm_list_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Remove an entry from the no-upgrade list"] - #[doc = " @param handle the context handle"] - #[doc = " @param path the path to remove"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Remove an entry from the no-upgrade list\n @param handle the context handle\n @param path the path to remove\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_remove_noupgrade( handle: *mut alpm_handle_t, path: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Test if a path matches any of the globs in the no-upgrade list"] - #[doc = " @param handle the context handle"] - #[doc = " @param path the path to test"] - #[doc = " @return 0 is the path matches a glob, negative if there is no match and"] - #[doc = " positive is the match was inverted"] + #[doc = " Test if a path matches any of the globs in the no-upgrade list\n @param handle the context handle\n @param path the path to test\n @return 0 is the path matches a glob, negative if there is no match and\n positive is the match was inverted"] pub fn alpm_option_match_noupgrade( handle: *mut alpm_handle_t, path: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Get the list of no-extract files"] - #[doc = " @param handle the context handle"] - #[doc = " @return the char* list of no-extract files"] + #[doc = " Get the list of no-extract files\n @param handle the context handle\n @return the char* list of no-extract files"] pub fn alpm_option_get_noextracts(handle: *mut alpm_handle_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Add a file to the no-extract list"] - #[doc = " @param handle the context handle"] - #[doc = " @param path the path to add"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Add a file to the no-extract list\n @param handle the context handle\n @param path the path to add\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_add_noextract( handle: *mut alpm_handle_t, path: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Sets the list of no-extract files"] - #[doc = " @param handle the context handle"] - #[doc = " @param noextract a char* list of file to not extract."] - #[doc = " The list will be duped and the original will still need to be freed by the caller."] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Sets the list of no-extract files\n @param handle the context handle\n @param noextract a char* list of file to not extract.\n The list will be duped and the original will still need to be freed by the caller.\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_noextracts( handle: *mut alpm_handle_t, noextract: *mut alpm_list_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Remove an entry from the no-extract list"] - #[doc = " @param handle the context handle"] - #[doc = " @param path the path to remove"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Remove an entry from the no-extract list\n @param handle the context handle\n @param path the path to remove\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_remove_noextract( handle: *mut alpm_handle_t, path: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Test if a path matches any of the globs in the no-extract list"] - #[doc = " @param handle the context handle"] - #[doc = " @param path the path to test"] - #[doc = " @return 0 is the path matches a glob, negative if there is no match and"] - #[doc = " positive is the match was inverted"] + #[doc = " Test if a path matches any of the globs in the no-extract list\n @param handle the context handle\n @param path the path to test\n @return 0 is the path matches a glob, negative if there is no match and\n positive is the match was inverted"] pub fn alpm_option_match_noextract( handle: *mut alpm_handle_t, path: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Get the list of ignored packages"] - #[doc = " @param handle the context handle"] - #[doc = " @return the char* list of ignored packages"] + #[doc = " Get the list of ignored packages\n @param handle the context handle\n @return the char* list of ignored packages"] pub fn alpm_option_get_ignorepkgs(handle: *mut alpm_handle_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Add a file to the ignored package list"] - #[doc = " @param handle the context handle"] - #[doc = " @param pkg the package to add"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Add a file to the ignored package list\n @param handle the context handle\n @param pkg the package to add\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_add_ignorepkg( handle: *mut alpm_handle_t, pkg: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Sets the list of packages to ignore"] - #[doc = " @param handle the context handle"] - #[doc = " @param ignorepkgs a char* list of packages to ignore"] - #[doc = " The list will be duped and the original will still need to be freed by the caller."] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Sets the list of packages to ignore\n @param handle the context handle\n @param ignorepkgs a char* list of packages to ignore\n The list will be duped and the original will still need to be freed by the caller.\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_ignorepkgs( handle: *mut alpm_handle_t, ignorepkgs: *mut alpm_list_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Remove an entry from the ignorepkg list"] - #[doc = " @param handle the context handle"] - #[doc = " @param pkg the package to remove"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Remove an entry from the ignorepkg list\n @param handle the context handle\n @param pkg the package to remove\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_remove_ignorepkg( handle: *mut alpm_handle_t, pkg: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Get the list of ignored groups"] - #[doc = " @param handle the context handle"] - #[doc = " @return the char* list of ignored groups"] + #[doc = " Get the list of ignored groups\n @param handle the context handle\n @return the char* list of ignored groups"] pub fn alpm_option_get_ignoregroups(handle: *mut alpm_handle_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Add a file to the ignored group list"] - #[doc = " @param handle the context handle"] - #[doc = " @param grp the group to add"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Add a file to the ignored group list\n @param handle the context handle\n @param grp the group to add\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_add_ignoregroup( handle: *mut alpm_handle_t, grp: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Sets the list of groups to ignore"] - #[doc = " @param handle the context handle"] - #[doc = " @param ignoregrps a char* list of groups to ignore"] - #[doc = " The list will be duped and the original will still need to be freed by the caller."] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Sets the list of groups to ignore\n @param handle the context handle\n @param ignoregrps a char* list of groups to ignore\n The list will be duped and the original will still need to be freed by the caller.\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_ignoregroups( handle: *mut alpm_handle_t, ignoregrps: *mut alpm_list_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Remove an entry from the ignoregroup list"] - #[doc = " @param handle the context handle"] - #[doc = " @param grp the group to remove"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Remove an entry from the ignoregroup list\n @param handle the context handle\n @param grp the group to remove\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_remove_ignoregroup( handle: *mut alpm_handle_t, grp: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Gets the list of dependencies that are assumed to be met"] - #[doc = " @param handle the context handle"] - #[doc = " @return a list of alpm_depend_t*"] + #[doc = " Gets the list of dependencies that are assumed to be met\n @param handle the context handle\n @return a list of alpm_depend_t*"] pub fn alpm_option_get_assumeinstalled(handle: *mut alpm_handle_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Add a depend to the assumed installed list"] - #[doc = " @param handle the context handle"] - #[doc = " @param dep the dependency to add"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Add a depend to the assumed installed list\n @param handle the context handle\n @param dep the dependency to add\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_add_assumeinstalled( handle: *mut alpm_handle_t, dep: *const alpm_depend_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Sets the list of dependencies that are assumed to be met"] - #[doc = " @param handle the context handle"] - #[doc = " @param deps a list of *alpm_depend_t"] - #[doc = " The list will be duped and the original will still need to be freed by the caller."] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Sets the list of dependencies that are assumed to be met\n @param handle the context handle\n @param deps a list of *alpm_depend_t\n The list will be duped and the original will still need to be freed by the caller.\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_assumeinstalled( handle: *mut alpm_handle_t, deps: *mut alpm_list_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Remove an entry from the assume installed list"] - #[doc = " @param handle the context handle"] - #[doc = " @param dep the dep to remove"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Remove an entry from the assume installed list\n @param handle the context handle\n @param dep the dep to remove\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_remove_assumeinstalled( handle: *mut alpm_handle_t, dep: *const alpm_depend_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Returns the allowed package architecture."] - #[doc = " @param handle the context handle"] - #[doc = " @return the configured package architectures"] + #[doc = " Returns the allowed package architecture.\n @param handle the context handle\n @return the configured package architectures"] pub fn alpm_option_get_architectures(handle: *mut alpm_handle_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Adds an allowed package architecture."] - #[doc = " @param handle the context handle"] - #[doc = " @param arch the architecture to set"] + #[doc = " Adds an allowed package architecture.\n @param handle the context handle\n @param arch the architecture to set"] pub fn alpm_option_add_architecture( handle: *mut alpm_handle_t, arch: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Sets the allowed package architecture."] - #[doc = " @param handle the context handle"] - #[doc = " @param arches the architecture to set"] + #[doc = " Sets the allowed package architecture.\n @param handle the context handle\n @param arches the architecture to set"] pub fn alpm_option_set_architectures( handle: *mut alpm_handle_t, arches: *mut alpm_list_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Removes an allowed package architecture."] - #[doc = " @param handle the context handle"] - #[doc = " @param arch the architecture to remove"] + #[doc = " Removes an allowed package architecture.\n @param handle the context handle\n @param arch the architecture to remove"] pub fn alpm_option_remove_architecture( handle: *mut alpm_handle_t, arch: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Get whether or not checking for free space before installing packages is enabled."] - #[doc = " @param handle the context handle"] - #[doc = " @return 0 if disabled, 1 if enabled"] + #[doc = " Get whether or not checking for free space before installing packages is enabled.\n @param handle the context handle\n @return 0 if disabled, 1 if enabled"] pub fn alpm_option_get_checkspace(handle: *mut alpm_handle_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Enable/disable checking free space before installing packages."] - #[doc = " @param handle the context handle"] - #[doc = " @param checkspace 0 for disabled, 1 for enabled"] + #[doc = " Enable/disable checking free space before installing packages.\n @param handle the context handle\n @param checkspace 0 for disabled, 1 for enabled"] pub fn alpm_option_set_checkspace( handle: *mut alpm_handle_t, checkspace: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Gets the configured database extension."] - #[doc = " @param handle the context handle"] - #[doc = " @return the configured database extension"] + #[doc = " Gets the configured database extension.\n @param handle the context handle\n @return the configured database extension"] pub fn alpm_option_get_dbext(handle: *mut alpm_handle_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Sets the database extension."] - #[doc = " @param handle the context handle"] - #[doc = " @param dbext the database extension to use"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Sets the database extension.\n @param handle the context handle\n @param dbext the database extension to use\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_dbext( handle: *mut alpm_handle_t, dbext: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Get the default siglevel."] - #[doc = " @param handle the context handle"] - #[doc = " @return a \\link alpm_siglevel_t \\endlink bitfield of the siglevel"] + #[doc = " Get the default siglevel.\n @param handle the context handle\n @return a \\link alpm_siglevel_t \\endlink bitfield of the siglevel"] pub fn alpm_option_get_default_siglevel(handle: *mut alpm_handle_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Set the default siglevel."] - #[doc = " @param handle the context handle"] - #[doc = " @param level a \\link alpm_siglevel_t \\endlink bitfield of the level to set"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Set the default siglevel.\n @param handle the context handle\n @param level a \\link alpm_siglevel_t \\endlink bitfield of the level to set\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_default_siglevel( handle: *mut alpm_handle_t, level: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Get the configured local file siglevel."] - #[doc = " @param handle the context handle"] - #[doc = " @return a \\link alpm_siglevel_t \\endlink bitfield of the siglevel"] + #[doc = " Get the configured local file siglevel.\n @param handle the context handle\n @return a \\link alpm_siglevel_t \\endlink bitfield of the siglevel"] pub fn alpm_option_get_local_file_siglevel(handle: *mut alpm_handle_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Set the local file siglevel."] - #[doc = " @param handle the context handle"] - #[doc = " @param level a \\link alpm_siglevel_t \\endlink bitfield of the level to set"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Set the local file siglevel.\n @param handle the context handle\n @param level a \\link alpm_siglevel_t \\endlink bitfield of the level to set\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_local_file_siglevel( handle: *mut alpm_handle_t, level: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Get the configured remote file siglevel."] - #[doc = " @param handle the context handle"] - #[doc = " @return a \\link alpm_siglevel_t \\endlink bitfield of the siglevel"] + #[doc = " Get the configured remote file siglevel.\n @param handle the context handle\n @return a \\link alpm_siglevel_t \\endlink bitfield of the siglevel"] pub fn alpm_option_get_remote_file_siglevel( handle: *mut alpm_handle_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Set the remote file siglevel."] - #[doc = " @param handle the context handle"] - #[doc = " @param level a \\link alpm_siglevel_t \\endlink bitfield of the level to set"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Set the remote file siglevel.\n @param handle the context handle\n @param level a \\link alpm_siglevel_t \\endlink bitfield of the level to set\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_remote_file_siglevel( handle: *mut alpm_handle_t, level: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Enables/disables the download timeout."] - #[doc = " @param handle the context handle"] - #[doc = " @param disable_dl_timeout 0 for enabled, 1 for disabled"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Enables/disables the download timeout.\n @param handle the context handle\n @param disable_dl_timeout 0 for enabled, 1 for disabled\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_disable_dl_timeout( handle: *mut alpm_handle_t, disable_dl_timeout: ::std::os::raw::c_ushort, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Gets the number of parallel streams to download database and package files."] - #[doc = " @param handle the context handle"] - #[doc = " @return the number of parallel streams to download database and package files"] + #[doc = " Gets the number of parallel streams to download database and package files.\n @param handle the context handle\n @return the number of parallel streams to download database and package files"] pub fn alpm_option_get_parallel_downloads(handle: *mut alpm_handle_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Sets number of parallel streams to download database and package files."] - #[doc = " @param handle the context handle"] - #[doc = " @param num_streams number of parallel download streams"] - #[doc = " @return 0 on success, -1 on error"] + #[doc = " Sets number of parallel streams to download database and package files.\n @param handle the context handle\n @param num_streams number of parallel download streams\n @return 0 on success, -1 on error"] pub fn alpm_option_set_parallel_downloads( handle: *mut alpm_handle_t, num_streams: ::std::os::raw::c_uint, @@ -4275,7 +3732,7 @@ extern "C" { } #[repr(u32)] #[doc = " Package install reasons."] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum _alpm_pkgreason_t { #[doc = " Explicitly requested by the user."] ALPM_PKG_REASON_EXPLICIT = 0, @@ -4286,7 +3743,7 @@ pub enum _alpm_pkgreason_t { pub use self::_alpm_pkgreason_t as alpm_pkgreason_t; #[repr(u32)] #[doc = " Location a package object was loaded from."] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum _alpm_pkgfrom_t { #[doc = " Loaded from a file via \\link alpm_pkg_load \\endlink"] ALPM_PKG_FROM_FILE = 1, @@ -4314,19 +3771,7 @@ pub mod _alpm_pkgvalidation_t { #[doc = " Method used to validate a package."] pub use self::_alpm_pkgvalidation_t::Type as alpm_pkgvalidation_t; extern "C" { - #[doc = " Create a package from a file."] - #[doc = " If full is false, the archive is read only until all necessary"] - #[doc = " metadata is found. If it is true, the entire archive is read, which"] - #[doc = " serves as a verification of integrity and the filelist can be created."] - #[doc = " The allocated structure should be freed using alpm_pkg_free()."] - #[doc = " @param handle the context handle"] - #[doc = " @param filename location of the package tarball"] - #[doc = " @param full whether to stop the load after metadata is read or continue"] - #[doc = " through the full archive"] - #[doc = " @param level what level of package signature checking to perform on the"] - #[doc = " package; note that this must be a '.sig' file type verification"] - #[doc = " @param pkg address of the package pointer"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Create a package from a file.\n If full is false, the archive is read only until all necessary\n metadata is found. If it is true, the entire archive is read, which\n serves as a verification of integrity and the filelist can be created.\n The allocated structure should be freed using alpm_pkg_free().\n @param handle the context handle\n @param filename location of the package tarball\n @param full whether to stop the load after metadata is read or continue\n through the full archive\n @param level what level of package signature checking to perform on the\n package; note that this must be a '.sig' file type verification\n @param pkg address of the package pointer\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_pkg_load( handle: *mut alpm_handle_t, filename: *const ::std::os::raw::c_char, @@ -4336,14 +3781,7 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Fetch a list of remote packages."] - #[doc = " @param handle the context handle"] - #[doc = " @param urls list of package URLs to download"] - #[doc = " @param fetched list of filepaths to the fetched packages, each item"] - #[doc = " corresponds to one in `urls` list. This is an output parameter,"] - #[doc = " the caller should provide a pointer to an empty list"] - #[doc = " (*fetched === NULL) and the callee fills the list with data."] - #[doc = " @return 0 on success or -1 on failure"] + #[doc = " Fetch a list of remote packages.\n @param handle the context handle\n @param urls list of package URLs to download\n @param fetched list of filepaths to the fetched packages, each item\n corresponds to one in `urls` list. This is an output parameter,\n the caller should provide a pointer to an empty list\n (*fetched === NULL) and the callee fills the list with data.\n @return 0 on success or -1 on failure"] pub fn alpm_fetch_pkgurl( handle: *mut alpm_handle_t, urls: *const alpm_list_t, @@ -4351,268 +3789,160 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Find a package in a list by name."] - #[doc = " @param haystack a list of alpm_pkg_t"] - #[doc = " @param needle the package name"] - #[doc = " @return a pointer to the package if found or NULL"] + #[doc = " Find a package in a list by name.\n @param haystack a list of alpm_pkg_t\n @param needle the package name\n @return a pointer to the package if found or NULL"] pub fn alpm_pkg_find( haystack: *mut alpm_list_t, needle: *const ::std::os::raw::c_char, ) -> *mut alpm_pkg_t; } extern "C" { - #[doc = " Free a package."] - #[doc = " Only packages loaded with \\link alpm_pkg_load \\endlink can be freed."] - #[doc = " Packages from databases will be freed by libalpm when they are unregistered."] - #[doc = " @param pkg package pointer to free"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Free a package.\n Only packages loaded with \\link alpm_pkg_load \\endlink can be freed.\n Packages from databases will be freed by libalpm when they are unregistered.\n @param pkg package pointer to free\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_pkg_free(pkg: *mut alpm_pkg_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Check the integrity (with md5) of a package from the sync cache."] - #[doc = " @param pkg package pointer"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Check the integrity (with md5) of a package from the sync cache.\n @param pkg package pointer\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_pkg_checkmd5sum(pkg: *mut alpm_pkg_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Compare two version strings and determine which one is 'newer'."] - #[doc = " Returns a value comparable to the way strcmp works. Returns 1"] - #[doc = " if a is newer than b, 0 if a and b are the same version, or -1"] - #[doc = " if b is newer than a."] - #[doc = ""] - #[doc = " Different epoch values for version strings will override any further"] - #[doc = " comparison. If no epoch is provided, 0 is assumed."] - #[doc = ""] - #[doc = " Keep in mind that the pkgrel is only compared if it is available"] - #[doc = " on both versions handed to this function. For example, comparing"] - #[doc = " 1.5-1 and 1.5 will yield 0; comparing 1.5-1 and 1.5-2 will yield"] - #[doc = " -1 as expected. This is mainly for supporting versioned dependencies"] - #[doc = " that do not include the pkgrel."] + #[doc = " Compare two version strings and determine which one is 'newer'.\n Returns a value comparable to the way strcmp works. Returns 1\n if a is newer than b, 0 if a and b are the same version, or -1\n if b is newer than a.\n\n Different epoch values for version strings will override any further\n comparison. If no epoch is provided, 0 is assumed.\n\n Keep in mind that the pkgrel is only compared if it is available\n on both versions handed to this function. For example, comparing\n 1.5-1 and 1.5 will yield 0; comparing 1.5-1 and 1.5-2 will yield\n -1 as expected. This is mainly for supporting versioned dependencies\n that do not include the pkgrel."] pub fn alpm_pkg_vercmp( a: *const ::std::os::raw::c_char, b: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Computes the list of packages requiring a given package."] - #[doc = " The return value of this function is a newly allocated"] - #[doc = " list of package names (char*), it should be freed by the caller."] - #[doc = " @param pkg a package"] - #[doc = " @return the list of packages requiring pkg"] + #[doc = " Computes the list of packages requiring a given package.\n The return value of this function is a newly allocated\n list of package names (char*), it should be freed by the caller.\n @param pkg a package\n @return the list of packages requiring pkg"] pub fn alpm_pkg_compute_requiredby(pkg: *mut alpm_pkg_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Computes the list of packages optionally requiring a given package."] - #[doc = " The return value of this function is a newly allocated"] - #[doc = " list of package names (char*), it should be freed by the caller."] - #[doc = " @param pkg a package"] - #[doc = " @return the list of packages optionally requiring pkg"] + #[doc = " Computes the list of packages optionally requiring a given package.\n The return value of this function is a newly allocated\n list of package names (char*), it should be freed by the caller.\n @param pkg a package\n @return the list of packages optionally requiring pkg"] pub fn alpm_pkg_compute_optionalfor(pkg: *mut alpm_pkg_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Test if a package should be ignored."] - #[doc = " Checks if the package is ignored via IgnorePkg, or if the package is"] - #[doc = " in a group ignored via IgnoreGroup."] - #[doc = " @param handle the context handle"] - #[doc = " @param pkg the package to test"] - #[doc = " @return 1 if the package should be ignored, 0 otherwise"] + #[doc = " Test if a package should be ignored.\n Checks if the package is ignored via IgnorePkg, or if the package is\n in a group ignored via IgnoreGroup.\n @param handle the context handle\n @param pkg the package to test\n @return 1 if the package should be ignored, 0 otherwise"] pub fn alpm_pkg_should_ignore( handle: *mut alpm_handle_t, pkg: *mut alpm_pkg_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Gets the name of the file from which the package was loaded."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal string"] + #[doc = " Gets the name of the file from which the package was loaded.\n @param pkg a pointer to package\n @return a reference to an internal string"] pub fn alpm_pkg_get_filename(pkg: *mut alpm_pkg_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Returns the package base name."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal string"] + #[doc = " Returns the package base name.\n @param pkg a pointer to package\n @return a reference to an internal string"] pub fn alpm_pkg_get_base(pkg: *mut alpm_pkg_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Returns the package name."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal string"] + #[doc = " Returns the package name.\n @param pkg a pointer to package\n @return a reference to an internal string"] pub fn alpm_pkg_get_name(pkg: *mut alpm_pkg_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Returns the package version as a string."] - #[doc = " This includes all available epoch, version, and pkgrel components. Use"] - #[doc = " alpm_pkg_vercmp() to compare version strings if necessary."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal string"] + #[doc = " Returns the package version as a string.\n This includes all available epoch, version, and pkgrel components. Use\n alpm_pkg_vercmp() to compare version strings if necessary.\n @param pkg a pointer to package\n @return a reference to an internal string"] pub fn alpm_pkg_get_version(pkg: *mut alpm_pkg_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Returns the origin of the package."] - #[doc = " @return an alpm_pkgfrom_t constant, -1 on error"] + #[doc = " Returns the origin of the package.\n @return an alpm_pkgfrom_t constant, -1 on error"] pub fn alpm_pkg_get_origin(pkg: *mut alpm_pkg_t) -> alpm_pkgfrom_t; } extern "C" { - #[doc = " Returns the package description."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal string"] + #[doc = " Returns the package description.\n @param pkg a pointer to package\n @return a reference to an internal string"] pub fn alpm_pkg_get_desc(pkg: *mut alpm_pkg_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Returns the package URL."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal string"] + #[doc = " Returns the package URL.\n @param pkg a pointer to package\n @return a reference to an internal string"] pub fn alpm_pkg_get_url(pkg: *mut alpm_pkg_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Returns the build timestamp of the package."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return the timestamp of the build time"] + #[doc = " Returns the build timestamp of the package.\n @param pkg a pointer to package\n @return the timestamp of the build time"] pub fn alpm_pkg_get_builddate(pkg: *mut alpm_pkg_t) -> alpm_time_t; } extern "C" { - #[doc = " Returns the install timestamp of the package."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return the timestamp of the install time"] + #[doc = " Returns the install timestamp of the package.\n @param pkg a pointer to package\n @return the timestamp of the install time"] pub fn alpm_pkg_get_installdate(pkg: *mut alpm_pkg_t) -> alpm_time_t; } extern "C" { - #[doc = " Returns the packager's name."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal string"] + #[doc = " Returns the packager's name.\n @param pkg a pointer to package\n @return a reference to an internal string"] pub fn alpm_pkg_get_packager(pkg: *mut alpm_pkg_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Returns the package's MD5 checksum as a string."] - #[doc = " The returned string is a sequence of 32 lowercase hexadecimal digits."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal string"] + #[doc = " Returns the package's MD5 checksum as a string.\n The returned string is a sequence of 32 lowercase hexadecimal digits.\n @param pkg a pointer to package\n @return a reference to an internal string"] pub fn alpm_pkg_get_md5sum(pkg: *mut alpm_pkg_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Returns the package's SHA256 checksum as a string."] - #[doc = " The returned string is a sequence of 64 lowercase hexadecimal digits."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal string"] + #[doc = " Returns the package's SHA256 checksum as a string.\n The returned string is a sequence of 64 lowercase hexadecimal digits.\n @param pkg a pointer to package\n @return a reference to an internal string"] pub fn alpm_pkg_get_sha256sum(pkg: *mut alpm_pkg_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Returns the architecture for which the package was built."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal string"] + #[doc = " Returns the architecture for which the package was built.\n @param pkg a pointer to package\n @return a reference to an internal string"] pub fn alpm_pkg_get_arch(pkg: *mut alpm_pkg_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Returns the size of the package. This is only available for sync database"] - #[doc = " packages and package files, not those loaded from the local database."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return the size of the package in bytes."] + #[doc = " Returns the size of the package. This is only available for sync database\n packages and package files, not those loaded from the local database.\n @param pkg a pointer to package\n @return the size of the package in bytes."] pub fn alpm_pkg_get_size(pkg: *mut alpm_pkg_t) -> off_t; } extern "C" { - #[doc = " Returns the installed size of the package."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return the total size of files installed by the package."] + #[doc = " Returns the installed size of the package.\n @param pkg a pointer to package\n @return the total size of files installed by the package."] pub fn alpm_pkg_get_isize(pkg: *mut alpm_pkg_t) -> off_t; } extern "C" { - #[doc = " Returns the package installation reason."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return an enum member giving the install reason."] + #[doc = " Returns the package installation reason.\n @param pkg a pointer to package\n @return an enum member giving the install reason."] pub fn alpm_pkg_get_reason(pkg: *mut alpm_pkg_t) -> alpm_pkgreason_t; } extern "C" { - #[doc = " Returns the list of package licenses."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a pointer to an internal list of strings."] + #[doc = " Returns the list of package licenses.\n @param pkg a pointer to package\n @return a pointer to an internal list of strings."] pub fn alpm_pkg_get_licenses(pkg: *mut alpm_pkg_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Returns the list of package groups."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a pointer to an internal list of strings."] + #[doc = " Returns the list of package groups.\n @param pkg a pointer to package\n @return a pointer to an internal list of strings."] pub fn alpm_pkg_get_groups(pkg: *mut alpm_pkg_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Returns the list of package dependencies as alpm_depend_t."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal list of alpm_depend_t structures."] + #[doc = " Returns the list of package dependencies as alpm_depend_t.\n @param pkg a pointer to package\n @return a reference to an internal list of alpm_depend_t structures."] pub fn alpm_pkg_get_depends(pkg: *mut alpm_pkg_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Returns the list of package optional dependencies."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal list of alpm_depend_t structures."] + #[doc = " Returns the list of package optional dependencies.\n @param pkg a pointer to package\n @return a reference to an internal list of alpm_depend_t structures."] pub fn alpm_pkg_get_optdepends(pkg: *mut alpm_pkg_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Returns a list of package check dependencies"] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal list of alpm_depend_t structures."] + #[doc = " Returns a list of package check dependencies\n @param pkg a pointer to package\n @return a reference to an internal list of alpm_depend_t structures."] pub fn alpm_pkg_get_checkdepends(pkg: *mut alpm_pkg_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Returns a list of package make dependencies"] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal list of alpm_depend_t structures."] + #[doc = " Returns a list of package make dependencies\n @param pkg a pointer to package\n @return a reference to an internal list of alpm_depend_t structures."] pub fn alpm_pkg_get_makedepends(pkg: *mut alpm_pkg_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Returns the list of packages conflicting with pkg."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal list of alpm_depend_t structures."] + #[doc = " Returns the list of packages conflicting with pkg.\n @param pkg a pointer to package\n @return a reference to an internal list of alpm_depend_t structures."] pub fn alpm_pkg_get_conflicts(pkg: *mut alpm_pkg_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Returns the list of packages provided by pkg."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal list of alpm_depend_t structures."] + #[doc = " Returns the list of packages provided by pkg.\n @param pkg a pointer to package\n @return a reference to an internal list of alpm_depend_t structures."] pub fn alpm_pkg_get_provides(pkg: *mut alpm_pkg_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Returns the list of packages to be replaced by pkg."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal list of alpm_depend_t structures."] + #[doc = " Returns the list of packages to be replaced by pkg.\n @param pkg a pointer to package\n @return a reference to an internal list of alpm_depend_t structures."] pub fn alpm_pkg_get_replaces(pkg: *mut alpm_pkg_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Returns the list of files installed by pkg."] - #[doc = " The filenames are relative to the install root,"] - #[doc = " and do not include leading slashes."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a pointer to a filelist object containing a count and an array of"] - #[doc = " package file objects"] + #[doc = " Returns the list of files installed by pkg.\n The filenames are relative to the install root,\n and do not include leading slashes.\n @param pkg a pointer to package\n @return a pointer to a filelist object containing a count and an array of\n package file objects"] pub fn alpm_pkg_get_files(pkg: *mut alpm_pkg_t) -> *mut alpm_filelist_t; } extern "C" { - #[doc = " Returns the list of files backed up when installing pkg."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to a list of alpm_backup_t objects"] + #[doc = " Returns the list of files backed up when installing pkg.\n @param pkg a pointer to package\n @return a reference to a list of alpm_backup_t objects"] pub fn alpm_pkg_get_backup(pkg: *mut alpm_pkg_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Returns the database containing pkg."] - #[doc = " Returns a pointer to the alpm_db_t structure the package is"] - #[doc = " originating from, or NULL if the package was loaded from a file."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a pointer to the DB containing pkg, or NULL."] + #[doc = " Returns the database containing pkg.\n Returns a pointer to the alpm_db_t structure the package is\n originating from, or NULL if the package was loaded from a file.\n @param pkg a pointer to package\n @return a pointer to the DB containing pkg, or NULL."] pub fn alpm_pkg_get_db(pkg: *mut alpm_pkg_t) -> *mut alpm_db_t; } extern "C" { - #[doc = " Returns the base64 encoded package signature."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal string"] + #[doc = " Returns the base64 encoded package signature.\n @param pkg a pointer to package\n @return a reference to an internal string"] pub fn alpm_pkg_get_base64_sig(pkg: *mut alpm_pkg_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Extracts package signature either from embedded package signature"] - #[doc = " or if it is absent then reads data from detached signature file."] - #[doc = " @param pkg a pointer to package."] - #[doc = " @param sig output parameter for signature data. Callee function allocates"] - #[doc = " a buffer needed for the signature data. Caller is responsible for"] - #[doc = " freeing this buffer."] - #[doc = " @param sig_len output parameter for the signature data length."] - #[doc = " @return 0 on success, negative number on error."] + #[doc = " Extracts package signature either from embedded package signature\n or if it is absent then reads data from detached signature file.\n @param pkg a pointer to package.\n @param sig output parameter for signature data. Callee function allocates\n a buffer needed for the signature data. Caller is responsible for\n freeing this buffer.\n @param sig_len output parameter for the signature data length.\n @return 0 on success, negative number on error."] pub fn alpm_pkg_get_sig( pkg: *mut alpm_pkg_t, sig: *mut *mut ::std::os::raw::c_uchar, @@ -4620,53 +3950,30 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Returns the method used to validate a package during install."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return an enum member giving the validation method"] + #[doc = " Returns the method used to validate a package during install.\n @param pkg a pointer to package\n @return an enum member giving the validation method"] pub fn alpm_pkg_get_validation(pkg: *mut alpm_pkg_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Returns whether the package has an install scriptlet."] - #[doc = " @return 0 if FALSE, TRUE otherwise"] + #[doc = " Returns whether the package has an install scriptlet.\n @return 0 if FALSE, TRUE otherwise"] pub fn alpm_pkg_has_scriptlet(pkg: *mut alpm_pkg_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Returns the size of the files that will be downloaded to install a"] - #[doc = " package."] - #[doc = " @param newpkg the new package to upgrade to"] - #[doc = " @return the size of the download"] + #[doc = " Returns the size of the files that will be downloaded to install a\n package.\n @param newpkg the new package to upgrade to\n @return the size of the download"] pub fn alpm_pkg_download_size(newpkg: *mut alpm_pkg_t) -> off_t; } extern "C" { - #[doc = " Set install reason for a package in the local database."] - #[doc = " The provided package object must be from the local database or this method"] - #[doc = " will fail. The write to the local database is performed immediately."] - #[doc = " @param pkg the package to update"] - #[doc = " @param reason the new install reason"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Set install reason for a package in the local database.\n The provided package object must be from the local database or this method\n will fail. The write to the local database is performed immediately.\n @param pkg the package to update\n @param reason the new install reason\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_pkg_set_reason( pkg: *mut alpm_pkg_t, reason: alpm_pkgreason_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Open a package changelog for reading."] - #[doc = " Similar to fopen in functionality, except that the returned 'file"] - #[doc = " stream' could really be from an archive as well as from the database."] - #[doc = " @param pkg the package to read the changelog of (either file or db)"] - #[doc = " @return a 'file stream' to the package changelog"] + #[doc = " Open a package changelog for reading.\n Similar to fopen in functionality, except that the returned 'file\n stream' could really be from an archive as well as from the database.\n @param pkg the package to read the changelog of (either file or db)\n @return a 'file stream' to the package changelog"] pub fn alpm_pkg_changelog_open(pkg: *mut alpm_pkg_t) -> *mut ::std::os::raw::c_void; } extern "C" { - #[doc = " Read data from an open changelog 'file stream'."] - #[doc = " Similar to fread in functionality, this function takes a buffer and"] - #[doc = " amount of data to read. If an error occurs pm_errno will be set."] - #[doc = " @param ptr a buffer to fill with raw changelog data"] - #[doc = " @param size the size of the buffer"] - #[doc = " @param pkg the package that the changelog is being read from"] - #[doc = " @param fp a 'file stream' to the package changelog"] - #[doc = " @return the number of characters read, or 0 if there is no more data or an"] - #[doc = " error occurred."] + #[doc = " Read data from an open changelog 'file stream'.\n Similar to fread in functionality, this function takes a buffer and\n amount of data to read. If an error occurs pm_errno will be set.\n @param ptr a buffer to fill with raw changelog data\n @param size the size of the buffer\n @param pkg the package that the changelog is being read from\n @param fp a 'file stream' to the package changelog\n @return the number of characters read, or 0 if there is no more data or an\n error occurred."] pub fn alpm_pkg_changelog_read( ptr: *mut ::std::os::raw::c_void, size: usize, @@ -4675,27 +3982,18 @@ extern "C" { ) -> usize; } extern "C" { - #[doc = " Close a package changelog for reading."] - #[doc = " @param pkg the package to close the changelog of (either file or db)"] - #[doc = " @param fp the 'file stream' to the package changelog to close"] - #[doc = " @return 0 on success, -1 on error"] + #[doc = " Close a package changelog for reading.\n @param pkg the package to close the changelog of (either file or db)\n @param fp the 'file stream' to the package changelog to close\n @return 0 on success, -1 on error"] pub fn alpm_pkg_changelog_close( pkg: *const alpm_pkg_t, fp: *mut ::std::os::raw::c_void, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Open a package mtree file for reading."] - #[doc = " @param pkg the local package to read the mtree of"] - #[doc = " @return an archive structure for the package mtree file"] + #[doc = " Open a package mtree file for reading.\n @param pkg the local package to read the mtree of\n @return an archive structure for the package mtree file"] pub fn alpm_pkg_mtree_open(pkg: *mut alpm_pkg_t) -> *mut archive; } extern "C" { - #[doc = " Read next entry from a package mtree file."] - #[doc = " @param pkg the package that the mtree file is being read from"] - #[doc = " @param archive the archive structure reading from the mtree file"] - #[doc = " @param entry an archive_entry to store the entry header information"] - #[doc = " @return 0 on success, 1 if end of archive is reached, -1 otherwise."] + #[doc = " Read next entry from a package mtree file.\n @param pkg the package that the mtree file is being read from\n @param archive the archive structure reading from the mtree file\n @param entry an archive_entry to store the entry header information\n @return 0 on success, 1 if end of archive is reached, -1 otherwise."] pub fn alpm_pkg_mtree_next( pkg: *const alpm_pkg_t, archive: *mut archive, @@ -4703,9 +4001,7 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Close a package mtree file."] - #[doc = " @param pkg the local package to close the mtree of"] - #[doc = " @param archive the archive to close"] + #[doc = " Close a package mtree file.\n @param pkg the local package to close the mtree of\n @param archive the archive to close"] pub fn alpm_pkg_mtree_close( pkg: *const alpm_pkg_t, archive: *mut archive, @@ -4748,130 +4044,85 @@ pub mod _alpm_transflag_t { #[doc = " Transaction flags"] pub use self::_alpm_transflag_t::Type as alpm_transflag_t; extern "C" { - #[doc = " Returns the bitfield of flags for the current transaction."] - #[doc = " @param handle the context handle"] - #[doc = " @return the bitfield of transaction flags"] + #[doc = " Returns the bitfield of flags for the current transaction.\n @param handle the context handle\n @return the bitfield of transaction flags"] pub fn alpm_trans_get_flags(handle: *mut alpm_handle_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Returns a list of packages added by the transaction."] - #[doc = " @param handle the context handle"] - #[doc = " @return a list of alpm_pkg_t structures"] + #[doc = " Returns a list of packages added by the transaction.\n @param handle the context handle\n @return a list of alpm_pkg_t structures"] pub fn alpm_trans_get_add(handle: *mut alpm_handle_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Returns the list of packages removed by the transaction."] - #[doc = " @param handle the context handle"] - #[doc = " @return a list of alpm_pkg_t structures"] + #[doc = " Returns the list of packages removed by the transaction.\n @param handle the context handle\n @return a list of alpm_pkg_t structures"] pub fn alpm_trans_get_remove(handle: *mut alpm_handle_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Initialize the transaction."] - #[doc = " @param handle the context handle"] - #[doc = " @param flags flags of the transaction (like nodeps, etc; see alpm_transflag_t)"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Initialize the transaction.\n @param handle the context handle\n @param flags flags of the transaction (like nodeps, etc; see alpm_transflag_t)\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_trans_init( handle: *mut alpm_handle_t, flags: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Prepare a transaction."] - #[doc = " @param handle the context handle"] - #[doc = " @param data the address of an alpm_list where a list"] - #[doc = " of alpm_depmissing_t objects is dumped (conflicting packages)"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Prepare a transaction.\n @param handle the context handle\n @param data the address of an alpm_list where a list\n of alpm_depmissing_t objects is dumped (conflicting packages)\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_trans_prepare( handle: *mut alpm_handle_t, data: *mut *mut alpm_list_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Commit a transaction."] - #[doc = " @param handle the context handle"] - #[doc = " @param data the address of an alpm_list where detailed description"] - #[doc = " of an error can be dumped (i.e. list of conflicting files)"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Commit a transaction.\n @param handle the context handle\n @param data the address of an alpm_list where detailed description\n of an error can be dumped (i.e. list of conflicting files)\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_trans_commit( handle: *mut alpm_handle_t, data: *mut *mut alpm_list_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Interrupt a transaction."] - #[doc = " @param handle the context handle"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Interrupt a transaction.\n @param handle the context handle\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_trans_interrupt(handle: *mut alpm_handle_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Release a transaction."] - #[doc = " @param handle the context handle"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Release a transaction.\n @param handle the context handle\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_trans_release(handle: *mut alpm_handle_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Search for packages to upgrade and add them to the transaction."] - #[doc = " @param handle the context handle"] - #[doc = " @param enable_downgrade allow downgrading of packages if the remote version is lower"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Search for packages to upgrade and add them to the transaction.\n @param handle the context handle\n @param enable_downgrade allow downgrading of packages if the remote version is lower\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_sync_sysupgrade( handle: *mut alpm_handle_t, enable_downgrade: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Add a package to the transaction."] - #[doc = " If the package was loaded by alpm_pkg_load(), it will be freed upon"] - #[doc = " \\link alpm_trans_release \\endlink invocation."] - #[doc = " @param handle the context handle"] - #[doc = " @param pkg the package to add"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Add a package to the transaction.\n If the package was loaded by alpm_pkg_load(), it will be freed upon\n \\link alpm_trans_release \\endlink invocation.\n @param handle the context handle\n @param pkg the package to add\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_add_pkg(handle: *mut alpm_handle_t, pkg: *mut alpm_pkg_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Add a package removal to the transaction."] - #[doc = " @param handle the context handle"] - #[doc = " @param pkg the package to uninstall"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Add a package removal to the transaction.\n @param handle the context handle\n @param pkg the package to uninstall\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_remove_pkg( handle: *mut alpm_handle_t, pkg: *mut alpm_pkg_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Check for new version of pkg in syncdbs."] - #[doc = ""] - #[doc = " If the same package appears multiple dbs only the first will be checked"] - #[doc = ""] - #[doc = " This only checks the syncdb for a newer version. It does not access the network at all."] - #[doc = " See \\link alpm_db_update \\endlink to update a database."] + #[doc = " Check for new version of pkg in syncdbs.\n\n If the same package appears multiple dbs only the first will be checked\n\n This only checks the syncdb for a newer version. It does not access the network at all.\n See \\link alpm_db_update \\endlink to update a database."] pub fn alpm_sync_get_new_version( pkg: *mut alpm_pkg_t, dbs_sync: *mut alpm_list_t, ) -> *mut alpm_pkg_t; } extern "C" { - #[doc = " Get the md5 sum of file."] - #[doc = " @param filename name of the file"] - #[doc = " @return the checksum on success, NULL on error"] + #[doc = " Get the md5 sum of file.\n @param filename name of the file\n @return the checksum on success, NULL on error"] pub fn alpm_compute_md5sum( filename: *const ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } extern "C" { - #[doc = " Get the sha256 sum of file."] - #[doc = " @param filename name of the file"] - #[doc = " @return the checksum on success, NULL on error"] + #[doc = " Get the sha256 sum of file.\n @param filename name of the file\n @return the checksum on success, NULL on error"] pub fn alpm_compute_sha256sum( filename: *const ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } extern "C" { - #[doc = " Remove the database lock file"] - #[doc = " @param handle the context handle"] - #[doc = " @return 0 on success, -1 on error"] - #[doc = ""] - #[doc = " @note Safe to call from inside signal handlers."] + #[doc = " Remove the database lock file\n @param handle the context handle\n @return 0 on success, -1 on error\n\n @note Safe to call from inside signal handlers."] pub fn alpm_unlock(handle: *mut alpm_handle_t) -> ::std::os::raw::c_int; } pub mod alpm_caps { @@ -4885,18 +4136,16 @@ pub mod alpm_caps { pub const ALPM_CAPABILITY_SIGNATURES: Type = 4; } extern "C" { - #[doc = " Get the version of library."] - #[doc = " @return the library version, e.g. \"6.0.4\""] + #[doc = " Get the version of library.\n @return the library version, e.g. \"6.0.4\""] pub fn alpm_version() -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Get the capabilities of the library."] - #[doc = " @return a bitmask of the capabilities"] + #[doc = " Get the capabilities of the library.\n @return a bitmask of the capabilities"] pub fn alpm_capabilities() -> ::std::os::raw::c_int; } pub type __builtin_va_list = [__va_list_tag; 1usize]; #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct __va_list_tag { pub gp_offset: ::std::os::raw::c_uint, pub fp_offset: ::std::os::raw::c_uint, @@ -4905,6 +4154,8 @@ pub struct __va_list_tag { } #[test] fn bindgen_test_layout___va_list_tag() { + const UNINIT: ::std::mem::MaybeUninit<__va_list_tag> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__va_list_tag>(), 24usize, @@ -4916,7 +4167,7 @@ fn bindgen_test_layout___va_list_tag() { concat!("Alignment of ", stringify!(__va_list_tag)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).gp_offset as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).gp_offset) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4926,7 +4177,7 @@ fn bindgen_test_layout___va_list_tag() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).fp_offset as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).fp_offset) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -4936,7 +4187,7 @@ fn bindgen_test_layout___va_list_tag() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).overflow_arg_area as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).overflow_arg_area) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -4946,7 +4197,7 @@ fn bindgen_test_layout___va_list_tag() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).reg_save_area as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reg_save_area) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", diff --git a/alpm-sys/src/ffi_git.rs b/alpm-sys/src/ffi_git.rs index 908b222..02e5aad 100644 --- a/alpm-sys/src/ffi_git.rs +++ b/alpm-sys/src/ffi_git.rs @@ -1,6 +1,5 @@ -/* automatically generated by rust-bindgen 0.59.1 */ +/* automatically generated by rust-bindgen 0.66.1 */ -pub type __int64_t = ::std::os::raw::c_long; pub type __mode_t = ::std::os::raw::c_uint; pub type __off_t = ::std::os::raw::c_long; pub type mode_t = __mode_t; @@ -17,7 +16,7 @@ pub struct archive_entry { _unused: [u8; 0], } #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_list_t { pub data: *mut ::std::os::raw::c_void, pub prev: *mut _alpm_list_t, @@ -25,6 +24,8 @@ pub struct _alpm_list_t { } #[test] fn bindgen_test_layout__alpm_list_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_list_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_list_t>(), 24usize, @@ -36,7 +37,7 @@ fn bindgen_test_layout__alpm_list_t() { concat!("Alignment of ", stringify!(_alpm_list_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_list_t>())).data as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -46,7 +47,7 @@ fn bindgen_test_layout__alpm_list_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_list_t>())).prev as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).prev) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -56,7 +57,7 @@ fn bindgen_test_layout__alpm_list_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_list_t>())).next as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -216,45 +217,61 @@ extern "C" { size: usize, ) -> *mut ::std::os::raw::c_void; } -#[doc = " The libalpm context handle."] -#[doc = ""] -#[doc = " This struct represents an instance of libalpm."] -#[doc = " @ingroup libalpm_handle"] +#[doc = " The libalpm context handle.\n\n This struct represents an instance of libalpm.\n @ingroup libalpm_handle"] pub type alpm_handle_t = u8; -#[doc = " A database."] -#[doc = ""] -#[doc = " A database is a container that stores metadata about packages."] -#[doc = ""] -#[doc = " A database can be located on the local filesystem or on a remote server."] -#[doc = ""] -#[doc = " To use a database, it must first be registered via \\link alpm_register_syncdb \\endlink."] -#[doc = " If the database is already present in dbpath then it will be usable. Otherwise,"] -#[doc = " the database needs to be downloaded using \\link alpm_db_update \\endlink. Even if the"] -#[doc = " source of the database is the local filesystem."] -#[doc = ""] -#[doc = " After this, the database can be used to query packages and groups. Any packages or groups"] -#[doc = " from the database will continue to be owned by the database and do not need to be freed by"] -#[doc = " the user. They will be freed when the database is unregistered."] -#[doc = ""] -#[doc = " Databases are automatically unregistered when the \\link alpm_handle_t \\endlink is released."] -#[doc = " @ingroup libalpm_databases"] +#[doc = " A database.\n\n A database is a container that stores metadata about packages.\n\n A database can be located on the local filesystem or on a remote server.\n\n To use a database, it must first be registered via \\link alpm_register_syncdb \\endlink.\n If the database is already present in dbpath then it will be usable. Otherwise,\n the database needs to be downloaded using \\link alpm_db_update \\endlink. Even if the\n source of the database is the local filesystem.\n\n After this, the database can be used to query packages and groups. Any packages or groups\n from the database will continue to be owned by the database and do not need to be freed by\n the user. They will be freed when the database is unregistered.\n\n Databases are automatically unregistered when the \\link alpm_handle_t \\endlink is released.\n @ingroup libalpm_databases"] pub type alpm_db_t = u8; -#[doc = " A package."] -#[doc = ""] -#[doc = " A package can be loaded from disk via \\link alpm_pkg_load \\endlink or retrieved from a database."] -#[doc = " Packages from databases are automatically freed when the database is unregistered. Packages loaded"] -#[doc = " from a file must be freed manually."] -#[doc = ""] -#[doc = " Packages can then be queried for metadata or added to a \\link alpm_trans_t transaction \\endlink"] -#[doc = " to be added or removed from the system."] -#[doc = " @ingroup libalpm_packages"] +#[doc = " A package.\n\n A package can be loaded from disk via \\link alpm_pkg_load \\endlink or retrieved from a database.\n Packages from databases are automatically freed when the database is unregistered. Packages loaded\n from a file must be freed manually.\n\n Packages can then be queried for metadata or added to a transaction\n to be added or removed from the system.\n @ingroup libalpm_packages"] pub type alpm_pkg_t = u8; -#[doc = " The time type used by libalpm. Represents a unix time stamp"] -#[doc = " @ingroup libalpm_misc"] +#[doc = " The extended data type used to store non-standard package data fields\n @ingroup libalpm_packages"] +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] +pub struct _alpm_pkg_xdata_t { + pub name: *mut ::std::os::raw::c_char, + pub value: *mut ::std::os::raw::c_char, +} +#[test] +fn bindgen_test_layout__alpm_pkg_xdata_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_pkg_xdata_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<_alpm_pkg_xdata_t>(), + 16usize, + concat!("Size of: ", stringify!(_alpm_pkg_xdata_t)) + ); + assert_eq!( + ::std::mem::align_of::<_alpm_pkg_xdata_t>(), + 8usize, + concat!("Alignment of ", stringify!(_alpm_pkg_xdata_t)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_alpm_pkg_xdata_t), + "::", + stringify!(name) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_alpm_pkg_xdata_t), + "::", + stringify!(value) + ) + ); +} +#[doc = " The extended data type used to store non-standard package data fields\n @ingroup libalpm_packages"] +pub type alpm_pkg_xdata_t = _alpm_pkg_xdata_t; +#[doc = " The time type used by libalpm. Represents a unix time stamp\n @ingroup libalpm_misc"] pub type alpm_time_t = i64; #[doc = " File in a package"] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_file_t { #[doc = " Name of the file"] pub name: *mut ::std::os::raw::c_char, @@ -265,6 +282,8 @@ pub struct _alpm_file_t { } #[test] fn bindgen_test_layout__alpm_file_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_file_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_file_t>(), 24usize, @@ -276,7 +295,7 @@ fn bindgen_test_layout__alpm_file_t() { concat!("Alignment of ", stringify!(_alpm_file_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_file_t>())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -286,7 +305,7 @@ fn bindgen_test_layout__alpm_file_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_file_t>())).size as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -296,7 +315,7 @@ fn bindgen_test_layout__alpm_file_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_file_t>())).mode as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -310,7 +329,7 @@ fn bindgen_test_layout__alpm_file_t() { pub type alpm_file_t = _alpm_file_t; #[doc = " Package filelist container"] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_filelist_t { #[doc = " Amount of files in the array"] pub count: usize, @@ -319,6 +338,8 @@ pub struct _alpm_filelist_t { } #[test] fn bindgen_test_layout__alpm_filelist_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_filelist_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_filelist_t>(), 16usize, @@ -330,7 +351,7 @@ fn bindgen_test_layout__alpm_filelist_t() { concat!("Alignment of ", stringify!(_alpm_filelist_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_filelist_t>())).count as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -340,7 +361,7 @@ fn bindgen_test_layout__alpm_filelist_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_filelist_t>())).files as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).files) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -354,7 +375,7 @@ fn bindgen_test_layout__alpm_filelist_t() { pub type alpm_filelist_t = _alpm_filelist_t; #[doc = " Local package or package file backup entry"] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_backup_t { #[doc = " Name of the file (without .pacsave extension)"] pub name: *mut ::std::os::raw::c_char, @@ -363,6 +384,8 @@ pub struct _alpm_backup_t { } #[test] fn bindgen_test_layout__alpm_backup_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_backup_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_backup_t>(), 16usize, @@ -374,7 +397,7 @@ fn bindgen_test_layout__alpm_backup_t() { concat!("Alignment of ", stringify!(_alpm_backup_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_backup_t>())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -384,7 +407,7 @@ fn bindgen_test_layout__alpm_backup_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_backup_t>())).hash as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hash) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -397,21 +420,15 @@ fn bindgen_test_layout__alpm_backup_t() { #[doc = " Local package or package file backup entry"] pub type alpm_backup_t = _alpm_backup_t; extern "C" { - #[doc = " Determines whether a package filelist contains a given path."] - #[doc = " The provided path should be relative to the install root with no leading"] - #[doc = " slashes, e.g. \"etc/localtime\". When searching for directories, the path must"] - #[doc = " have a trailing slash."] - #[doc = " @param filelist a pointer to a package filelist"] - #[doc = " @param path the path to search for in the package"] - #[doc = " @return a pointer to the matching file or NULL if not found"] + #[doc = " Determines whether a package filelist contains a given path.\n The provided path should be relative to the install root with no leading\n slashes, e.g. \"etc/localtime\". When searching for directories, the path must\n have a trailing slash.\n @param filelist a pointer to a package filelist\n @param path the path to search for in the package\n @return a pointer to the matching file or NULL if not found"] pub fn alpm_filelist_contains( - filelist: *mut alpm_filelist_t, + filelist: *const alpm_filelist_t, path: *const ::std::os::raw::c_char, ) -> *mut alpm_file_t; } #[doc = " Package group"] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_group_t { #[doc = " group name"] pub name: *mut ::std::os::raw::c_char, @@ -420,6 +437,8 @@ pub struct _alpm_group_t { } #[test] fn bindgen_test_layout__alpm_group_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_group_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_group_t>(), 16usize, @@ -431,7 +450,7 @@ fn bindgen_test_layout__alpm_group_t() { concat!("Alignment of ", stringify!(_alpm_group_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_group_t>())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -441,7 +460,7 @@ fn bindgen_test_layout__alpm_group_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_group_t>())).packages as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).packages) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -454,12 +473,7 @@ fn bindgen_test_layout__alpm_group_t() { #[doc = " Package group"] pub type alpm_group_t = _alpm_group_t; extern "C" { - #[doc = " Find group members across a list of databases."] - #[doc = " If a member exists in several databases, only the first database is used."] - #[doc = " IgnorePkg is also handled."] - #[doc = " @param dbs the list of alpm_db_t *"] - #[doc = " @param name the name of the group"] - #[doc = " @return the list of alpm_pkg_t * (caller is responsible for alpm_list_free)"] + #[doc = " Find group members across a list of databases.\n If a member exists in several databases, only the first database is used.\n IgnorePkg is also handled.\n @param dbs the list of alpm_db_t *\n @param name the name of the group\n @return the list of alpm_pkg_t * (caller is responsible for alpm_list_free)"] pub fn alpm_find_group_pkgs( dbs: *mut alpm_list_t, name: *const ::std::os::raw::c_char, @@ -467,7 +481,7 @@ extern "C" { } #[repr(u32)] #[doc = " libalpm's error type"] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum _alpm_errno_t { #[doc = " No error"] ALPM_ERR_OK = 0, @@ -583,25 +597,15 @@ pub enum _alpm_errno_t { #[doc = " libalpm's error type"] pub use self::_alpm_errno_t as alpm_errno_t; extern "C" { - #[doc = " Returns the current error code from the handle."] - #[doc = " @param handle the context handle"] - #[doc = " @return the current error code of the handle"] + #[doc = " Returns the current error code from the handle.\n @param handle the context handle\n @return the current error code of the handle"] pub fn alpm_errno(handle: *mut alpm_handle_t) -> alpm_errno_t; } extern "C" { - #[doc = " Returns the string corresponding to an error number."] - #[doc = " @param err the error code to get the string for"] - #[doc = " @return the string relating to the given error code"] + #[doc = " Returns the string corresponding to an error number.\n @param err the error code to get the string for\n @return the string relating to the given error code"] pub fn alpm_strerror(err: alpm_errno_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Initializes the library."] - #[doc = " Creates handle, connects to database and creates lockfile."] - #[doc = " This must be called before any other functions are called."] - #[doc = " @param root the root path for all filesystem operations"] - #[doc = " @param dbpath the absolute path to the libalpm database"] - #[doc = " @param err an optional variable to hold any error return codes"] - #[doc = " @return a context handle on success, NULL on error, err will be set if provided"] + #[doc = " Initializes the library.\n Creates handle, connects to database and creates lockfile.\n This must be called before any other functions are called.\n @param root the root path for all filesystem operations\n @param dbpath the absolute path to the libalpm database\n @param err an optional variable to hold any error return codes\n @return a context handle on success, NULL on error, err will be set if provided"] pub fn alpm_initialize( root: *const ::std::os::raw::c_char, dbpath: *const ::std::os::raw::c_char, @@ -609,13 +613,7 @@ extern "C" { ) -> *mut alpm_handle_t; } extern "C" { - #[doc = " Release the library."] - #[doc = " Disconnects from the database, removes handle and lockfile"] - #[doc = " This should be the last alpm call you make."] - #[doc = " After this returns, handle should be considered invalid and cannot be reused"] - #[doc = " in any way."] - #[doc = " @param handle the context handle"] - #[doc = " @return 0 on success, -1 on error"] + #[doc = " Release the library.\n Disconnects from the database, removes handle and lockfile\n This should be the last alpm call you make.\n After this returns, handle should be considered invalid and cannot be reused\n in any way.\n @param handle the context handle\n @return 0 on success, -1 on error"] pub fn alpm_release(handle: *mut alpm_handle_t) -> ::std::os::raw::c_int; } pub mod _alpm_siglevel_t { @@ -623,18 +621,15 @@ pub mod _alpm_siglevel_t { pub type Type = ::std::os::raw::c_uint; #[doc = " Packages require a signature"] pub const ALPM_SIG_PACKAGE: Type = 1; - #[doc = " Packages do not require a signature,"] - #[doc = " but check packages that do have signatures"] + #[doc = " Packages do not require a signature,\n but check packages that do have signatures"] pub const ALPM_SIG_PACKAGE_OPTIONAL: Type = 2; - #[doc = " Packages do not require a signature,"] - #[doc = " but check packages that do have signatures"] + #[doc = " Packages do not require a signature,\n but check packages that do have signatures"] pub const ALPM_SIG_PACKAGE_MARGINAL_OK: Type = 4; #[doc = " Allow packages with signatures that are unknown trust"] pub const ALPM_SIG_PACKAGE_UNKNOWN_OK: Type = 8; #[doc = " Databases require a signature"] pub const ALPM_SIG_DATABASE: Type = 1024; - #[doc = " Databases do not require a signature,"] - #[doc = " but check databases that do have signatures"] + #[doc = " Databases do not require a signature,\n but check databases that do have signatures"] pub const ALPM_SIG_DATABASE_OPTIONAL: Type = 2048; #[doc = " Allow databases with signatures that are marginal trust"] pub const ALPM_SIG_DATABASE_MARGINAL_OK: Type = 4096; @@ -647,7 +642,7 @@ pub mod _alpm_siglevel_t { pub use self::_alpm_siglevel_t::Type as alpm_siglevel_t; #[repr(u32)] #[doc = " PGP signature verification status return codes"] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum _alpm_sigstatus_t { #[doc = " Signature is valid"] ALPM_SIGSTATUS_VALID = 0, @@ -666,7 +661,7 @@ pub enum _alpm_sigstatus_t { pub use self::_alpm_sigstatus_t as alpm_sigstatus_t; #[repr(u32)] #[doc = " The trust level of a PGP key"] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum _alpm_sigvalidity_t { #[doc = " The signature is fully trusted"] ALPM_SIGVALIDITY_FULL = 0, @@ -681,7 +676,7 @@ pub enum _alpm_sigvalidity_t { pub use self::_alpm_sigvalidity_t as alpm_sigvalidity_t; #[doc = " A PGP key"] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_pgpkey_t { #[doc = " The actual key data"] pub data: *mut ::std::os::raw::c_void, @@ -701,16 +696,13 @@ pub struct _alpm_pgpkey_t { pub length: ::std::os::raw::c_uint, #[doc = " has the key been revoked"] pub revoked: ::std::os::raw::c_uint, - #[doc = " A character representing the encryption algorithm used by the public key"] - #[doc = ""] - #[doc = " ? = unknown"] - #[doc = " R = RSA"] - #[doc = " D = DSA"] - #[doc = " E = EDDSA"] + #[doc = " A character representing the encryption algorithm used by the public key\n\n ? = unknown\n R = RSA\n D = DSA\n E = EDDSA"] pub pubkey_algo: ::std::os::raw::c_char, } #[test] fn bindgen_test_layout__alpm_pgpkey_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_pgpkey_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_pgpkey_t>(), 72usize, @@ -722,7 +714,7 @@ fn bindgen_test_layout__alpm_pgpkey_t() { concat!("Alignment of ", stringify!(_alpm_pgpkey_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_pgpkey_t>())).data as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -732,7 +724,7 @@ fn bindgen_test_layout__alpm_pgpkey_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_pgpkey_t>())).fingerprint as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).fingerprint) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -742,7 +734,7 @@ fn bindgen_test_layout__alpm_pgpkey_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_pgpkey_t>())).uid as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).uid) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -752,7 +744,7 @@ fn bindgen_test_layout__alpm_pgpkey_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_pgpkey_t>())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -762,7 +754,7 @@ fn bindgen_test_layout__alpm_pgpkey_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_pgpkey_t>())).email as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).email) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -772,7 +764,7 @@ fn bindgen_test_layout__alpm_pgpkey_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_pgpkey_t>())).created as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).created) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", @@ -782,7 +774,7 @@ fn bindgen_test_layout__alpm_pgpkey_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_pgpkey_t>())).expires as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).expires) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", @@ -792,7 +784,7 @@ fn bindgen_test_layout__alpm_pgpkey_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_pgpkey_t>())).length as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", @@ -802,7 +794,7 @@ fn bindgen_test_layout__alpm_pgpkey_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_pgpkey_t>())).revoked as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).revoked) as usize - ptr as usize }, 60usize, concat!( "Offset of field: ", @@ -812,7 +804,7 @@ fn bindgen_test_layout__alpm_pgpkey_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_pgpkey_t>())).pubkey_algo as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pubkey_algo) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", @@ -824,10 +816,9 @@ fn bindgen_test_layout__alpm_pgpkey_t() { } #[doc = " A PGP key"] pub type alpm_pgpkey_t = _alpm_pgpkey_t; -#[doc = " Signature result. Contains the key, status, and validity of a given"] -#[doc = " signature."] +#[doc = " Signature result. Contains the key, status, and validity of a given\n signature."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_sigresult_t { #[doc = " The key of the signature"] pub key: alpm_pgpkey_t, @@ -838,6 +829,8 @@ pub struct _alpm_sigresult_t { } #[test] fn bindgen_test_layout__alpm_sigresult_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_sigresult_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_sigresult_t>(), 80usize, @@ -849,7 +842,7 @@ fn bindgen_test_layout__alpm_sigresult_t() { concat!("Alignment of ", stringify!(_alpm_sigresult_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_sigresult_t>())).key as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -859,7 +852,7 @@ fn bindgen_test_layout__alpm_sigresult_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_sigresult_t>())).status as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", @@ -869,7 +862,7 @@ fn bindgen_test_layout__alpm_sigresult_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_sigresult_t>())).validity as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).validity) as usize - ptr as usize }, 76usize, concat!( "Offset of field: ", @@ -879,13 +872,11 @@ fn bindgen_test_layout__alpm_sigresult_t() { ) ); } -#[doc = " Signature result. Contains the key, status, and validity of a given"] -#[doc = " signature."] +#[doc = " Signature result. Contains the key, status, and validity of a given\n signature."] pub type alpm_sigresult_t = _alpm_sigresult_t; -#[doc = " Signature list. Contains the number of signatures found and a pointer to an"] -#[doc = " array of results. The array is of size count."] +#[doc = " Signature list. Contains the number of signatures found and a pointer to an\n array of results. The array is of size count."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_siglist_t { #[doc = " The amount of results in the array"] pub count: usize, @@ -894,6 +885,8 @@ pub struct _alpm_siglist_t { } #[test] fn bindgen_test_layout__alpm_siglist_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_siglist_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_siglist_t>(), 16usize, @@ -905,7 +898,7 @@ fn bindgen_test_layout__alpm_siglist_t() { concat!("Alignment of ", stringify!(_alpm_siglist_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_siglist_t>())).count as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -915,7 +908,7 @@ fn bindgen_test_layout__alpm_siglist_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_siglist_t>())).results as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).results) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -925,43 +918,28 @@ fn bindgen_test_layout__alpm_siglist_t() { ) ); } -#[doc = " Signature list. Contains the number of signatures found and a pointer to an"] -#[doc = " array of results. The array is of size count."] +#[doc = " Signature list. Contains the number of signatures found and a pointer to an\n array of results. The array is of size count."] pub type alpm_siglist_t = _alpm_siglist_t; extern "C" { - #[doc = " Check the PGP signature for the given package file."] - #[doc = " @param pkg the package to check"] - #[doc = " @param siglist a pointer to storage for signature results"] - #[doc = " @return a int value : 0 (valid), 1 (invalid), -1 (an error occurred)"] + #[doc = " Check the PGP signature for the given package file.\n @param pkg the package to check\n @param siglist a pointer to storage for signature results\n @return a int value : 0 (valid), 1 (invalid), -1 (an error occurred)"] pub fn alpm_pkg_check_pgp_signature( pkg: *mut alpm_pkg_t, siglist: *mut alpm_siglist_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Check the PGP signature for the given database."] - #[doc = " @param db the database to check"] - #[doc = " @param siglist a pointer to storage for signature results"] - #[doc = " @return a int value : 0 (valid), 1 (invalid), -1 (an error occurred)"] + #[doc = " Check the PGP signature for the given database.\n @param db the database to check\n @param siglist a pointer to storage for signature results\n @return a int value : 0 (valid), 1 (invalid), -1 (an error occurred)"] pub fn alpm_db_check_pgp_signature( db: *mut alpm_db_t, siglist: *mut alpm_siglist_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Clean up and free a signature result list."] - #[doc = " Note that this does not free the siglist object itself in case that"] - #[doc = " was allocated on the stack; this is the responsibility of the caller."] - #[doc = " @param siglist a pointer to storage for signature results"] - #[doc = " @return 0 on success, -1 on error"] + #[doc = " Clean up and free a signature result list.\n Note that this does not free the siglist object itself in case that\n was allocated on the stack; this is the responsibility of the caller.\n @param siglist a pointer to storage for signature results\n @return 0 on success, -1 on error"] pub fn alpm_siglist_cleanup(siglist: *mut alpm_siglist_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Decode a loaded signature in base64 form."] - #[doc = " @param base64_data the signature to attempt to decode"] - #[doc = " @param data the decoded data; must be freed by the caller"] - #[doc = " @param data_len the length of the returned data"] - #[doc = " @return 0 on success, -1 on failure to properly decode"] + #[doc = " Decode a loaded signature in base64 form.\n @param base64_data the signature to attempt to decode\n @param data the decoded data; must be freed by the caller\n @param data_len the length of the returned data\n @return 0 on success, -1 on failure to properly decode"] pub fn alpm_decode_signature( base64_data: *const ::std::os::raw::c_char, data: *mut *mut ::std::os::raw::c_uchar, @@ -969,14 +947,7 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Extract the Issuer Key ID from a signature"] - #[doc = " @param handle the context handle"] - #[doc = " @param identifier the identifier of the key."] - #[doc = " This may be the name of the package or the path to the package."] - #[doc = " @param sig PGP signature"] - #[doc = " @param len length of signature"] - #[doc = " @param keys a pointer to storage for key IDs"] - #[doc = " @return 0 on success, -1 on error"] + #[doc = " Extract the Issuer Key ID from a signature\n @param handle the context handle\n @param identifier the identifier of the key.\n This may be the name of the package or the path to the package.\n @param sig PGP signature\n @param len length of signature\n @param keys a pointer to storage for key IDs\n @return 0 on success, -1 on error"] pub fn alpm_extract_keyid( handle: *mut alpm_handle_t, identifier: *const ::std::os::raw::c_char, @@ -987,7 +958,7 @@ extern "C" { } #[repr(u32)] #[doc = " Types of version constraints in dependency specs."] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum _alpm_depmod_t { #[doc = " No version constraint"] ALPM_DEP_MOD_ANY = 1, @@ -1005,26 +976,19 @@ pub enum _alpm_depmod_t { #[doc = " Types of version constraints in dependency specs."] pub use self::_alpm_depmod_t as alpm_depmod_t; #[repr(u32)] -#[doc = " File conflict type."] -#[doc = " Whether the conflict results from a file existing on the filesystem, or with"] -#[doc = " another target in the transaction."] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +#[doc = " File conflict type.\n Whether the conflict results from a file existing on the filesystem, or with\n another target in the transaction."] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum _alpm_fileconflicttype_t { #[doc = " The conflict results with a another target in the transaction"] ALPM_FILECONFLICT_TARGET = 1, #[doc = " The conflict results from a file existing on the filesystem"] ALPM_FILECONFLICT_FILESYSTEM = 2, } -#[doc = " File conflict type."] -#[doc = " Whether the conflict results from a file existing on the filesystem, or with"] -#[doc = " another target in the transaction."] +#[doc = " File conflict type.\n Whether the conflict results from a file existing on the filesystem, or with\n another target in the transaction."] pub use self::_alpm_fileconflicttype_t as alpm_fileconflicttype_t; -#[doc = " The basic dependency type."] -#[doc = ""] -#[doc = " This type is used throughout libalpm, not just for dependencies"] -#[doc = " but also conflicts and providers."] +#[doc = " The basic dependency type.\n\n This type is used throughout libalpm, not just for dependencies\n but also conflicts and providers."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_depend_t { #[doc = " Name of the provider to satisfy this dependency"] pub name: *mut ::std::os::raw::c_char, @@ -1039,6 +1003,8 @@ pub struct _alpm_depend_t { } #[test] fn bindgen_test_layout__alpm_depend_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_depend_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_depend_t>(), 40usize, @@ -1050,7 +1016,7 @@ fn bindgen_test_layout__alpm_depend_t() { concat!("Alignment of ", stringify!(_alpm_depend_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_depend_t>())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1060,7 +1026,7 @@ fn bindgen_test_layout__alpm_depend_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_depend_t>())).version as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1070,7 +1036,7 @@ fn bindgen_test_layout__alpm_depend_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_depend_t>())).desc as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).desc) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1080,7 +1046,7 @@ fn bindgen_test_layout__alpm_depend_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_depend_t>())).name_hash as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name_hash) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -1090,7 +1056,7 @@ fn bindgen_test_layout__alpm_depend_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_depend_t>())).mod_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).mod_) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -1100,25 +1066,23 @@ fn bindgen_test_layout__alpm_depend_t() { ) ); } -#[doc = " The basic dependency type."] -#[doc = ""] -#[doc = " This type is used throughout libalpm, not just for dependencies"] -#[doc = " but also conflicts and providers."] +#[doc = " The basic dependency type.\n\n This type is used throughout libalpm, not just for dependencies\n but also conflicts and providers."] pub type alpm_depend_t = _alpm_depend_t; #[doc = " Missing dependency."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_depmissing_t { #[doc = " Name of the package that has the dependency"] pub target: *mut ::std::os::raw::c_char, #[doc = " The dependency that was wanted"] pub depend: *mut alpm_depend_t, - #[doc = " If the depmissing was caused by a conflict, the name of the package"] - #[doc = " that would be installed, causing the satisfying package to be removed"] + #[doc = " If the depmissing was caused by a conflict, the name of the package\n that would be installed, causing the satisfying package to be removed"] pub causingpkg: *mut ::std::os::raw::c_char, } #[test] fn bindgen_test_layout__alpm_depmissing_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_depmissing_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_depmissing_t>(), 24usize, @@ -1130,7 +1094,7 @@ fn bindgen_test_layout__alpm_depmissing_t() { concat!("Alignment of ", stringify!(_alpm_depmissing_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_depmissing_t>())).target as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).target) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1140,7 +1104,7 @@ fn bindgen_test_layout__alpm_depmissing_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_depmissing_t>())).depend as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).depend) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1150,7 +1114,7 @@ fn bindgen_test_layout__alpm_depmissing_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_depmissing_t>())).causingpkg as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).causingpkg) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1164,26 +1128,22 @@ fn bindgen_test_layout__alpm_depmissing_t() { pub type alpm_depmissing_t = _alpm_depmissing_t; #[doc = " A conflict that has occurred between two packages."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_conflict_t { - #[doc = " Hash of the first package name"] - #[doc = " (used internally to speed up conflict checks)"] - pub package1_hash: ::std::os::raw::c_ulong, - #[doc = " Hash of the second package name"] - #[doc = " (used internally to speed up conflict checks)"] - pub package2_hash: ::std::os::raw::c_ulong, - #[doc = " Name of the first package"] - pub package1: *mut ::std::os::raw::c_char, - #[doc = " Name of the second package"] - pub package2: *mut ::std::os::raw::c_char, + #[doc = " The first package"] + pub package1: *mut alpm_pkg_t, + #[doc = " The second package"] + pub package2: *mut alpm_pkg_t, #[doc = " The conflict"] pub reason: *mut alpm_depend_t, } #[test] fn bindgen_test_layout__alpm_conflict_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_conflict_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_conflict_t>(), - 40usize, + 24usize, concat!("Size of: ", stringify!(_alpm_conflict_t)) ); assert_eq!( @@ -1192,28 +1152,8 @@ fn bindgen_test_layout__alpm_conflict_t() { concat!("Alignment of ", stringify!(_alpm_conflict_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_conflict_t>())).package1_hash as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).package1) as usize - ptr as usize }, 0usize, - concat!( - "Offset of field: ", - stringify!(_alpm_conflict_t), - "::", - stringify!(package1_hash) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_conflict_t>())).package2_hash as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_alpm_conflict_t), - "::", - stringify!(package2_hash) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_conflict_t>())).package1 as *const _ as usize }, - 16usize, concat!( "Offset of field: ", stringify!(_alpm_conflict_t), @@ -1222,8 +1162,8 @@ fn bindgen_test_layout__alpm_conflict_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_conflict_t>())).package2 as *const _ as usize }, - 24usize, + unsafe { ::std::ptr::addr_of!((*ptr).package2) as usize - ptr as usize }, + 8usize, concat!( "Offset of field: ", stringify!(_alpm_conflict_t), @@ -1232,8 +1172,8 @@ fn bindgen_test_layout__alpm_conflict_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_conflict_t>())).reason as *const _ as usize }, - 32usize, + unsafe { ::std::ptr::addr_of!((*ptr).reason) as usize - ptr as usize }, + 16usize, concat!( "Offset of field: ", stringify!(_alpm_conflict_t), @@ -1244,13 +1184,9 @@ fn bindgen_test_layout__alpm_conflict_t() { } #[doc = " A conflict that has occurred between two packages."] pub type alpm_conflict_t = _alpm_conflict_t; -#[doc = " File conflict."] -#[doc = ""] -#[doc = " A conflict that has happened due to a two packages containing the same file,"] -#[doc = " or a package contains a file that is already on the filesystem and not owned"] -#[doc = " by that package."] +#[doc = " File conflict.\n\n A conflict that has happened due to a two packages containing the same file,\n or a package contains a file that is already on the filesystem and not owned\n by that package."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_fileconflict_t { #[doc = " The name of the package that caused the conflict"] pub target: *mut ::std::os::raw::c_char, @@ -1263,6 +1199,8 @@ pub struct _alpm_fileconflict_t { } #[test] fn bindgen_test_layout__alpm_fileconflict_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_fileconflict_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_fileconflict_t>(), 32usize, @@ -1274,7 +1212,7 @@ fn bindgen_test_layout__alpm_fileconflict_t() { concat!("Alignment of ", stringify!(_alpm_fileconflict_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_fileconflict_t>())).target as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).target) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1284,7 +1222,7 @@ fn bindgen_test_layout__alpm_fileconflict_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_fileconflict_t>())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1294,7 +1232,7 @@ fn bindgen_test_layout__alpm_fileconflict_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_fileconflict_t>())).file as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).file) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1304,7 +1242,7 @@ fn bindgen_test_layout__alpm_fileconflict_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_fileconflict_t>())).ctarget as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).ctarget) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -1314,21 +1252,10 @@ fn bindgen_test_layout__alpm_fileconflict_t() { ) ); } -#[doc = " File conflict."] -#[doc = ""] -#[doc = " A conflict that has happened due to a two packages containing the same file,"] -#[doc = " or a package contains a file that is already on the filesystem and not owned"] -#[doc = " by that package."] +#[doc = " File conflict.\n\n A conflict that has happened due to a two packages containing the same file,\n or a package contains a file that is already on the filesystem and not owned\n by that package."] pub type alpm_fileconflict_t = _alpm_fileconflict_t; extern "C" { - #[doc = " Checks dependencies and returns missing ones in a list."] - #[doc = " Dependencies can include versions with depmod operators."] - #[doc = " @param handle the context handle"] - #[doc = " @param pkglist the list of local packages"] - #[doc = " @param remove an alpm_list_t* of packages to be removed"] - #[doc = " @param upgrade an alpm_list_t* of packages to be upgraded (remove-then-upgrade)"] - #[doc = " @param reversedeps handles the backward dependencies"] - #[doc = " @return an alpm_list_t* of alpm_depmissing_t pointers."] + #[doc = " Checks dependencies and returns missing ones in a list.\n Dependencies can include versions with depmod operators.\n @param handle the context handle\n @param pkglist the list of local packages\n @param remove an alpm_list_t* of packages to be removed\n @param upgrade an alpm_list_t* of packages to be upgraded (remove-then-upgrade)\n @param reversedeps handles the backward dependencies\n @return an alpm_list_t* of alpm_depmissing_t pointers."] pub fn alpm_checkdeps( handle: *mut alpm_handle_t, pkglist: *mut alpm_list_t, @@ -1338,28 +1265,14 @@ extern "C" { ) -> *mut alpm_list_t; } extern "C" { - #[doc = " Find a package satisfying a specified dependency."] - #[doc = " The dependency can include versions with depmod operators."] - #[doc = " @param pkgs an alpm_list_t* of alpm_pkg_t where the satisfyer will be searched"] - #[doc = " @param depstring package or provision name, versioned or not"] - #[doc = " @return a alpm_pkg_t* satisfying depstring"] + #[doc = " Find a package satisfying a specified dependency.\n The dependency can include versions with depmod operators.\n @param pkgs an alpm_list_t* of alpm_pkg_t where the satisfyer will be searched\n @param depstring package or provision name, versioned or not\n @return a alpm_pkg_t* satisfying depstring"] pub fn alpm_find_satisfier( pkgs: *mut alpm_list_t, depstring: *const ::std::os::raw::c_char, ) -> *mut alpm_pkg_t; } extern "C" { - #[doc = " Find a package satisfying a specified dependency."] - #[doc = " First look for a literal, going through each db one by one. Then look for"] - #[doc = " providers. The first satisfyer that belongs to an installed package is"] - #[doc = " returned. If no providers belong to an installed package then an"] - #[doc = " alpm_question_select_provider_t is created to select the provider."] - #[doc = " The dependency can include versions with depmod operators."] - #[doc = ""] - #[doc = " @param handle the context handle"] - #[doc = " @param dbs an alpm_list_t* of alpm_db_t where the satisfyer will be searched"] - #[doc = " @param depstring package or provision name, versioned or not"] - #[doc = " @return a alpm_pkg_t* satisfying depstring"] + #[doc = " Find a package satisfying a specified dependency.\n First look for a literal, going through each db one by one. Then look for\n providers. The first satisfyer that belongs to an installed package is\n returned. If no providers belong to an installed package then an\n alpm_question_select_provider_t is created to select the provider.\n The dependency can include versions with depmod operators.\n\n @param handle the context handle\n @param dbs an alpm_list_t* of alpm_db_t where the satisfyer will be searched\n @param depstring package or provision name, versioned or not\n @return a alpm_pkg_t* satisfying depstring"] pub fn alpm_find_dbs_satisfier( handle: *mut alpm_handle_t, dbs: *mut alpm_list_t, @@ -1367,53 +1280,39 @@ extern "C" { ) -> *mut alpm_pkg_t; } extern "C" { - #[doc = " Check the package conflicts in a database"] - #[doc = ""] - #[doc = " @param handle the context handle"] - #[doc = " @param pkglist the list of packages to check"] - #[doc = ""] - #[doc = " @return an alpm_list_t of alpm_conflict_t"] + #[doc = " Check the package conflicts in a database\n\n @param handle the context handle\n @param pkglist the list of packages to check\n\n @return an alpm_list_t of alpm_conflict_t"] pub fn alpm_checkconflicts( handle: *mut alpm_handle_t, pkglist: *mut alpm_list_t, ) -> *mut alpm_list_t; } extern "C" { - #[doc = " Returns a newly allocated string representing the dependency information."] - #[doc = " @param dep a dependency info structure"] - #[doc = " @return a formatted string, e.g. \"glibc>=2.12\""] + #[doc = " Returns a newly allocated string representing the dependency information.\n @param dep a dependency info structure\n @return a formatted string, e.g. \"glibc>=2.12\""] pub fn alpm_dep_compute_string(dep: *const alpm_depend_t) -> *mut ::std::os::raw::c_char; } extern "C" { - #[doc = " Return a newly allocated dependency information parsed from a string"] - #[doc = "\\link alpm_dep_free should be used to free the dependency \\endlink"] - #[doc = " @param depstring a formatted string, e.g. \"glibc=2.12\""] - #[doc = " @return a dependency info structure"] + #[doc = " Return a newly allocated dependency information parsed from a string\n\\link alpm_dep_free should be used to free the dependency \\endlink\n @param depstring a formatted string, e.g. \"glibc=2.12\"\n @return a dependency info structure"] pub fn alpm_dep_from_string(depstring: *const ::std::os::raw::c_char) -> *mut alpm_depend_t; } extern "C" { - #[doc = " Free a dependency info structure"] - #[doc = " @param dep struct to free"] + #[doc = " Free a dependency info structure\n @param dep struct to free"] pub fn alpm_dep_free(dep: *mut alpm_depend_t); } extern "C" { - #[doc = " Free a fileconflict and its members."] - #[doc = " @param conflict the fileconflict to free"] + #[doc = " Free a fileconflict and its members.\n @param conflict the fileconflict to free"] pub fn alpm_fileconflict_free(conflict: *mut alpm_fileconflict_t); } extern "C" { - #[doc = " Free a depmissing and its members"] - #[doc = " @param miss the depmissing to free"] + #[doc = " Free a depmissing and its members\n @param miss the depmissing to free"] pub fn alpm_depmissing_free(miss: *mut alpm_depmissing_t); } extern "C" { - #[doc = " Free a conflict and its members."] - #[doc = " @param conflict the conflict to free"] + #[doc = " Free a conflict and its members.\n @param conflict the conflict to free"] pub fn alpm_conflict_free(conflict: *mut alpm_conflict_t); } #[repr(u32)] #[doc = " Type of events."] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum _alpm_event_type_t { #[doc = " Dependencies will be computed for a package."] ALPM_EVENT_CHECKDEPS_START = 1, @@ -1435,11 +1334,9 @@ pub enum _alpm_event_type_t { ALPM_EVENT_TRANSACTION_START = 9, #[doc = " Processing the package transaction is finished."] ALPM_EVENT_TRANSACTION_DONE = 10, - #[doc = " Package will be installed/upgraded/downgraded/re-installed/removed; See"] - #[doc = " alpm_event_package_operation_t for arguments."] + #[doc = " Package will be installed/upgraded/downgraded/re-installed/removed; See\n alpm_event_package_operation_t for arguments."] ALPM_EVENT_PACKAGE_OPERATION_START = 11, - #[doc = " Package was installed/upgraded/downgraded/re-installed/removed; See"] - #[doc = " alpm_event_package_operation_t for arguments."] + #[doc = " Package was installed/upgraded/downgraded/re-installed/removed; See\n alpm_event_package_operation_t for arguments."] ALPM_EVENT_PACKAGE_OPERATION_DONE = 12, #[doc = " Target package's integrity will be checked."] ALPM_EVENT_INTEGRITY_START = 13, @@ -1449,8 +1346,7 @@ pub enum _alpm_event_type_t { ALPM_EVENT_LOAD_START = 15, #[doc = " Target package is finished loading."] ALPM_EVENT_LOAD_DONE = 16, - #[doc = " Scriptlet has printed information; See alpm_event_scriptlet_info_t for"] - #[doc = " arguments."] + #[doc = " Scriptlet has printed information; See alpm_event_scriptlet_info_t for\n arguments."] ALPM_EVENT_SCRIPTLET_INFO = 17, #[doc = " Database files will be downloaded from a repository."] ALPM_EVENT_DB_RETRIEVE_START = 18, @@ -1468,11 +1364,9 @@ pub enum _alpm_event_type_t { ALPM_EVENT_DISKSPACE_START = 24, #[doc = " Disk space usage was computed for a package."] ALPM_EVENT_DISKSPACE_DONE = 25, - #[doc = " An optdepend for another package is being removed; See"] - #[doc = " alpm_event_optdep_removal_t for arguments."] + #[doc = " An optdepend for another package is being removed; See\n alpm_event_optdep_removal_t for arguments."] ALPM_EVENT_OPTDEP_REMOVAL = 26, - #[doc = " A configured repository database is missing; See"] - #[doc = " alpm_event_database_missing_t for arguments."] + #[doc = " A configured repository database is missing; See\n alpm_event_database_missing_t for arguments."] ALPM_EVENT_DATABASE_MISSING = 27, #[doc = " Checking keys used to create signatures are in keyring."] ALPM_EVENT_KEYRING_START = 28, @@ -1484,8 +1378,7 @@ pub enum _alpm_event_type_t { ALPM_EVENT_KEY_DOWNLOAD_DONE = 31, #[doc = " A .pacnew file was created; See alpm_event_pacnew_created_t for arguments."] ALPM_EVENT_PACNEW_CREATED = 32, - #[doc = " A .pacsave file was created; See alpm_event_pacsave_created_t for"] - #[doc = " arguments."] + #[doc = " A .pacsave file was created; See alpm_event_pacsave_created_t for\n arguments."] ALPM_EVENT_PACSAVE_CREATED = 33, #[doc = " Processing hooks will be started."] ALPM_EVENT_HOOK_START = 34, @@ -1500,13 +1393,15 @@ pub enum _alpm_event_type_t { pub use self::_alpm_event_type_t as alpm_event_type_t; #[doc = " An event that may represent any event."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_event_any_t { #[doc = " Type of event"] pub type_: alpm_event_type_t, } #[test] fn bindgen_test_layout__alpm_event_any_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_event_any_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_event_any_t>(), 4usize, @@ -1518,7 +1413,7 @@ fn bindgen_test_layout__alpm_event_any_t() { concat!("Alignment of ", stringify!(_alpm_event_any_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_any_t>())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1532,7 +1427,7 @@ fn bindgen_test_layout__alpm_event_any_t() { pub type alpm_event_any_t = _alpm_event_any_t; #[repr(u32)] #[doc = " An enum over the kind of package operations."] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum _alpm_package_operation_t { #[doc = " Package (to be) installed. (No oldpkg)"] ALPM_PACKAGE_INSTALL = 1, @@ -1549,7 +1444,7 @@ pub enum _alpm_package_operation_t { pub use self::_alpm_package_operation_t as alpm_package_operation_t; #[doc = " A package operation event occurred."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_event_package_operation_t { #[doc = " Type of event"] pub type_: alpm_event_type_t, @@ -1562,6 +1457,9 @@ pub struct _alpm_event_package_operation_t { } #[test] fn bindgen_test_layout__alpm_event_package_operation_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_event_package_operation_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_event_package_operation_t>(), 24usize, @@ -1573,9 +1471,7 @@ fn bindgen_test_layout__alpm_event_package_operation_t() { concat!("Alignment of ", stringify!(_alpm_event_package_operation_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_package_operation_t>())).type_ as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1585,10 +1481,7 @@ fn bindgen_test_layout__alpm_event_package_operation_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_package_operation_t>())).operation as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).operation) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -1598,9 +1491,7 @@ fn bindgen_test_layout__alpm_event_package_operation_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_package_operation_t>())).oldpkg as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).oldpkg) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1610,9 +1501,7 @@ fn bindgen_test_layout__alpm_event_package_operation_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_package_operation_t>())).newpkg as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).newpkg) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1626,7 +1515,7 @@ fn bindgen_test_layout__alpm_event_package_operation_t() { pub type alpm_event_package_operation_t = _alpm_event_package_operation_t; #[doc = " An optional dependency was removed."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_event_optdep_removal_t { #[doc = " Type of event"] pub type_: alpm_event_type_t, @@ -1637,6 +1526,9 @@ pub struct _alpm_event_optdep_removal_t { } #[test] fn bindgen_test_layout__alpm_event_optdep_removal_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_event_optdep_removal_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_event_optdep_removal_t>(), 24usize, @@ -1648,9 +1540,7 @@ fn bindgen_test_layout__alpm_event_optdep_removal_t() { concat!("Alignment of ", stringify!(_alpm_event_optdep_removal_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_optdep_removal_t>())).type_ as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1660,9 +1550,7 @@ fn bindgen_test_layout__alpm_event_optdep_removal_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_optdep_removal_t>())).pkg as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pkg) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1672,9 +1560,7 @@ fn bindgen_test_layout__alpm_event_optdep_removal_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_optdep_removal_t>())).optdep as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).optdep) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1688,7 +1574,7 @@ fn bindgen_test_layout__alpm_event_optdep_removal_t() { pub type alpm_event_optdep_removal_t = _alpm_event_optdep_removal_t; #[doc = " A scriptlet was ran."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_event_scriptlet_info_t { #[doc = " Type of event"] pub type_: alpm_event_type_t, @@ -1697,6 +1583,9 @@ pub struct _alpm_event_scriptlet_info_t { } #[test] fn bindgen_test_layout__alpm_event_scriptlet_info_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_event_scriptlet_info_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_event_scriptlet_info_t>(), 16usize, @@ -1708,9 +1597,7 @@ fn bindgen_test_layout__alpm_event_scriptlet_info_t() { concat!("Alignment of ", stringify!(_alpm_event_scriptlet_info_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_scriptlet_info_t>())).type_ as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1720,9 +1607,7 @@ fn bindgen_test_layout__alpm_event_scriptlet_info_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_scriptlet_info_t>())).line as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1734,11 +1619,9 @@ fn bindgen_test_layout__alpm_event_scriptlet_info_t() { } #[doc = " A scriptlet was ran."] pub type alpm_event_scriptlet_info_t = _alpm_event_scriptlet_info_t; -#[doc = " A database is missing."] -#[doc = ""] -#[doc = " The database is registered but has not been downloaded"] +#[doc = " A database is missing.\n\n The database is registered but has not been downloaded"] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_event_database_missing_t { #[doc = " Type of event"] pub type_: alpm_event_type_t, @@ -1747,6 +1630,9 @@ pub struct _alpm_event_database_missing_t { } #[test] fn bindgen_test_layout__alpm_event_database_missing_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_event_database_missing_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_event_database_missing_t>(), 16usize, @@ -1758,9 +1644,7 @@ fn bindgen_test_layout__alpm_event_database_missing_t() { concat!("Alignment of ", stringify!(_alpm_event_database_missing_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_database_missing_t>())).type_ as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1770,9 +1654,7 @@ fn bindgen_test_layout__alpm_event_database_missing_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_database_missing_t>())).dbname as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).dbname) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1782,13 +1664,11 @@ fn bindgen_test_layout__alpm_event_database_missing_t() { ) ); } -#[doc = " A database is missing."] -#[doc = ""] -#[doc = " The database is registered but has not been downloaded"] +#[doc = " A database is missing.\n\n The database is registered but has not been downloaded"] pub type alpm_event_database_missing_t = _alpm_event_database_missing_t; #[doc = " A package was downloaded."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_event_pkgdownload_t { #[doc = " Type of event"] pub type_: alpm_event_type_t, @@ -1797,6 +1677,9 @@ pub struct _alpm_event_pkgdownload_t { } #[test] fn bindgen_test_layout__alpm_event_pkgdownload_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_event_pkgdownload_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_event_pkgdownload_t>(), 16usize, @@ -1808,7 +1691,7 @@ fn bindgen_test_layout__alpm_event_pkgdownload_t() { concat!("Alignment of ", stringify!(_alpm_event_pkgdownload_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_pkgdownload_t>())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1818,7 +1701,7 @@ fn bindgen_test_layout__alpm_event_pkgdownload_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_pkgdownload_t>())).file as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).file) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1832,7 +1715,7 @@ fn bindgen_test_layout__alpm_event_pkgdownload_t() { pub type alpm_event_pkgdownload_t = _alpm_event_pkgdownload_t; #[doc = " A pacnew file was created."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_event_pacnew_created_t { #[doc = " Type of event"] pub type_: alpm_event_type_t, @@ -1847,6 +1730,9 @@ pub struct _alpm_event_pacnew_created_t { } #[test] fn bindgen_test_layout__alpm_event_pacnew_created_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_event_pacnew_created_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_event_pacnew_created_t>(), 32usize, @@ -1858,9 +1744,7 @@ fn bindgen_test_layout__alpm_event_pacnew_created_t() { concat!("Alignment of ", stringify!(_alpm_event_pacnew_created_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_pacnew_created_t>())).type_ as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1870,10 +1754,7 @@ fn bindgen_test_layout__alpm_event_pacnew_created_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_pacnew_created_t>())).from_noupgrade as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).from_noupgrade) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -1883,9 +1764,7 @@ fn bindgen_test_layout__alpm_event_pacnew_created_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_pacnew_created_t>())).oldpkg as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).oldpkg) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1895,9 +1774,7 @@ fn bindgen_test_layout__alpm_event_pacnew_created_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_pacnew_created_t>())).newpkg as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).newpkg) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1907,9 +1784,7 @@ fn bindgen_test_layout__alpm_event_pacnew_created_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_pacnew_created_t>())).file as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).file) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -1923,7 +1798,7 @@ fn bindgen_test_layout__alpm_event_pacnew_created_t() { pub type alpm_event_pacnew_created_t = _alpm_event_pacnew_created_t; #[doc = " A pacsave file was created."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_event_pacsave_created_t { #[doc = " Type of event"] pub type_: alpm_event_type_t, @@ -1934,6 +1809,9 @@ pub struct _alpm_event_pacsave_created_t { } #[test] fn bindgen_test_layout__alpm_event_pacsave_created_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_event_pacsave_created_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_event_pacsave_created_t>(), 24usize, @@ -1945,9 +1823,7 @@ fn bindgen_test_layout__alpm_event_pacsave_created_t() { concat!("Alignment of ", stringify!(_alpm_event_pacsave_created_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_pacsave_created_t>())).type_ as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -1957,9 +1833,7 @@ fn bindgen_test_layout__alpm_event_pacsave_created_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_pacsave_created_t>())).oldpkg as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).oldpkg) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -1969,9 +1843,7 @@ fn bindgen_test_layout__alpm_event_pacsave_created_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_pacsave_created_t>())).file as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).file) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -1985,7 +1857,7 @@ fn bindgen_test_layout__alpm_event_pacsave_created_t() { pub type alpm_event_pacsave_created_t = _alpm_event_pacsave_created_t; #[repr(u32)] #[doc = " Kind of hook."] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum _alpm_hook_when_t { ALPM_HOOK_PRE_TRANSACTION = 1, ALPM_HOOK_POST_TRANSACTION = 2, @@ -1994,7 +1866,7 @@ pub enum _alpm_hook_when_t { pub use self::_alpm_hook_when_t as alpm_hook_when_t; #[doc = " pre/post transaction hooks are to be ran."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_event_hook_t { #[doc = " Type of event"] pub type_: alpm_event_type_t, @@ -2003,6 +1875,8 @@ pub struct _alpm_event_hook_t { } #[test] fn bindgen_test_layout__alpm_event_hook_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_event_hook_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_event_hook_t>(), 8usize, @@ -2014,7 +1888,7 @@ fn bindgen_test_layout__alpm_event_hook_t() { concat!("Alignment of ", stringify!(_alpm_event_hook_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_hook_t>())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2024,7 +1898,7 @@ fn bindgen_test_layout__alpm_event_hook_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_hook_t>())).when as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).when) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2038,7 +1912,7 @@ fn bindgen_test_layout__alpm_event_hook_t() { pub type alpm_event_hook_t = _alpm_event_hook_t; #[doc = " A pre/post transaction hook was ran."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_event_hook_run_t { #[doc = " Type of event"] pub type_: alpm_event_type_t, @@ -2053,6 +1927,9 @@ pub struct _alpm_event_hook_run_t { } #[test] fn bindgen_test_layout__alpm_event_hook_run_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_event_hook_run_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_event_hook_run_t>(), 40usize, @@ -2064,7 +1941,7 @@ fn bindgen_test_layout__alpm_event_hook_run_t() { concat!("Alignment of ", stringify!(_alpm_event_hook_run_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_hook_run_t>())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2074,7 +1951,7 @@ fn bindgen_test_layout__alpm_event_hook_run_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_hook_run_t>())).name as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -2084,7 +1961,7 @@ fn bindgen_test_layout__alpm_event_hook_run_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_hook_run_t>())).desc as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).desc) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -2094,7 +1971,7 @@ fn bindgen_test_layout__alpm_event_hook_run_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_hook_run_t>())).position as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).position) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -2104,7 +1981,7 @@ fn bindgen_test_layout__alpm_event_hook_run_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_hook_run_t>())).total as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).total) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", @@ -2118,7 +1995,7 @@ fn bindgen_test_layout__alpm_event_hook_run_t() { pub type alpm_event_hook_run_t = _alpm_event_hook_run_t; #[doc = " Packages downloading about to start."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_event_pkg_retrieve_t { #[doc = " Type of event"] pub type_: alpm_event_type_t, @@ -2129,6 +2006,9 @@ pub struct _alpm_event_pkg_retrieve_t { } #[test] fn bindgen_test_layout__alpm_event_pkg_retrieve_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_event_pkg_retrieve_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_event_pkg_retrieve_t>(), 24usize, @@ -2140,9 +2020,7 @@ fn bindgen_test_layout__alpm_event_pkg_retrieve_t() { concat!("Alignment of ", stringify!(_alpm_event_pkg_retrieve_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_pkg_retrieve_t>())).type_ as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2152,7 +2030,7 @@ fn bindgen_test_layout__alpm_event_pkg_retrieve_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_pkg_retrieve_t>())).num as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).num) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -2162,9 +2040,7 @@ fn bindgen_test_layout__alpm_event_pkg_retrieve_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_event_pkg_retrieve_t>())).total_size as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).total_size) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -2176,11 +2052,7 @@ fn bindgen_test_layout__alpm_event_pkg_retrieve_t() { } #[doc = " Packages downloading about to start."] pub type alpm_event_pkg_retrieve_t = _alpm_event_pkg_retrieve_t; -#[doc = " Events."] -#[doc = " This is a union passed to the callback that allows the frontend to know"] -#[doc = " which type of event was triggered (via type). It is then possible to"] -#[doc = " typecast the pointer to the right structure, or use the union field, in order"] -#[doc = " to access event-specific data."] +#[doc = " Events.\n This is a union passed to the callback that allows the frontend to know\n which type of event was triggered (via type). It is then possible to\n typecast the pointer to the right structure, or use the union field, in order\n to access event-specific data."] #[repr(C)] #[derive(Copy, Clone)] pub union _alpm_event_t { @@ -2211,6 +2083,8 @@ pub union _alpm_event_t { } #[test] fn bindgen_test_layout__alpm_event_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_event_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_event_t>(), 40usize, @@ -2222,7 +2096,7 @@ fn bindgen_test_layout__alpm_event_t() { concat!("Alignment of ", stringify!(_alpm_event_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_t>())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2232,7 +2106,7 @@ fn bindgen_test_layout__alpm_event_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_t>())).any as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).any) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2242,7 +2116,7 @@ fn bindgen_test_layout__alpm_event_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_t>())).package_operation as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).package_operation) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2252,7 +2126,7 @@ fn bindgen_test_layout__alpm_event_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_t>())).optdep_removal as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).optdep_removal) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2262,7 +2136,7 @@ fn bindgen_test_layout__alpm_event_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_t>())).scriptlet_info as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).scriptlet_info) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2272,7 +2146,7 @@ fn bindgen_test_layout__alpm_event_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_t>())).database_missing as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).database_missing) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2282,7 +2156,7 @@ fn bindgen_test_layout__alpm_event_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_t>())).pkgdownload as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pkgdownload) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2292,7 +2166,7 @@ fn bindgen_test_layout__alpm_event_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_t>())).pacnew_created as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pacnew_created) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2302,7 +2176,7 @@ fn bindgen_test_layout__alpm_event_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_t>())).pacsave_created as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pacsave_created) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2312,7 +2186,7 @@ fn bindgen_test_layout__alpm_event_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_t>())).hook as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hook) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2322,7 +2196,7 @@ fn bindgen_test_layout__alpm_event_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_t>())).hook_run as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).hook_run) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2332,7 +2206,7 @@ fn bindgen_test_layout__alpm_event_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_event_t>())).pkg_retrieve as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).pkg_retrieve) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2342,25 +2216,14 @@ fn bindgen_test_layout__alpm_event_t() { ) ); } -#[doc = " Events."] -#[doc = " This is a union passed to the callback that allows the frontend to know"] -#[doc = " which type of event was triggered (via type). It is then possible to"] -#[doc = " typecast the pointer to the right structure, or use the union field, in order"] -#[doc = " to access event-specific data."] +#[doc = " Events.\n This is a union passed to the callback that allows the frontend to know\n which type of event was triggered (via type). It is then possible to\n typecast the pointer to the right structure, or use the union field, in order\n to access event-specific data."] pub type alpm_event_t = _alpm_event_t; -#[doc = " Event callback."] -#[doc = ""] -#[doc = " Called when an event occurs"] -#[doc = " @param ctx user-provided context"] -#[doc = " @param event the event that occurred"] +#[doc = " Event callback.\n\n Called when an event occurs\n @param ctx user-provided context\n @param event the event that occurred"] pub type alpm_cb_event = ::std::option::Option< - unsafe extern "C" fn(ctx: *mut ::std::os::raw::c_void, arg1: *mut alpm_event_t), + unsafe extern "C" fn(ctx: *mut ::std::os::raw::c_void, event: *mut alpm_event_t), >; pub mod _alpm_question_type_t { - #[doc = " Type of question."] - #[doc = " Unlike the events or progress enumerations, this enum has bitmask values"] - #[doc = " so a frontend can use a bitmask map to supply preselected answers to the"] - #[doc = " different types of questions."] + #[doc = " Type of question.\n Unlike the events or progress enumerations, this enum has bitmask values\n so a frontend can use a bitmask map to supply preselected answers to the\n different types of questions."] pub type Type = ::std::os::raw::c_uint; #[doc = " Should target in ignorepkg be installed anyway?"] pub const ALPM_QUESTION_INSTALL_IGNOREPKG: Type = 1; @@ -2377,14 +2240,11 @@ pub mod _alpm_question_type_t { #[doc = " Should a key be imported?"] pub const ALPM_QUESTION_IMPORT_KEY: Type = 64; } -#[doc = " Type of question."] -#[doc = " Unlike the events or progress enumerations, this enum has bitmask values"] -#[doc = " so a frontend can use a bitmask map to supply preselected answers to the"] -#[doc = " different types of questions."] +#[doc = " Type of question.\n Unlike the events or progress enumerations, this enum has bitmask values\n so a frontend can use a bitmask map to supply preselected answers to the\n different types of questions."] pub use self::_alpm_question_type_t::Type as alpm_question_type_t; #[doc = " A question that can represent any other question."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_question_any_t { #[doc = " Type of question"] pub type_: alpm_question_type_t, @@ -2393,6 +2253,8 @@ pub struct _alpm_question_any_t { } #[test] fn bindgen_test_layout__alpm_question_any_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_question_any_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_question_any_t>(), 8usize, @@ -2404,7 +2266,7 @@ fn bindgen_test_layout__alpm_question_any_t() { concat!("Alignment of ", stringify!(_alpm_question_any_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_question_any_t>())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2414,7 +2276,7 @@ fn bindgen_test_layout__alpm_question_any_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_question_any_t>())).answer as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).answer) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2428,7 +2290,7 @@ fn bindgen_test_layout__alpm_question_any_t() { pub type alpm_question_any_t = _alpm_question_any_t; #[doc = " Should target in ignorepkg be installed anyway?"] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_question_install_ignorepkg_t { #[doc = " Type of question"] pub type_: alpm_question_type_t, @@ -2439,6 +2301,9 @@ pub struct _alpm_question_install_ignorepkg_t { } #[test] fn bindgen_test_layout__alpm_question_install_ignorepkg_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_question_install_ignorepkg_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_question_install_ignorepkg_t>(), 16usize, @@ -2453,10 +2318,7 @@ fn bindgen_test_layout__alpm_question_install_ignorepkg_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_install_ignorepkg_t>())).type_ as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2466,10 +2328,7 @@ fn bindgen_test_layout__alpm_question_install_ignorepkg_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_install_ignorepkg_t>())).install as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).install) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2479,9 +2338,7 @@ fn bindgen_test_layout__alpm_question_install_ignorepkg_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_install_ignorepkg_t>())).pkg as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).pkg) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -2495,7 +2352,7 @@ fn bindgen_test_layout__alpm_question_install_ignorepkg_t() { pub type alpm_question_install_ignorepkg_t = _alpm_question_install_ignorepkg_t; #[doc = " Should a package be replaced?"] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_question_replace_t { #[doc = " Type of question"] pub type_: alpm_question_type_t, @@ -2510,6 +2367,9 @@ pub struct _alpm_question_replace_t { } #[test] fn bindgen_test_layout__alpm_question_replace_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_question_replace_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_question_replace_t>(), 32usize, @@ -2521,7 +2381,7 @@ fn bindgen_test_layout__alpm_question_replace_t() { concat!("Alignment of ", stringify!(_alpm_question_replace_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_question_replace_t>())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2531,9 +2391,7 @@ fn bindgen_test_layout__alpm_question_replace_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_replace_t>())).replace as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).replace) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2543,7 +2401,7 @@ fn bindgen_test_layout__alpm_question_replace_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_question_replace_t>())).oldpkg as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).oldpkg) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -2553,7 +2411,7 @@ fn bindgen_test_layout__alpm_question_replace_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_question_replace_t>())).newpkg as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).newpkg) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -2563,7 +2421,7 @@ fn bindgen_test_layout__alpm_question_replace_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_question_replace_t>())).newdb as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).newdb) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", @@ -2577,7 +2435,7 @@ fn bindgen_test_layout__alpm_question_replace_t() { pub type alpm_question_replace_t = _alpm_question_replace_t; #[doc = " Should a conflicting package be removed?"] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_question_conflict_t { #[doc = " Type of question"] pub type_: alpm_question_type_t, @@ -2588,6 +2446,9 @@ pub struct _alpm_question_conflict_t { } #[test] fn bindgen_test_layout__alpm_question_conflict_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_question_conflict_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_question_conflict_t>(), 16usize, @@ -2599,7 +2460,7 @@ fn bindgen_test_layout__alpm_question_conflict_t() { concat!("Alignment of ", stringify!(_alpm_question_conflict_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_question_conflict_t>())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2609,9 +2470,7 @@ fn bindgen_test_layout__alpm_question_conflict_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_conflict_t>())).remove as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).remove) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2621,9 +2480,7 @@ fn bindgen_test_layout__alpm_question_conflict_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_conflict_t>())).conflict as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).conflict) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -2637,7 +2494,7 @@ fn bindgen_test_layout__alpm_question_conflict_t() { pub type alpm_question_conflict_t = _alpm_question_conflict_t; #[doc = " Should a corrupted package be deleted?"] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_question_corrupted_t { #[doc = " Type of question"] pub type_: alpm_question_type_t, @@ -2650,6 +2507,9 @@ pub struct _alpm_question_corrupted_t { } #[test] fn bindgen_test_layout__alpm_question_corrupted_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_question_corrupted_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_question_corrupted_t>(), 24usize, @@ -2661,9 +2521,7 @@ fn bindgen_test_layout__alpm_question_corrupted_t() { concat!("Alignment of ", stringify!(_alpm_question_corrupted_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_corrupted_t>())).type_ as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2673,9 +2531,7 @@ fn bindgen_test_layout__alpm_question_corrupted_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_corrupted_t>())).remove as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).remove) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2685,9 +2541,7 @@ fn bindgen_test_layout__alpm_question_corrupted_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_corrupted_t>())).filepath as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).filepath) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -2697,9 +2551,7 @@ fn bindgen_test_layout__alpm_question_corrupted_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_corrupted_t>())).reason as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).reason) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -2713,7 +2565,7 @@ fn bindgen_test_layout__alpm_question_corrupted_t() { pub type alpm_question_corrupted_t = _alpm_question_corrupted_t; #[doc = " Should unresolvable targets be removed from the transaction?"] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_question_remove_pkgs_t { #[doc = " Type of question"] pub type_: alpm_question_type_t, @@ -2724,6 +2576,9 @@ pub struct _alpm_question_remove_pkgs_t { } #[test] fn bindgen_test_layout__alpm_question_remove_pkgs_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_question_remove_pkgs_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_question_remove_pkgs_t>(), 16usize, @@ -2735,9 +2590,7 @@ fn bindgen_test_layout__alpm_question_remove_pkgs_t() { concat!("Alignment of ", stringify!(_alpm_question_remove_pkgs_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_remove_pkgs_t>())).type_ as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2747,9 +2600,7 @@ fn bindgen_test_layout__alpm_question_remove_pkgs_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_remove_pkgs_t>())).skip as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).skip) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2759,9 +2610,7 @@ fn bindgen_test_layout__alpm_question_remove_pkgs_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_remove_pkgs_t>())).packages as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).packages) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -2775,7 +2624,7 @@ fn bindgen_test_layout__alpm_question_remove_pkgs_t() { pub type alpm_question_remove_pkgs_t = _alpm_question_remove_pkgs_t; #[doc = " Provider selection"] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_question_select_provider_t { #[doc = " Type of question"] pub type_: alpm_question_type_t, @@ -2788,6 +2637,9 @@ pub struct _alpm_question_select_provider_t { } #[test] fn bindgen_test_layout__alpm_question_select_provider_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_question_select_provider_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_question_select_provider_t>(), 24usize, @@ -2802,9 +2654,7 @@ fn bindgen_test_layout__alpm_question_select_provider_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_select_provider_t>())).type_ as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2814,10 +2664,7 @@ fn bindgen_test_layout__alpm_question_select_provider_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_select_provider_t>())).use_index as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).use_index) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2827,10 +2674,7 @@ fn bindgen_test_layout__alpm_question_select_provider_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_select_provider_t>())).providers as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).providers) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -2840,9 +2684,7 @@ fn bindgen_test_layout__alpm_question_select_provider_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_select_provider_t>())).depend as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).depend) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -2856,7 +2698,7 @@ fn bindgen_test_layout__alpm_question_select_provider_t() { pub type alpm_question_select_provider_t = _alpm_question_select_provider_t; #[doc = " Should a key be imported?"] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_question_import_key_t { #[doc = " Type of question"] pub type_: alpm_question_type_t, @@ -2869,6 +2711,9 @@ pub struct _alpm_question_import_key_t { } #[test] fn bindgen_test_layout__alpm_question_import_key_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_question_import_key_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_question_import_key_t>(), 24usize, @@ -2880,9 +2725,7 @@ fn bindgen_test_layout__alpm_question_import_key_t() { concat!("Alignment of ", stringify!(_alpm_question_import_key_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_import_key_t>())).type_ as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2892,9 +2735,7 @@ fn bindgen_test_layout__alpm_question_import_key_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_import_key_t>())).import as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).import) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -2904,7 +2745,7 @@ fn bindgen_test_layout__alpm_question_import_key_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_question_import_key_t>())).uid as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).uid) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -2914,9 +2755,7 @@ fn bindgen_test_layout__alpm_question_import_key_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_import_key_t>())).fingerprint as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).fingerprint) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", @@ -2928,18 +2767,13 @@ fn bindgen_test_layout__alpm_question_import_key_t() { } #[doc = " Should a key be imported?"] pub type alpm_question_import_key_t = _alpm_question_import_key_t; -#[doc = " Questions."] -#[doc = " This is an union passed to the callback that allows the frontend to know"] -#[doc = " which type of question was triggered (via type). It is then possible to"] -#[doc = " typecast the pointer to the right structure, or use the union field, in order"] -#[doc = " to access question-specific data."] +#[doc = " Questions.\n This is an union passed to the callback that allows the frontend to know\n which type of question was triggered (via type). It is then possible to\n typecast the pointer to the right structure, or use the union field, in order\n to access question-specific data."] #[repr(C)] #[derive(Copy, Clone)] pub union _alpm_question_t { #[doc = " The type of question. It's always safe to access this."] pub type_: alpm_question_type_t, - #[doc = " A question that can represent any question."] - #[doc = " It's always safe to access this."] + #[doc = " A question that can represent any question.\n It's always safe to access this."] pub any: alpm_question_any_t, #[doc = " Should target in ignorepkg be installed anyway?"] pub install_ignorepkg: alpm_question_install_ignorepkg_t, @@ -2958,6 +2792,8 @@ pub union _alpm_question_t { } #[test] fn bindgen_test_layout__alpm_question_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_question_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_question_t>(), 32usize, @@ -2969,7 +2805,7 @@ fn bindgen_test_layout__alpm_question_t() { concat!("Alignment of ", stringify!(_alpm_question_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_question_t>())).type_ as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2979,7 +2815,7 @@ fn bindgen_test_layout__alpm_question_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_question_t>())).any as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).any) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -2989,9 +2825,7 @@ fn bindgen_test_layout__alpm_question_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_t>())).install_ignorepkg as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).install_ignorepkg) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3001,7 +2835,7 @@ fn bindgen_test_layout__alpm_question_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_question_t>())).replace as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).replace) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3011,7 +2845,7 @@ fn bindgen_test_layout__alpm_question_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_question_t>())).conflict as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).conflict) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3021,7 +2855,7 @@ fn bindgen_test_layout__alpm_question_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_question_t>())).corrupted as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).corrupted) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3031,7 +2865,7 @@ fn bindgen_test_layout__alpm_question_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_question_t>())).remove_pkgs as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).remove_pkgs) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3041,9 +2875,7 @@ fn bindgen_test_layout__alpm_question_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_question_t>())).select_provider as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).select_provider) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3053,7 +2885,7 @@ fn bindgen_test_layout__alpm_question_t() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_alpm_question_t>())).import_key as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).import_key) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3063,23 +2895,15 @@ fn bindgen_test_layout__alpm_question_t() { ) ); } -#[doc = " Questions."] -#[doc = " This is an union passed to the callback that allows the frontend to know"] -#[doc = " which type of question was triggered (via type). It is then possible to"] -#[doc = " typecast the pointer to the right structure, or use the union field, in order"] -#[doc = " to access question-specific data."] +#[doc = " Questions.\n This is an union passed to the callback that allows the frontend to know\n which type of question was triggered (via type). It is then possible to\n typecast the pointer to the right structure, or use the union field, in order\n to access question-specific data."] pub type alpm_question_t = _alpm_question_t; -#[doc = " Question callback."] -#[doc = ""] -#[doc = " This callback allows user to give input and decide what to do during certain events"] -#[doc = " @param ctx user-provided context"] -#[doc = " @param question the question being asked."] +#[doc = " Question callback.\n\n This callback allows user to give input and decide what to do during certain events\n @param ctx user-provided context\n @param question the question being asked."] pub type alpm_cb_question = ::std::option::Option< - unsafe extern "C" fn(ctx: *mut ::std::os::raw::c_void, arg1: *mut alpm_question_t), + unsafe extern "C" fn(ctx: *mut ::std::os::raw::c_void, question: *mut alpm_question_t), >; #[repr(u32)] #[doc = " An enum over different kinds of progress alerts."] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum _alpm_progress_t { #[doc = " Package install"] ALPM_PROGRESS_ADD_START = 0, @@ -3104,17 +2928,7 @@ pub enum _alpm_progress_t { } #[doc = " An enum over different kinds of progress alerts."] pub use self::_alpm_progress_t as alpm_progress_t; -#[doc = " Progress callback"] -#[doc = ""] -#[doc = " Alert the front end about the progress of certain events."] -#[doc = " Allows the implementation of loading bars for events that"] -#[doc = " make take a while to complete."] -#[doc = " @param ctx user-provided context"] -#[doc = " @param progress the kind of event that is progressing"] -#[doc = " @param pkg for package operations, the name of the package being operated on"] -#[doc = " @param percent the percent completion of the action"] -#[doc = " @param howmany the total amount of items in the action"] -#[doc = " @param current the current amount of items completed"] +#[doc = " Progress callback\n\n Alert the front end about the progress of certain events.\n Allows the implementation of loading bars for events that\n make take a while to complete.\n @param ctx user-provided context\n @param progress the kind of event that is progressing\n @param pkg for package operations, the name of the package being operated on\n @param percent the percent completion of the action\n @param howmany the total amount of items in the action\n @param current the current amount of items completed\n/\n/** Progress callback"] pub type alpm_cb_progress = ::std::option::Option< unsafe extern "C" fn( ctx: *mut ::std::os::raw::c_void, @@ -3126,9 +2940,8 @@ pub type alpm_cb_progress = ::std::option::Option< ), >; #[repr(u32)] -#[doc = " File download events."] -#[doc = " These events are reported by ALPM via download callback."] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +#[doc = " File download events.\n These events are reported by ALPM via download callback."] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum _alpm_download_event_type_t { #[doc = " A download was started"] ALPM_DOWNLOAD_INIT = 0, @@ -3139,18 +2952,20 @@ pub enum _alpm_download_event_type_t { #[doc = " A download completed"] ALPM_DOWNLOAD_COMPLETED = 3, } -#[doc = " File download events."] -#[doc = " These events are reported by ALPM via download callback."] +#[doc = " File download events.\n These events are reported by ALPM via download callback."] pub use self::_alpm_download_event_type_t as alpm_download_event_type_t; #[doc = " Context struct for when a download starts."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_download_event_init_t { #[doc = " whether this file is optional and thus the errors could be ignored"] pub optional: ::std::os::raw::c_int, } #[test] fn bindgen_test_layout__alpm_download_event_init_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_download_event_init_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_download_event_init_t>(), 4usize, @@ -3162,9 +2977,7 @@ fn bindgen_test_layout__alpm_download_event_init_t() { concat!("Alignment of ", stringify!(_alpm_download_event_init_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_download_event_init_t>())).optional as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).optional) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3178,7 +2991,7 @@ fn bindgen_test_layout__alpm_download_event_init_t() { pub type alpm_download_event_init_t = _alpm_download_event_init_t; #[doc = " Context struct for when a download progresses."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_download_event_progress_t { #[doc = " Amount of data downloaded"] pub downloaded: off_t, @@ -3187,6 +3000,9 @@ pub struct _alpm_download_event_progress_t { } #[test] fn bindgen_test_layout__alpm_download_event_progress_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_download_event_progress_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_download_event_progress_t>(), 16usize, @@ -3198,10 +3014,7 @@ fn bindgen_test_layout__alpm_download_event_progress_t() { concat!("Alignment of ", stringify!(_alpm_download_event_progress_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_download_event_progress_t>())).downloaded as *const _ - as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).downloaded) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3211,9 +3024,7 @@ fn bindgen_test_layout__alpm_download_event_progress_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_download_event_progress_t>())).total as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).total) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -3227,13 +3038,16 @@ fn bindgen_test_layout__alpm_download_event_progress_t() { pub type alpm_download_event_progress_t = _alpm_download_event_progress_t; #[doc = " Context struct for when a download retries."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_download_event_retry_t { #[doc = " If the download will resume or start over"] pub resume: ::std::os::raw::c_int, } #[test] fn bindgen_test_layout__alpm_download_event_retry_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_download_event_retry_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_download_event_retry_t>(), 4usize, @@ -3245,9 +3059,7 @@ fn bindgen_test_layout__alpm_download_event_retry_t() { concat!("Alignment of ", stringify!(_alpm_download_event_retry_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_download_event_retry_t>())).resume as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).resume) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3261,18 +3073,18 @@ fn bindgen_test_layout__alpm_download_event_retry_t() { pub type alpm_download_event_retry_t = _alpm_download_event_retry_t; #[doc = " Context struct for when a download completes."] #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct _alpm_download_event_completed_t { #[doc = " Total bytes in file"] pub total: off_t, - #[doc = " download result code:"] - #[doc = " 0 - download completed successfully"] - #[doc = " 1 - the file is up-to-date"] - #[doc = " -1 - error"] + #[doc = " download result code:\n 0 - download completed successfully\n 1 - the file is up-to-date\n -1 - error"] pub result: ::std::os::raw::c_int, } #[test] fn bindgen_test_layout__alpm_download_event_completed_t() { + const UNINIT: ::std::mem::MaybeUninit<_alpm_download_event_completed_t> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_alpm_download_event_completed_t>(), 16usize, @@ -3287,9 +3099,7 @@ fn bindgen_test_layout__alpm_download_event_completed_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_download_event_completed_t>())).total as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).total) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -3299,9 +3109,7 @@ fn bindgen_test_layout__alpm_download_event_completed_t() { ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_alpm_download_event_completed_t>())).result as *const _ as usize - }, + unsafe { ::std::ptr::addr_of!((*ptr).result) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -3313,11 +3121,7 @@ fn bindgen_test_layout__alpm_download_event_completed_t() { } #[doc = " Context struct for when a download completes."] pub type alpm_download_event_completed_t = _alpm_download_event_completed_t; -#[doc = " Type of download progress callbacks."] -#[doc = " @param ctx user-provided context"] -#[doc = " @param filename the name of the file being downloaded"] -#[doc = " @param event the event type"] -#[doc = " @param data the event data of type alpm_download_event_*_t"] +#[doc = " Type of download progress callbacks.\n @param ctx user-provided context\n @param filename the name of the file being downloaded\n @param event the event type\n @param data the event data of type alpm_download_event_*_t"] pub type alpm_cb_download = ::std::option::Option< unsafe extern "C" fn( ctx: *mut ::std::os::raw::c_void, @@ -3326,13 +3130,7 @@ pub type alpm_cb_download = ::std::option::Option< data: *mut ::std::os::raw::c_void, ), >; -#[doc = " A callback for downloading files"] -#[doc = " @param ctx user-provided context"] -#[doc = " @param url the URL of the file to be downloaded"] -#[doc = " @param localpath the directory to which the file should be downloaded"] -#[doc = " @param force whether to force an update, even if the file is the same"] -#[doc = " @return 0 on success, 1 if the file exists and is identical, -1 on"] -#[doc = " error."] +#[doc = " A callback for downloading files\n @param ctx user-provided context\n @param url the URL of the file to be downloaded\n @param localpath the directory to which the file should be downloaded\n @param force whether to force an update, even if the file is the same\n @return 0 on success, 1 if the file exists and is identical, -1 on\n error."] pub type alpm_cb_fetch = ::std::option::Option< unsafe extern "C" fn( ctx: *mut ::std::os::raw::c_void, @@ -3342,31 +3140,15 @@ pub type alpm_cb_fetch = ::std::option::Option< ) -> ::std::os::raw::c_int, >; extern "C" { - #[doc = " Get the database of locally installed packages."] - #[doc = " The returned pointer points to an internal structure"] - #[doc = " of libalpm which should only be manipulated through"] - #[doc = " libalpm functions."] - #[doc = " @return a reference to the local database"] + #[doc = " Get the database of locally installed packages.\n The returned pointer points to an internal structure\n of libalpm which should only be manipulated through\n libalpm functions.\n @return a reference to the local database"] pub fn alpm_get_localdb(handle: *mut alpm_handle_t) -> *mut alpm_db_t; } extern "C" { - #[doc = " Get the list of sync databases."] - #[doc = " Returns a list of alpm_db_t structures, one for each registered"] - #[doc = " sync database."] - #[doc = ""] - #[doc = " @param handle the context handle"] - #[doc = " @return a reference to an internal list of alpm_db_t structures"] + #[doc = " Get the list of sync databases.\n Returns a list of alpm_db_t structures, one for each registered\n sync database.\n\n @param handle the context handle\n @return a reference to an internal list of alpm_db_t structures"] pub fn alpm_get_syncdbs(handle: *mut alpm_handle_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Register a sync database of packages."] - #[doc = " Databases can not be registered when there is an active transaction."] - #[doc = ""] - #[doc = " @param handle the context handle"] - #[doc = " @param treename the name of the sync repository"] - #[doc = " @param level what level of signature checking to perform on the"] - #[doc = " database; note that this must be a '.sig' file type verification"] - #[doc = " @return an alpm_db_t* on success (the value), NULL on error"] + #[doc = " Register a sync database of packages.\n Databases can not be registered when there is an active transaction.\n\n @param handle the context handle\n @param treename the name of the sync repository\n @param level what level of signature checking to perform on the\n database; note that this must be a '.sig' file type verification\n @return an alpm_db_t* on success (the value), NULL on error"] pub fn alpm_register_syncdb( handle: *mut alpm_handle_t, treename: *const ::std::os::raw::c_char, @@ -3374,108 +3156,56 @@ extern "C" { ) -> *mut alpm_db_t; } extern "C" { - #[doc = " Unregister all package databases."] - #[doc = " Databases can not be unregistered while there is an active transaction."] - #[doc = ""] - #[doc = " @param handle the context handle"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Unregister all package databases.\n Databases can not be unregistered while there is an active transaction.\n\n @param handle the context handle\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_unregister_all_syncdbs(handle: *mut alpm_handle_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Unregister a package database."] - #[doc = " Databases can not be unregistered when there is an active transaction."] - #[doc = ""] - #[doc = " @param db pointer to the package database to unregister"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Unregister a package database.\n Databases can not be unregistered when there is an active transaction.\n\n @param db pointer to the package database to unregister\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_db_unregister(db: *mut alpm_db_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Get the name of a package database."] - #[doc = " @param db pointer to the package database"] - #[doc = " @return the name of the package database, NULL on error"] + #[doc = " Get the handle of a package database.\n @param db pointer to the package database\n @return the alpm handle that the package database belongs to"] + pub fn alpm_db_get_handle(db: *mut alpm_db_t) -> *mut alpm_handle_t; +} +extern "C" { + #[doc = " Get the name of a package database.\n @param db pointer to the package database\n @return the name of the package database, NULL on error"] pub fn alpm_db_get_name(db: *const alpm_db_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Get the signature verification level for a database."] - #[doc = " Will return the default verification level if this database is set up"] - #[doc = " with ALPM_SIG_USE_DEFAULT."] - #[doc = " @param db pointer to the package database"] - #[doc = " @return the signature verification level"] + #[doc = " Get the signature verification level for a database.\n Will return the default verification level if this database is set up\n with ALPM_SIG_USE_DEFAULT.\n @param db pointer to the package database\n @return the signature verification level"] pub fn alpm_db_get_siglevel(db: *mut alpm_db_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Check the validity of a database."] - #[doc = " This is most useful for sync databases and verifying signature status."] - #[doc = " If invalid, the handle error code will be set accordingly."] - #[doc = " @param db pointer to the package database"] - #[doc = " @return 0 if valid, -1 if invalid (pm_errno is set accordingly)"] + #[doc = " Check the validity of a database.\n This is most useful for sync databases and verifying signature status.\n If invalid, the handle error code will be set accordingly.\n @param db pointer to the package database\n @return 0 if valid, -1 if invalid (pm_errno is set accordingly)"] pub fn alpm_db_get_valid(db: *mut alpm_db_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Get the list of servers assigned to this db."] - #[doc = " @param db pointer to the database to get the servers from"] - #[doc = " @return a char* list of servers"] + #[doc = " Get the list of servers assigned to this db.\n @param db pointer to the database to get the servers from\n @return a char* list of servers"] pub fn alpm_db_get_servers(db: *const alpm_db_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Sets the list of servers for the database to use."] - #[doc = " @param db the database to set the servers. The list will be duped and"] - #[doc = " the original will still need to be freed by the caller."] - #[doc = " @param servers a char* list of servers."] + #[doc = " Sets the list of servers for the database to use.\n @param db the database to set the servers. The list will be duped and\n the original will still need to be freed by the caller.\n @param servers a char* list of servers."] pub fn alpm_db_set_servers( db: *mut alpm_db_t, servers: *mut alpm_list_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Add a download server to a database."] - #[doc = " @param db database pointer"] - #[doc = " @param url url of the server"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Add a download server to a database.\n @param db database pointer\n @param url url of the server\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_db_add_server( db: *mut alpm_db_t, url: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Remove a download server from a database."] - #[doc = " @param db database pointer"] - #[doc = " @param url url of the server"] - #[doc = " @return 0 on success, 1 on server not present,"] - #[doc = " -1 on error (pm_errno is set accordingly)"] + #[doc = " Remove a download server from a database.\n @param db database pointer\n @param url url of the server\n @return 0 on success, 1 on server not present,\n -1 on error (pm_errno is set accordingly)"] pub fn alpm_db_remove_server( db: *mut alpm_db_t, url: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Update package databases."] - #[doc = ""] - #[doc = " An update of the package databases in the list \\a dbs will be attempted."] - #[doc = " Unless \\a force is true, the update will only be performed if the remote"] - #[doc = " databases were modified since the last update."] - #[doc = ""] - #[doc = " This operation requires a database lock, and will return an applicable error"] - #[doc = " if the lock could not be obtained."] - #[doc = ""] - #[doc = " Example:"] - #[doc = " @code"] - #[doc = " alpm_list_t *dbs = alpm_get_syncdbs(config->handle);"] - #[doc = " ret = alpm_db_update(config->handle, dbs, force);"] - #[doc = " if(ret < 0) {"] - #[doc = " pm_printf(ALPM_LOG_ERROR, _(\"failed to synchronize all databases (%s)\\n\"),"] - #[doc = " alpm_strerror(alpm_errno(config->handle)));"] - #[doc = " }"] - #[doc = " @endcode"] - #[doc = ""] - #[doc = " @note After a successful update, the \\link alpm_db_get_pkgcache()"] - #[doc = " package cache \\endlink will be invalidated"] - #[doc = " @param handle the context handle"] - #[doc = " @param dbs list of package databases to update"] - #[doc = " @param force if true, then forces the update, otherwise update only in case"] - #[doc = " the databases aren't up to date"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly),"] - #[doc = " 1 if all databases are up to to date"] + #[doc = " Update package databases.\n\n An update of the package databases in the list \\a dbs will be attempted.\n Unless \\a force is true, the update will only be performed if the remote\n databases were modified since the last update.\n\n This operation requires a database lock, and will return an applicable error\n if the lock could not be obtained.\n\n Example:\n @code\n alpm_list_t *dbs = alpm_get_syncdbs(config->handle);\n ret = alpm_db_update(config->handle, dbs, force);\n if(ret < 0) {\n pm_printf(ALPM_LOG_ERROR, _(\"failed to synchronize all databases (%s)\\n\"),\n alpm_strerror(alpm_errno(config->handle)));\n }\n @endcode\n\n @note After a successful update, the \\link alpm_db_get_pkgcache()\n package cache \\endlink will be invalidated\n @param handle the context handle\n @param dbs list of package databases to update\n @param force if true, then forces the update, otherwise update only in case\n the databases aren't up to date\n @return 0 on success, -1 on error (pm_errno is set accordingly),\n 1 if all databases are up to to date"] pub fn alpm_db_update( handle: *mut alpm_handle_t, dbs: *mut alpm_list_t, @@ -3483,49 +3213,29 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Get a package entry from a package database."] - #[doc = " Looking up a package is O(1) and will be significantly faster than"] - #[doc = " iterating over the pkgcahe."] - #[doc = " @param db pointer to the package database to get the package from"] - #[doc = " @param name of the package"] - #[doc = " @return the package entry on success, NULL on error"] + #[doc = " Get a package entry from a package database.\n Looking up a package is O(1) and will be significantly faster than\n iterating over the pkgcahe.\n @param db pointer to the package database to get the package from\n @param name of the package\n @return the package entry on success, NULL on error"] pub fn alpm_db_get_pkg( db: *mut alpm_db_t, name: *const ::std::os::raw::c_char, ) -> *mut alpm_pkg_t; } extern "C" { - #[doc = " Get the package cache of a package database."] - #[doc = " This is a list of all packages the db contains."] - #[doc = " @param db pointer to the package database to get the package from"] - #[doc = " @return the list of packages on success, NULL on error"] + #[doc = " Get the package cache of a package database.\n This is a list of all packages the db contains.\n @param db pointer to the package database to get the package from\n @return the list of packages on success, NULL on error"] pub fn alpm_db_get_pkgcache(db: *mut alpm_db_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Get a group entry from a package database."] - #[doc = " Looking up a group is O(1) and will be significantly faster than"] - #[doc = " iterating over the groupcahe."] - #[doc = " @param db pointer to the package database to get the group from"] - #[doc = " @param name of the group"] - #[doc = " @return the groups entry on success, NULL on error"] + #[doc = " Get a group entry from a package database.\n Looking up a group is O(1) and will be significantly faster than\n iterating over the groupcahe.\n @param db pointer to the package database to get the group from\n @param name of the group\n @return the groups entry on success, NULL on error"] pub fn alpm_db_get_group( db: *mut alpm_db_t, name: *const ::std::os::raw::c_char, ) -> *mut alpm_group_t; } extern "C" { - #[doc = " Get the group cache of a package database."] - #[doc = " @param db pointer to the package database to get the group from"] - #[doc = " @return the list of groups on success, NULL on error"] + #[doc = " Get the group cache of a package database.\n @param db pointer to the package database to get the group from\n @return the list of groups on success, NULL on error"] pub fn alpm_db_get_groupcache(db: *mut alpm_db_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Searches a database with regular expressions."] - #[doc = " @param db pointer to the package database to search in"] - #[doc = " @param needles a list of regular expressions to search for"] - #[doc = " @param ret pointer to list for storing packages matching all"] - #[doc = " regular expressions - must point to an empty (NULL) alpm_list_t *."] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Searches a database with regular expressions.\n @param db pointer to the package database to search in\n @param needles a list of regular expressions to search for\n @param ret pointer to list for storing packages matching all\n regular expressions - must point to an empty (NULL) alpm_list_t *.\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_db_search( db: *mut alpm_db_t, needles: *const alpm_list_t, @@ -3549,20 +3259,14 @@ pub mod _alpm_db_usage_t { #[doc = " The usage level of a database."] pub use self::_alpm_db_usage_t::Type as alpm_db_usage_t; extern "C" { - #[doc = " Sets the usage of a database."] - #[doc = " @param db pointer to the package database to set the status for"] - #[doc = " @param usage a bitmask of alpm_db_usage_t values"] - #[doc = " @return 0 on success, or -1 on error"] + #[doc = " Sets the usage of a database.\n @param db pointer to the package database to set the status for\n @param usage a bitmask of alpm_db_usage_t values\n @return 0 on success, or -1 on error"] pub fn alpm_db_set_usage( db: *mut alpm_db_t, usage: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Gets the usage of a database."] - #[doc = " @param db pointer to the package database to get the status of"] - #[doc = " @param usage pointer to an alpm_db_usage_t to store db's status"] - #[doc = " @return 0 on success, or -1 on error"] + #[doc = " Gets the usage of a database.\n @param db pointer to the package database to get the status of\n @param usage pointer to an alpm_db_usage_t to store db's status\n @return 0 on success, or -1 on error"] pub fn alpm_db_get_usage( db: *mut alpm_db_t, usage: *mut ::std::os::raw::c_int, @@ -3582,15 +3286,7 @@ pub mod _alpm_loglevel_t { } #[doc = " Logging Levels"] pub use self::_alpm_loglevel_t::Type as alpm_loglevel_t; -#[doc = " The callback type for logging."] -#[doc = ""] -#[doc = " libalpm will call this function whenever something is to be logged."] -#[doc = " many libalpm will produce log output. Additionally any calls to \\link alpm_logaction"] -#[doc = " \\endlink will also call this callback."] -#[doc = " @param ctx user-provided context"] -#[doc = " @param level the currently set loglevel"] -#[doc = " @param fmt the printf like format string"] -#[doc = " @param args printf like arguments"] +#[doc = " The callback type for logging.\n\n libalpm will call this function whenever something is to be logged.\n many libalpm will produce log output. Additionally any calls to \\link alpm_logaction\n \\endlink will also call this callback.\n @param ctx user-provided context\n @param level the currently set loglevel\n @param fmt the printf like format string\n @param args printf like arguments"] pub type alpm_cb_log = ::std::option::Option< unsafe extern "C" fn( ctx: *mut ::std::os::raw::c_void, @@ -3600,11 +3296,7 @@ pub type alpm_cb_log = ::std::option::Option< ), >; extern "C" { - #[doc = " A printf-like function for logging."] - #[doc = " @param handle the context handle"] - #[doc = " @param prefix caller-specific prefix for the log"] - #[doc = " @param fmt output format"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " A printf-like function for logging.\n @param handle the context handle\n @param prefix caller-specific prefix for the log\n @param fmt output format\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_logaction( handle: *mut alpm_handle_t, prefix: *const ::std::os::raw::c_char, @@ -3613,23 +3305,15 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Returns the callback used for logging."] - #[doc = " @param handle the context handle"] - #[doc = " @return the currently set log callback"] + #[doc = " Returns the callback used for logging.\n @param handle the context handle\n @return the currently set log callback"] pub fn alpm_option_get_logcb(handle: *mut alpm_handle_t) -> alpm_cb_log; } extern "C" { - #[doc = " Returns the callback used for logging."] - #[doc = " @param handle the context handle"] - #[doc = " @return the currently set log callback context"] + #[doc = " Returns the callback used for logging.\n @param handle the context handle\n @return the currently set log callback context"] pub fn alpm_option_get_logcb_ctx(handle: *mut alpm_handle_t) -> *mut ::std::os::raw::c_void; } extern "C" { - #[doc = " Sets the callback used for logging."] - #[doc = " @param handle the context handle"] - #[doc = " @param cb the cb to use"] - #[doc = " @param ctx user-provided context to pass to cb"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Sets the callback used for logging.\n @param handle the context handle\n @param cb the cb to use\n @param ctx user-provided context to pass to cb\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_logcb( handle: *mut alpm_handle_t, cb: alpm_cb_log, @@ -3637,23 +3321,15 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Returns the callback used to report download progress."] - #[doc = " @param handle the context handle"] - #[doc = " @return the currently set download callback"] + #[doc = " Returns the callback used to report download progress.\n @param handle the context handle\n @return the currently set download callback"] pub fn alpm_option_get_dlcb(handle: *mut alpm_handle_t) -> alpm_cb_download; } extern "C" { - #[doc = " Returns the callback used to report download progress."] - #[doc = " @param handle the context handle"] - #[doc = " @return the currently set download callback context"] + #[doc = " Returns the callback used to report download progress.\n @param handle the context handle\n @return the currently set download callback context"] pub fn alpm_option_get_dlcb_ctx(handle: *mut alpm_handle_t) -> *mut ::std::os::raw::c_void; } extern "C" { - #[doc = " Sets the callback used to report download progress."] - #[doc = " @param handle the context handle"] - #[doc = " @param cb the cb to use"] - #[doc = " @param ctx user-provided context to pass to cb"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Sets the callback used to report download progress.\n @param handle the context handle\n @param cb the cb to use\n @param ctx user-provided context to pass to cb\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_dlcb( handle: *mut alpm_handle_t, cb: alpm_cb_download, @@ -3661,23 +3337,15 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Returns the downloading callback."] - #[doc = " @param handle the context handle"] - #[doc = " @return the currently set fetch callback"] + #[doc = " Returns the downloading callback.\n @param handle the context handle\n @return the currently set fetch callback"] pub fn alpm_option_get_fetchcb(handle: *mut alpm_handle_t) -> alpm_cb_fetch; } extern "C" { - #[doc = " Returns the downloading callback."] - #[doc = " @param handle the context handle"] - #[doc = " @return the currently set fetch callback context"] + #[doc = " Returns the downloading callback.\n @param handle the context handle\n @return the currently set fetch callback context"] pub fn alpm_option_get_fetchcb_ctx(handle: *mut alpm_handle_t) -> *mut ::std::os::raw::c_void; } extern "C" { - #[doc = " Sets the downloading callback."] - #[doc = " @param handle the context handle"] - #[doc = " @param cb the cb to use"] - #[doc = " @param ctx user-provided context to pass to cb"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Sets the downloading callback.\n @param handle the context handle\n @param cb the cb to use\n @param ctx user-provided context to pass to cb\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_fetchcb( handle: *mut alpm_handle_t, cb: alpm_cb_fetch, @@ -3685,23 +3353,15 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Returns the callback used for events."] - #[doc = " @param handle the context handle"] - #[doc = " @return the currently set event callback"] + #[doc = " Returns the callback used for events.\n @param handle the context handle\n @return the currently set event callback"] pub fn alpm_option_get_eventcb(handle: *mut alpm_handle_t) -> alpm_cb_event; } extern "C" { - #[doc = " Returns the callback used for events."] - #[doc = " @param handle the context handle"] - #[doc = " @return the currently set event callback context"] + #[doc = " Returns the callback used for events.\n @param handle the context handle\n @return the currently set event callback context"] pub fn alpm_option_get_eventcb_ctx(handle: *mut alpm_handle_t) -> *mut ::std::os::raw::c_void; } extern "C" { - #[doc = " Sets the callback used for events."] - #[doc = " @param handle the context handle"] - #[doc = " @param cb the cb to use"] - #[doc = " @param ctx user-provided context to pass to cb"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Sets the callback used for events.\n @param handle the context handle\n @param cb the cb to use\n @param ctx user-provided context to pass to cb\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_eventcb( handle: *mut alpm_handle_t, cb: alpm_cb_event, @@ -3709,25 +3369,17 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Returns the callback used for questions."] - #[doc = " @param handle the context handle"] - #[doc = " @return the currently set question callback"] + #[doc = " Returns the callback used for questions.\n @param handle the context handle\n @return the currently set question callback"] pub fn alpm_option_get_questioncb(handle: *mut alpm_handle_t) -> alpm_cb_question; } extern "C" { - #[doc = " Returns the callback used for questions."] - #[doc = " @param handle the context handle"] - #[doc = " @return the currently set question callback context"] + #[doc = " Returns the callback used for questions.\n @param handle the context handle\n @return the currently set question callback context"] pub fn alpm_option_get_questioncb_ctx( handle: *mut alpm_handle_t, ) -> *mut ::std::os::raw::c_void; } extern "C" { - #[doc = " Sets the callback used for questions."] - #[doc = " @param handle the context handle"] - #[doc = " @param cb the cb to use"] - #[doc = " @param ctx user-provided context to pass to cb"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Sets the callback used for questions.\n @param handle the context handle\n @param cb the cb to use\n @param ctx user-provided context to pass to cb\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_questioncb( handle: *mut alpm_handle_t, cb: alpm_cb_question, @@ -3735,25 +3387,17 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = "Returns the callback used for operation progress."] - #[doc = " @param handle the context handle"] - #[doc = " @return the currently set progress callback"] + #[doc = "Returns the callback used for operation progress.\n @param handle the context handle\n @return the currently set progress callback"] pub fn alpm_option_get_progresscb(handle: *mut alpm_handle_t) -> alpm_cb_progress; } extern "C" { - #[doc = "Returns the callback used for operation progress."] - #[doc = " @param handle the context handle"] - #[doc = " @return the currently set progress callback context"] + #[doc = "Returns the callback used for operation progress.\n @param handle the context handle\n @return the currently set progress callback context"] pub fn alpm_option_get_progresscb_ctx( handle: *mut alpm_handle_t, ) -> *mut ::std::os::raw::c_void; } extern "C" { - #[doc = " Sets the callback used for operation progress."] - #[doc = " @param handle the context handle"] - #[doc = " @param cb the cb to use"] - #[doc = " @param ctx user-provided context to pass to cb"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Sets the callback used for operation progress.\n @param handle the context handle\n @param cb the cb to use\n @param ctx user-provided context to pass to cb\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_progresscb( handle: *mut alpm_handle_t, cb: alpm_cb_progress, @@ -3761,524 +3405,360 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Returns the root path. Read-only."] - #[doc = " @param handle the context handle"] + #[doc = " Returns the root path. Read-only.\n @param handle the context handle"] pub fn alpm_option_get_root(handle: *mut alpm_handle_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Returns the path to the database directory. Read-only."] - #[doc = " @param handle the context handle"] + #[doc = " Returns the path to the database directory. Read-only.\n @param handle the context handle"] pub fn alpm_option_get_dbpath(handle: *mut alpm_handle_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Get the name of the database lock file. Read-only."] - #[doc = " This is the name that the lockfile would have. It does not"] - #[doc = " matter if the lockfile actually exists on disk."] - #[doc = " @param handle the context handle"] + #[doc = " Get the name of the database lock file. Read-only.\n This is the name that the lockfile would have. It does not\n matter if the lockfile actually exists on disk.\n @param handle the context handle"] pub fn alpm_option_get_lockfile(handle: *mut alpm_handle_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Gets the currently configured cachedirs,"] - #[doc = " @param handle the context handle"] - #[doc = " @return a char* list of cache directories"] + #[doc = " Gets the currently configured cachedirs,\n @param handle the context handle\n @return a char* list of cache directories"] pub fn alpm_option_get_cachedirs(handle: *mut alpm_handle_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Sets the cachedirs."] - #[doc = " @param handle the context handle"] - #[doc = " @param cachedirs a char* list of cachdirs. The list will be duped and"] - #[doc = " the original will still need to be freed by the caller."] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Sets the cachedirs.\n @param handle the context handle\n @param cachedirs a char* list of cachdirs. The list will be duped and\n the original will still need to be freed by the caller.\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_cachedirs( handle: *mut alpm_handle_t, cachedirs: *mut alpm_list_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Append a cachedir to the configured cachedirs."] - #[doc = " @param handle the context handle"] - #[doc = " @param cachedir the cachedir to add"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Append a cachedir to the configured cachedirs.\n @param handle the context handle\n @param cachedir the cachedir to add\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_add_cachedir( handle: *mut alpm_handle_t, cachedir: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Remove a cachedir from the configured cachedirs."] - #[doc = " @param handle the context handle"] - #[doc = " @param cachedir the cachedir to remove"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Remove a cachedir from the configured cachedirs.\n @param handle the context handle\n @param cachedir the cachedir to remove\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_remove_cachedir( handle: *mut alpm_handle_t, cachedir: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Gets the currently configured hookdirs,"] - #[doc = " @param handle the context handle"] - #[doc = " @return a char* list of hook directories"] + #[doc = " Gets the currently configured hookdirs,\n @param handle the context handle\n @return a char* list of hook directories"] pub fn alpm_option_get_hookdirs(handle: *mut alpm_handle_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Sets the hookdirs."] - #[doc = " @param handle the context handle"] - #[doc = " @param hookdirs a char* list of hookdirs. The list will be duped and"] - #[doc = " the original will still need to be freed by the caller."] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Sets the hookdirs.\n @param handle the context handle\n @param hookdirs a char* list of hookdirs. The list will be duped and\n the original will still need to be freed by the caller.\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_hookdirs( handle: *mut alpm_handle_t, hookdirs: *mut alpm_list_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Append a hookdir to the configured hookdirs."] - #[doc = " @param handle the context handle"] - #[doc = " @param hookdir the hookdir to add"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Append a hookdir to the configured hookdirs.\n @param handle the context handle\n @param hookdir the hookdir to add\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_add_hookdir( handle: *mut alpm_handle_t, hookdir: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Remove a hookdir from the configured hookdirs."] - #[doc = " @param handle the context handle"] - #[doc = " @param hookdir the hookdir to remove"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Remove a hookdir from the configured hookdirs.\n @param handle the context handle\n @param hookdir the hookdir to remove\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_remove_hookdir( handle: *mut alpm_handle_t, hookdir: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Gets the currently configured overwritable files,"] - #[doc = " @param handle the context handle"] - #[doc = " @return a char* list of overwritable file globs"] + #[doc = " Gets the currently configured overwritable files,\n @param handle the context handle\n @return a char* list of overwritable file globs"] pub fn alpm_option_get_overwrite_files(handle: *mut alpm_handle_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Sets the overwritable files."] - #[doc = " @param handle the context handle"] - #[doc = " @param globs a char* list of overwritable file globs. The list will be duped and"] - #[doc = " the original will still need to be freed by the caller."] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Sets the overwritable files.\n @param handle the context handle\n @param globs a char* list of overwritable file globs. The list will be duped and\n the original will still need to be freed by the caller.\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_overwrite_files( handle: *mut alpm_handle_t, globs: *mut alpm_list_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Append an overwritable file to the configured overwritable files."] - #[doc = " @param handle the context handle"] - #[doc = " @param glob the file glob to add"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Append an overwritable file to the configured overwritable files.\n @param handle the context handle\n @param glob the file glob to add\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_add_overwrite_file( handle: *mut alpm_handle_t, glob: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Remove a file glob from the configured overwritable files globs."] - #[doc = " @note The overwritable file list contains a list of globs. The glob to"] - #[doc = " remove must exactly match the entry to remove. There is no glob expansion."] - #[doc = " @param handle the context handle"] - #[doc = " @param glob the file glob to remove"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Remove a file glob from the configured overwritable files globs.\n @note The overwritable file list contains a list of globs. The glob to\n remove must exactly match the entry to remove. There is no glob expansion.\n @param handle the context handle\n @param glob the file glob to remove\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_remove_overwrite_file( handle: *mut alpm_handle_t, glob: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Gets the filepath to the currently set logfile."] - #[doc = " @param handle the context handle"] - #[doc = " @return the path to the logfile"] + #[doc = " Gets the filepath to the currently set logfile.\n @param handle the context handle\n @return the path to the logfile"] pub fn alpm_option_get_logfile(handle: *mut alpm_handle_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Sets the logfile path."] - #[doc = " @param handle the context handle"] - #[doc = " @param logfile path to the new location of the logfile"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Sets the logfile path.\n @param handle the context handle\n @param logfile path to the new location of the logfile\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_logfile( handle: *mut alpm_handle_t, logfile: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Returns the path to libalpm's GnuPG home directory."] - #[doc = " @param handle the context handle"] - #[doc = " @return the path to libalpms's GnuPG home directory"] + #[doc = " Returns the path to libalpm's GnuPG home directory.\n @param handle the context handle\n @return the path to libalpms's GnuPG home directory"] pub fn alpm_option_get_gpgdir(handle: *mut alpm_handle_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Sets the path to libalpm's GnuPG home directory."] - #[doc = " @param handle the context handle"] - #[doc = " @param gpgdir the gpgdir to set"] + #[doc = " Sets the path to libalpm's GnuPG home directory.\n @param handle the context handle\n @param gpgdir the gpgdir to set"] pub fn alpm_option_set_gpgdir( handle: *mut alpm_handle_t, gpgdir: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Returns whether to use syslog (0 is FALSE, TRUE otherwise)."] - #[doc = " @param handle the context handle"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Returns whether to use syslog (0 is FALSE, TRUE otherwise).\n @param handle the context handle\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_get_usesyslog(handle: *mut alpm_handle_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Sets whether to use syslog (0 is FALSE, TRUE otherwise)."] - #[doc = " @param handle the context handle"] - #[doc = " @param usesyslog whether to use the syslog (0 is FALSE, TRUE otherwise)"] + #[doc = " Sets whether to use syslog (0 is FALSE, TRUE otherwise).\n @param handle the context handle\n @param usesyslog whether to use the syslog (0 is FALSE, TRUE otherwise)"] pub fn alpm_option_set_usesyslog( handle: *mut alpm_handle_t, usesyslog: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Get the list of no-upgrade files"] - #[doc = " @param handle the context handle"] - #[doc = " @return the char* list of no-upgrade files"] + #[doc = " Get the list of no-upgrade files\n @param handle the context handle\n @return the char* list of no-upgrade files"] pub fn alpm_option_get_noupgrades(handle: *mut alpm_handle_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Add a file to the no-upgrade list"] - #[doc = " @param handle the context handle"] - #[doc = " @param path the path to add"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Add a file to the no-upgrade list\n @param handle the context handle\n @param path the path to add\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_add_noupgrade( handle: *mut alpm_handle_t, path: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Sets the list of no-upgrade files"] - #[doc = " @param handle the context handle"] - #[doc = " @param noupgrade a char* list of file to not upgrade."] - #[doc = " The list will be duped and the original will still need to be freed by the caller."] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Sets the list of no-upgrade files\n @param handle the context handle\n @param noupgrade a char* list of file to not upgrade.\n The list will be duped and the original will still need to be freed by the caller.\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_noupgrades( handle: *mut alpm_handle_t, noupgrade: *mut alpm_list_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Remove an entry from the no-upgrade list"] - #[doc = " @param handle the context handle"] - #[doc = " @param path the path to remove"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Remove an entry from the no-upgrade list\n @param handle the context handle\n @param path the path to remove\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_remove_noupgrade( handle: *mut alpm_handle_t, path: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Test if a path matches any of the globs in the no-upgrade list"] - #[doc = " @param handle the context handle"] - #[doc = " @param path the path to test"] - #[doc = " @return 0 is the path matches a glob, negative if there is no match and"] - #[doc = " positive is the match was inverted"] + #[doc = " Test if a path matches any of the globs in the no-upgrade list\n @param handle the context handle\n @param path the path to test\n @return 0 is the path matches a glob, negative if there is no match and\n positive is the match was inverted"] pub fn alpm_option_match_noupgrade( handle: *mut alpm_handle_t, path: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Get the list of no-extract files"] - #[doc = " @param handle the context handle"] - #[doc = " @return the char* list of no-extract files"] + #[doc = " Get the list of no-extract files\n @param handle the context handle\n @return the char* list of no-extract files"] pub fn alpm_option_get_noextracts(handle: *mut alpm_handle_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Add a file to the no-extract list"] - #[doc = " @param handle the context handle"] - #[doc = " @param path the path to add"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Add a file to the no-extract list\n @param handle the context handle\n @param path the path to add\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_add_noextract( handle: *mut alpm_handle_t, path: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Sets the list of no-extract files"] - #[doc = " @param handle the context handle"] - #[doc = " @param noextract a char* list of file to not extract."] - #[doc = " The list will be duped and the original will still need to be freed by the caller."] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Sets the list of no-extract files\n @param handle the context handle\n @param noextract a char* list of file to not extract.\n The list will be duped and the original will still need to be freed by the caller.\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_noextracts( handle: *mut alpm_handle_t, noextract: *mut alpm_list_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Remove an entry from the no-extract list"] - #[doc = " @param handle the context handle"] - #[doc = " @param path the path to remove"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Remove an entry from the no-extract list\n @param handle the context handle\n @param path the path to remove\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_remove_noextract( handle: *mut alpm_handle_t, path: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Test if a path matches any of the globs in the no-extract list"] - #[doc = " @param handle the context handle"] - #[doc = " @param path the path to test"] - #[doc = " @return 0 is the path matches a glob, negative if there is no match and"] - #[doc = " positive is the match was inverted"] + #[doc = " Test if a path matches any of the globs in the no-extract list\n @param handle the context handle\n @param path the path to test\n @return 0 is the path matches a glob, negative if there is no match and\n positive is the match was inverted"] pub fn alpm_option_match_noextract( handle: *mut alpm_handle_t, path: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Get the list of ignored packages"] - #[doc = " @param handle the context handle"] - #[doc = " @return the char* list of ignored packages"] + #[doc = " Get the list of ignored packages\n @param handle the context handle\n @return the char* list of ignored packages"] pub fn alpm_option_get_ignorepkgs(handle: *mut alpm_handle_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Add a file to the ignored package list"] - #[doc = " @param handle the context handle"] - #[doc = " @param pkg the package to add"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Add a file to the ignored package list\n @param handle the context handle\n @param pkg the package to add\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_add_ignorepkg( handle: *mut alpm_handle_t, pkg: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Sets the list of packages to ignore"] - #[doc = " @param handle the context handle"] - #[doc = " @param ignorepkgs a char* list of packages to ignore"] - #[doc = " The list will be duped and the original will still need to be freed by the caller."] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Sets the list of packages to ignore\n @param handle the context handle\n @param ignorepkgs a char* list of packages to ignore\n The list will be duped and the original will still need to be freed by the caller.\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_ignorepkgs( handle: *mut alpm_handle_t, ignorepkgs: *mut alpm_list_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Remove an entry from the ignorepkg list"] - #[doc = " @param handle the context handle"] - #[doc = " @param pkg the package to remove"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Remove an entry from the ignorepkg list\n @param handle the context handle\n @param pkg the package to remove\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_remove_ignorepkg( handle: *mut alpm_handle_t, pkg: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Get the list of ignored groups"] - #[doc = " @param handle the context handle"] - #[doc = " @return the char* list of ignored groups"] + #[doc = " Get the list of ignored groups\n @param handle the context handle\n @return the char* list of ignored groups"] pub fn alpm_option_get_ignoregroups(handle: *mut alpm_handle_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Add a file to the ignored group list"] - #[doc = " @param handle the context handle"] - #[doc = " @param grp the group to add"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Add a file to the ignored group list\n @param handle the context handle\n @param grp the group to add\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_add_ignoregroup( handle: *mut alpm_handle_t, grp: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Sets the list of groups to ignore"] - #[doc = " @param handle the context handle"] - #[doc = " @param ignoregrps a char* list of groups to ignore"] - #[doc = " The list will be duped and the original will still need to be freed by the caller."] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Sets the list of groups to ignore\n @param handle the context handle\n @param ignoregrps a char* list of groups to ignore\n The list will be duped and the original will still need to be freed by the caller.\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_ignoregroups( handle: *mut alpm_handle_t, ignoregrps: *mut alpm_list_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Remove an entry from the ignoregroup list"] - #[doc = " @param handle the context handle"] - #[doc = " @param grp the group to remove"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Remove an entry from the ignoregroup list\n @param handle the context handle\n @param grp the group to remove\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_remove_ignoregroup( handle: *mut alpm_handle_t, grp: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Gets the list of dependencies that are assumed to be met"] - #[doc = " @param handle the context handle"] - #[doc = " @return a list of alpm_depend_t*"] + #[doc = " Gets the list of dependencies that are assumed to be met\n @param handle the context handle\n @return a list of alpm_depend_t*"] pub fn alpm_option_get_assumeinstalled(handle: *mut alpm_handle_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Add a depend to the assumed installed list"] - #[doc = " @param handle the context handle"] - #[doc = " @param dep the dependency to add"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Add a depend to the assumed installed list\n @param handle the context handle\n @param dep the dependency to add\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_add_assumeinstalled( handle: *mut alpm_handle_t, dep: *const alpm_depend_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Sets the list of dependencies that are assumed to be met"] - #[doc = " @param handle the context handle"] - #[doc = " @param deps a list of *alpm_depend_t"] - #[doc = " The list will be duped and the original will still need to be freed by the caller."] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Sets the list of dependencies that are assumed to be met\n @param handle the context handle\n @param deps a list of *alpm_depend_t\n The list will be duped and the original will still need to be freed by the caller.\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_assumeinstalled( handle: *mut alpm_handle_t, deps: *mut alpm_list_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Remove an entry from the assume installed list"] - #[doc = " @param handle the context handle"] - #[doc = " @param dep the dep to remove"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Remove an entry from the assume installed list\n @param handle the context handle\n @param dep the dep to remove\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_remove_assumeinstalled( handle: *mut alpm_handle_t, dep: *const alpm_depend_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Returns the allowed package architecture."] - #[doc = " @param handle the context handle"] - #[doc = " @return the configured package architectures"] + #[doc = " Returns the allowed package architecture.\n @param handle the context handle\n @return the configured package architectures"] pub fn alpm_option_get_architectures(handle: *mut alpm_handle_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Adds an allowed package architecture."] - #[doc = " @param handle the context handle"] - #[doc = " @param arch the architecture to set"] + #[doc = " Adds an allowed package architecture.\n @param handle the context handle\n @param arch the architecture to set"] pub fn alpm_option_add_architecture( handle: *mut alpm_handle_t, arch: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Sets the allowed package architecture."] - #[doc = " @param handle the context handle"] - #[doc = " @param arches the architecture to set"] + #[doc = " Sets the allowed package architecture.\n @param handle the context handle\n @param arches the architecture to set"] pub fn alpm_option_set_architectures( handle: *mut alpm_handle_t, arches: *mut alpm_list_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Removes an allowed package architecture."] - #[doc = " @param handle the context handle"] - #[doc = " @param arch the architecture to remove"] + #[doc = " Removes an allowed package architecture.\n @param handle the context handle\n @param arch the architecture to remove"] pub fn alpm_option_remove_architecture( handle: *mut alpm_handle_t, arch: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Get whether or not checking for free space before installing packages is enabled."] - #[doc = " @param handle the context handle"] - #[doc = " @return 0 if disabled, 1 if enabled"] + #[doc = " Get whether or not checking for free space before installing packages is enabled.\n @param handle the context handle\n @return 0 if disabled, 1 if enabled"] pub fn alpm_option_get_checkspace(handle: *mut alpm_handle_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Enable/disable checking free space before installing packages."] - #[doc = " @param handle the context handle"] - #[doc = " @param checkspace 0 for disabled, 1 for enabled"] + #[doc = " Enable/disable checking free space before installing packages.\n @param handle the context handle\n @param checkspace 0 for disabled, 1 for enabled"] pub fn alpm_option_set_checkspace( handle: *mut alpm_handle_t, checkspace: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Gets the configured database extension."] - #[doc = " @param handle the context handle"] - #[doc = " @return the configured database extension"] + #[doc = " Gets the configured database extension.\n @param handle the context handle\n @return the configured database extension"] pub fn alpm_option_get_dbext(handle: *mut alpm_handle_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Sets the database extension."] - #[doc = " @param handle the context handle"] - #[doc = " @param dbext the database extension to use"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Sets the database extension.\n @param handle the context handle\n @param dbext the database extension to use\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_dbext( handle: *mut alpm_handle_t, dbext: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Get the default siglevel."] - #[doc = " @param handle the context handle"] - #[doc = " @return a \\link alpm_siglevel_t \\endlink bitfield of the siglevel"] + #[doc = " Get the default siglevel.\n @param handle the context handle\n @return a \\link alpm_siglevel_t \\endlink bitfield of the siglevel"] pub fn alpm_option_get_default_siglevel(handle: *mut alpm_handle_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Set the default siglevel."] - #[doc = " @param handle the context handle"] - #[doc = " @param level a \\link alpm_siglevel_t \\endlink bitfield of the level to set"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Set the default siglevel.\n @param handle the context handle\n @param level a \\link alpm_siglevel_t \\endlink bitfield of the level to set\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_default_siglevel( handle: *mut alpm_handle_t, level: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Get the configured local file siglevel."] - #[doc = " @param handle the context handle"] - #[doc = " @return a \\link alpm_siglevel_t \\endlink bitfield of the siglevel"] + #[doc = " Get the configured local file siglevel.\n @param handle the context handle\n @return a \\link alpm_siglevel_t \\endlink bitfield of the siglevel"] pub fn alpm_option_get_local_file_siglevel(handle: *mut alpm_handle_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Set the local file siglevel."] - #[doc = " @param handle the context handle"] - #[doc = " @param level a \\link alpm_siglevel_t \\endlink bitfield of the level to set"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Set the local file siglevel.\n @param handle the context handle\n @param level a \\link alpm_siglevel_t \\endlink bitfield of the level to set\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_local_file_siglevel( handle: *mut alpm_handle_t, level: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Get the configured remote file siglevel."] - #[doc = " @param handle the context handle"] - #[doc = " @return a \\link alpm_siglevel_t \\endlink bitfield of the siglevel"] + #[doc = " Get the configured remote file siglevel.\n @param handle the context handle\n @return a \\link alpm_siglevel_t \\endlink bitfield of the siglevel"] pub fn alpm_option_get_remote_file_siglevel( handle: *mut alpm_handle_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Set the remote file siglevel."] - #[doc = " @param handle the context handle"] - #[doc = " @param level a \\link alpm_siglevel_t \\endlink bitfield of the level to set"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Set the remote file siglevel.\n @param handle the context handle\n @param level a \\link alpm_siglevel_t \\endlink bitfield of the level to set\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_remote_file_siglevel( handle: *mut alpm_handle_t, level: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Enables/disables the download timeout."] - #[doc = " @param handle the context handle"] - #[doc = " @param disable_dl_timeout 0 for enabled, 1 for disabled"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Enables/disables the download timeout.\n @param handle the context handle\n @param disable_dl_timeout 0 for enabled, 1 for disabled\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_option_set_disable_dl_timeout( handle: *mut alpm_handle_t, disable_dl_timeout: ::std::os::raw::c_ushort, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Gets the number of parallel streams to download database and package files."] - #[doc = " @param handle the context handle"] - #[doc = " @return the number of parallel streams to download database and package files"] + #[doc = " Gets the number of parallel streams to download database and package files.\n @param handle the context handle\n @return the number of parallel streams to download database and package files"] pub fn alpm_option_get_parallel_downloads(handle: *mut alpm_handle_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Sets number of parallel streams to download database and package files."] - #[doc = " @param handle the context handle"] - #[doc = " @param num_streams number of parallel download streams"] - #[doc = " @return 0 on success, -1 on error"] + #[doc = " Sets number of parallel streams to download database and package files.\n @param handle the context handle\n @param num_streams number of parallel download streams\n @return 0 on success, -1 on error"] pub fn alpm_option_set_parallel_downloads( handle: *mut alpm_handle_t, num_streams: ::std::os::raw::c_uint, @@ -4286,7 +3766,7 @@ extern "C" { } #[repr(u32)] #[doc = " Package install reasons."] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum _alpm_pkgreason_t { #[doc = " Explicitly requested by the user."] ALPM_PKG_REASON_EXPLICIT = 0, @@ -4297,7 +3777,7 @@ pub enum _alpm_pkgreason_t { pub use self::_alpm_pkgreason_t as alpm_pkgreason_t; #[repr(u32)] #[doc = " Location a package object was loaded from."] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum _alpm_pkgfrom_t { #[doc = " Loaded from a file via \\link alpm_pkg_load \\endlink"] ALPM_PKG_FROM_FILE = 1, @@ -4325,19 +3805,7 @@ pub mod _alpm_pkgvalidation_t { #[doc = " Method used to validate a package."] pub use self::_alpm_pkgvalidation_t::Type as alpm_pkgvalidation_t; extern "C" { - #[doc = " Create a package from a file."] - #[doc = " If full is false, the archive is read only until all necessary"] - #[doc = " metadata is found. If it is true, the entire archive is read, which"] - #[doc = " serves as a verification of integrity and the filelist can be created."] - #[doc = " The allocated structure should be freed using alpm_pkg_free()."] - #[doc = " @param handle the context handle"] - #[doc = " @param filename location of the package tarball"] - #[doc = " @param full whether to stop the load after metadata is read or continue"] - #[doc = " through the full archive"] - #[doc = " @param level what level of package signature checking to perform on the"] - #[doc = " package; note that this must be a '.sig' file type verification"] - #[doc = " @param pkg address of the package pointer"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Create a package from a file.\n If full is false, the archive is read only until all necessary\n metadata is found. If it is true, the entire archive is read, which\n serves as a verification of integrity and the filelist can be created.\n The allocated structure should be freed using alpm_pkg_free().\n @param handle the context handle\n @param filename location of the package tarball\n @param full whether to stop the load after metadata is read or continue\n through the full archive\n @param level what level of package signature checking to perform on the\n package; note that this must be a '.sig' file type verification\n @param pkg address of the package pointer\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_pkg_load( handle: *mut alpm_handle_t, filename: *const ::std::os::raw::c_char, @@ -4347,14 +3815,7 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Fetch a list of remote packages."] - #[doc = " @param handle the context handle"] - #[doc = " @param urls list of package URLs to download"] - #[doc = " @param fetched list of filepaths to the fetched packages, each item"] - #[doc = " corresponds to one in `urls` list. This is an output parameter,"] - #[doc = " the caller should provide a pointer to an empty list"] - #[doc = " (*fetched === NULL) and the callee fills the list with data."] - #[doc = " @return 0 on success or -1 on failure"] + #[doc = " Fetch a list of remote packages.\n @param handle the context handle\n @param urls list of package URLs to download\n @param fetched list of filepaths to the fetched packages, each item\n corresponds to one in `urls` list. This is an output parameter,\n the caller should provide a pointer to an empty list\n (*fetched === NULL) and the callee fills the list with data.\n @return 0 on success or -1 on failure"] pub fn alpm_fetch_pkgurl( handle: *mut alpm_handle_t, urls: *const alpm_list_t, @@ -4362,268 +3823,164 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Find a package in a list by name."] - #[doc = " @param haystack a list of alpm_pkg_t"] - #[doc = " @param needle the package name"] - #[doc = " @return a pointer to the package if found or NULL"] + #[doc = " Find a package in a list by name.\n @param haystack a list of alpm_pkg_t\n @param needle the package name\n @return a pointer to the package if found or NULL"] pub fn alpm_pkg_find( haystack: *mut alpm_list_t, needle: *const ::std::os::raw::c_char, ) -> *mut alpm_pkg_t; } extern "C" { - #[doc = " Free a package."] - #[doc = " Only packages loaded with \\link alpm_pkg_load \\endlink can be freed."] - #[doc = " Packages from databases will be freed by libalpm when they are unregistered."] - #[doc = " @param pkg package pointer to free"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Free a package.\n Only packages loaded with \\link alpm_pkg_load \\endlink can be freed.\n Packages from databases will be freed by libalpm when they are unregistered.\n @param pkg package pointer to free\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_pkg_free(pkg: *mut alpm_pkg_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Check the integrity (with md5) of a package from the sync cache."] - #[doc = " @param pkg package pointer"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Check the integrity (with md5) of a package from the sync cache.\n @param pkg package pointer\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_pkg_checkmd5sum(pkg: *mut alpm_pkg_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Compare two version strings and determine which one is 'newer'."] - #[doc = " Returns a value comparable to the way strcmp works. Returns 1"] - #[doc = " if a is newer than b, 0 if a and b are the same version, or -1"] - #[doc = " if b is newer than a."] - #[doc = ""] - #[doc = " Different epoch values for version strings will override any further"] - #[doc = " comparison. If no epoch is provided, 0 is assumed."] - #[doc = ""] - #[doc = " Keep in mind that the pkgrel is only compared if it is available"] - #[doc = " on both versions handed to this function. For example, comparing"] - #[doc = " 1.5-1 and 1.5 will yield 0; comparing 1.5-1 and 1.5-2 will yield"] - #[doc = " -1 as expected. This is mainly for supporting versioned dependencies"] - #[doc = " that do not include the pkgrel."] + #[doc = " Compare two version strings and determine which one is 'newer'.\n Returns a value comparable to the way strcmp works. Returns 1\n if a is newer than b, 0 if a and b are the same version, or -1\n if b is newer than a.\n\n Different epoch values for version strings will override any further\n comparison. If no epoch is provided, 0 is assumed.\n\n Keep in mind that the pkgrel is only compared if it is available\n on both versions handed to this function. For example, comparing\n 1.5-1 and 1.5 will yield 0; comparing 1.5-1 and 1.5-2 will yield\n -1 as expected. This is mainly for supporting versioned dependencies\n that do not include the pkgrel."] pub fn alpm_pkg_vercmp( a: *const ::std::os::raw::c_char, b: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Computes the list of packages requiring a given package."] - #[doc = " The return value of this function is a newly allocated"] - #[doc = " list of package names (char*), it should be freed by the caller."] - #[doc = " @param pkg a package"] - #[doc = " @return the list of packages requiring pkg"] + #[doc = " Computes the list of packages requiring a given package.\n The return value of this function is a newly allocated\n list of package names (char*), it should be freed by the caller.\n @param pkg a package\n @return the list of packages requiring pkg"] pub fn alpm_pkg_compute_requiredby(pkg: *mut alpm_pkg_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Computes the list of packages optionally requiring a given package."] - #[doc = " The return value of this function is a newly allocated"] - #[doc = " list of package names (char*), it should be freed by the caller."] - #[doc = " @param pkg a package"] - #[doc = " @return the list of packages optionally requiring pkg"] + #[doc = " Computes the list of packages optionally requiring a given package.\n The return value of this function is a newly allocated\n list of package names (char*), it should be freed by the caller.\n @param pkg a package\n @return the list of packages optionally requiring pkg"] pub fn alpm_pkg_compute_optionalfor(pkg: *mut alpm_pkg_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Test if a package should be ignored."] - #[doc = " Checks if the package is ignored via IgnorePkg, or if the package is"] - #[doc = " in a group ignored via IgnoreGroup."] - #[doc = " @param handle the context handle"] - #[doc = " @param pkg the package to test"] - #[doc = " @return 1 if the package should be ignored, 0 otherwise"] + #[doc = " Test if a package should be ignored.\n Checks if the package is ignored via IgnorePkg, or if the package is\n in a group ignored via IgnoreGroup.\n @param handle the context handle\n @param pkg the package to test\n @return 1 if the package should be ignored, 0 otherwise"] pub fn alpm_pkg_should_ignore( handle: *mut alpm_handle_t, pkg: *mut alpm_pkg_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Gets the name of the file from which the package was loaded."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal string"] + #[doc = " Gets the handle of a package\n @param pkg a pointer to package\n @return the alpm handle that the package belongs to"] + pub fn alpm_pkg_get_handle(pkg: *mut alpm_pkg_t) -> *mut alpm_handle_t; +} +extern "C" { + #[doc = " Gets the name of the file from which the package was loaded.\n @param pkg a pointer to package\n @return a reference to an internal string"] pub fn alpm_pkg_get_filename(pkg: *mut alpm_pkg_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Returns the package base name."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal string"] + #[doc = " Returns the package base name.\n @param pkg a pointer to package\n @return a reference to an internal string"] pub fn alpm_pkg_get_base(pkg: *mut alpm_pkg_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Returns the package name."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal string"] + #[doc = " Returns the package name.\n @param pkg a pointer to package\n @return a reference to an internal string"] pub fn alpm_pkg_get_name(pkg: *mut alpm_pkg_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Returns the package version as a string."] - #[doc = " This includes all available epoch, version, and pkgrel components. Use"] - #[doc = " alpm_pkg_vercmp() to compare version strings if necessary."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal string"] + #[doc = " Returns the package version as a string.\n This includes all available epoch, version, and pkgrel components. Use\n alpm_pkg_vercmp() to compare version strings if necessary.\n @param pkg a pointer to package\n @return a reference to an internal string"] pub fn alpm_pkg_get_version(pkg: *mut alpm_pkg_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Returns the origin of the package."] - #[doc = " @return an alpm_pkgfrom_t constant, -1 on error"] + #[doc = " Returns the origin of the package.\n @return an alpm_pkgfrom_t constant, -1 on error"] pub fn alpm_pkg_get_origin(pkg: *mut alpm_pkg_t) -> alpm_pkgfrom_t; } extern "C" { - #[doc = " Returns the package description."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal string"] + #[doc = " Returns the package description.\n @param pkg a pointer to package\n @return a reference to an internal string"] pub fn alpm_pkg_get_desc(pkg: *mut alpm_pkg_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Returns the package URL."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal string"] + #[doc = " Returns the package URL.\n @param pkg a pointer to package\n @return a reference to an internal string"] pub fn alpm_pkg_get_url(pkg: *mut alpm_pkg_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Returns the build timestamp of the package."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return the timestamp of the build time"] + #[doc = " Returns the build timestamp of the package.\n @param pkg a pointer to package\n @return the timestamp of the build time"] pub fn alpm_pkg_get_builddate(pkg: *mut alpm_pkg_t) -> alpm_time_t; } extern "C" { - #[doc = " Returns the install timestamp of the package."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return the timestamp of the install time"] + #[doc = " Returns the install timestamp of the package.\n @param pkg a pointer to package\n @return the timestamp of the install time"] pub fn alpm_pkg_get_installdate(pkg: *mut alpm_pkg_t) -> alpm_time_t; } extern "C" { - #[doc = " Returns the packager's name."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal string"] + #[doc = " Returns the packager's name.\n @param pkg a pointer to package\n @return a reference to an internal string"] pub fn alpm_pkg_get_packager(pkg: *mut alpm_pkg_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Returns the package's MD5 checksum as a string."] - #[doc = " The returned string is a sequence of 32 lowercase hexadecimal digits."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal string"] + #[doc = " Returns the package's MD5 checksum as a string.\n The returned string is a sequence of 32 lowercase hexadecimal digits.\n @param pkg a pointer to package\n @return a reference to an internal string"] pub fn alpm_pkg_get_md5sum(pkg: *mut alpm_pkg_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Returns the package's SHA256 checksum as a string."] - #[doc = " The returned string is a sequence of 64 lowercase hexadecimal digits."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal string"] + #[doc = " Returns the package's SHA256 checksum as a string.\n The returned string is a sequence of 64 lowercase hexadecimal digits.\n @param pkg a pointer to package\n @return a reference to an internal string"] pub fn alpm_pkg_get_sha256sum(pkg: *mut alpm_pkg_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Returns the architecture for which the package was built."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal string"] + #[doc = " Returns the architecture for which the package was built.\n @param pkg a pointer to package\n @return a reference to an internal string"] pub fn alpm_pkg_get_arch(pkg: *mut alpm_pkg_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Returns the size of the package. This is only available for sync database"] - #[doc = " packages and package files, not those loaded from the local database."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return the size of the package in bytes."] + #[doc = " Returns the size of the package. This is only available for sync database\n packages and package files, not those loaded from the local database.\n @param pkg a pointer to package\n @return the size of the package in bytes."] pub fn alpm_pkg_get_size(pkg: *mut alpm_pkg_t) -> off_t; } extern "C" { - #[doc = " Returns the installed size of the package."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return the total size of files installed by the package."] + #[doc = " Returns the installed size of the package.\n @param pkg a pointer to package\n @return the total size of files installed by the package."] pub fn alpm_pkg_get_isize(pkg: *mut alpm_pkg_t) -> off_t; } extern "C" { - #[doc = " Returns the package installation reason."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return an enum member giving the install reason."] + #[doc = " Returns the package installation reason.\n @param pkg a pointer to package\n @return an enum member giving the install reason."] pub fn alpm_pkg_get_reason(pkg: *mut alpm_pkg_t) -> alpm_pkgreason_t; } extern "C" { - #[doc = " Returns the list of package licenses."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a pointer to an internal list of strings."] + #[doc = " Returns the list of package licenses.\n @param pkg a pointer to package\n @return a pointer to an internal list of strings."] pub fn alpm_pkg_get_licenses(pkg: *mut alpm_pkg_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Returns the list of package groups."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a pointer to an internal list of strings."] + #[doc = " Returns the list of package groups.\n @param pkg a pointer to package\n @return a pointer to an internal list of strings."] pub fn alpm_pkg_get_groups(pkg: *mut alpm_pkg_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Returns the list of package dependencies as alpm_depend_t."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal list of alpm_depend_t structures."] + #[doc = " Returns the list of package dependencies as alpm_depend_t.\n @param pkg a pointer to package\n @return a reference to an internal list of alpm_depend_t structures."] pub fn alpm_pkg_get_depends(pkg: *mut alpm_pkg_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Returns the list of package optional dependencies."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal list of alpm_depend_t structures."] + #[doc = " Returns the list of package optional dependencies.\n @param pkg a pointer to package\n @return a reference to an internal list of alpm_depend_t structures."] pub fn alpm_pkg_get_optdepends(pkg: *mut alpm_pkg_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Returns a list of package check dependencies"] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal list of alpm_depend_t structures."] + #[doc = " Returns a list of package check dependencies\n @param pkg a pointer to package\n @return a reference to an internal list of alpm_depend_t structures."] pub fn alpm_pkg_get_checkdepends(pkg: *mut alpm_pkg_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Returns a list of package make dependencies"] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal list of alpm_depend_t structures."] + #[doc = " Returns a list of package make dependencies\n @param pkg a pointer to package\n @return a reference to an internal list of alpm_depend_t structures."] pub fn alpm_pkg_get_makedepends(pkg: *mut alpm_pkg_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Returns the list of packages conflicting with pkg."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal list of alpm_depend_t structures."] + #[doc = " Returns the list of packages conflicting with pkg.\n @param pkg a pointer to package\n @return a reference to an internal list of alpm_depend_t structures."] pub fn alpm_pkg_get_conflicts(pkg: *mut alpm_pkg_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Returns the list of packages provided by pkg."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal list of alpm_depend_t structures."] + #[doc = " Returns the list of packages provided by pkg.\n @param pkg a pointer to package\n @return a reference to an internal list of alpm_depend_t structures."] pub fn alpm_pkg_get_provides(pkg: *mut alpm_pkg_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Returns the list of packages to be replaced by pkg."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal list of alpm_depend_t structures."] + #[doc = " Returns the list of packages to be replaced by pkg.\n @param pkg a pointer to package\n @return a reference to an internal list of alpm_depend_t structures."] pub fn alpm_pkg_get_replaces(pkg: *mut alpm_pkg_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Returns the list of files installed by pkg."] - #[doc = " The filenames are relative to the install root,"] - #[doc = " and do not include leading slashes."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a pointer to a filelist object containing a count and an array of"] - #[doc = " package file objects"] + #[doc = " Returns the list of files installed by pkg.\n The filenames are relative to the install root,\n and do not include leading slashes.\n @param pkg a pointer to package\n @return a pointer to a filelist object containing a count and an array of\n package file objects"] pub fn alpm_pkg_get_files(pkg: *mut alpm_pkg_t) -> *mut alpm_filelist_t; } extern "C" { - #[doc = " Returns the list of files backed up when installing pkg."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to a list of alpm_backup_t objects"] + #[doc = " Returns the list of files backed up when installing pkg.\n @param pkg a pointer to package\n @return a reference to a list of alpm_backup_t objects"] pub fn alpm_pkg_get_backup(pkg: *mut alpm_pkg_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Returns the database containing pkg."] - #[doc = " Returns a pointer to the alpm_db_t structure the package is"] - #[doc = " originating from, or NULL if the package was loaded from a file."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a pointer to the DB containing pkg, or NULL."] + #[doc = " Returns the database containing pkg.\n Returns a pointer to the alpm_db_t structure the package is\n originating from, or NULL if the package was loaded from a file.\n @param pkg a pointer to package\n @return a pointer to the DB containing pkg, or NULL."] pub fn alpm_pkg_get_db(pkg: *mut alpm_pkg_t) -> *mut alpm_db_t; } extern "C" { - #[doc = " Returns the base64 encoded package signature."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return a reference to an internal string"] + #[doc = " Returns the base64 encoded package signature.\n @param pkg a pointer to package\n @return a reference to an internal string"] pub fn alpm_pkg_get_base64_sig(pkg: *mut alpm_pkg_t) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Extracts package signature either from embedded package signature"] - #[doc = " or if it is absent then reads data from detached signature file."] - #[doc = " @param pkg a pointer to package."] - #[doc = " @param sig output parameter for signature data. Callee function allocates"] - #[doc = " a buffer needed for the signature data. Caller is responsible for"] - #[doc = " freeing this buffer."] - #[doc = " @param sig_len output parameter for the signature data length."] - #[doc = " @return 0 on success, negative number on error."] + #[doc = " Extracts package signature either from embedded package signature\n or if it is absent then reads data from detached signature file.\n @param pkg a pointer to package.\n @param sig output parameter for signature data. Callee function allocates\n a buffer needed for the signature data. Caller is responsible for\n freeing this buffer.\n @param sig_len output parameter for the signature data length.\n @return 0 on success, negative number on error."] pub fn alpm_pkg_get_sig( pkg: *mut alpm_pkg_t, sig: *mut *mut ::std::os::raw::c_uchar, @@ -4631,53 +3988,34 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Returns the method used to validate a package during install."] - #[doc = " @param pkg a pointer to package"] - #[doc = " @return an enum member giving the validation method"] + #[doc = " Returns the method used to validate a package during install.\n @param pkg a pointer to package\n @return an enum member giving the validation method"] pub fn alpm_pkg_get_validation(pkg: *mut alpm_pkg_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Returns whether the package has an install scriptlet."] - #[doc = " @return 0 if FALSE, TRUE otherwise"] + #[doc = " Gets the extended data field of a package.\n @param pkg a pointer to package\n @return a reference to a list of alpm_pkg_xdata_t objects"] + pub fn alpm_pkg_get_xdata(pkg: *mut alpm_pkg_t) -> *mut alpm_list_t; +} +extern "C" { + #[doc = " Returns whether the package has an install scriptlet.\n @return 0 if FALSE, TRUE otherwise"] pub fn alpm_pkg_has_scriptlet(pkg: *mut alpm_pkg_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Returns the size of the files that will be downloaded to install a"] - #[doc = " package."] - #[doc = " @param newpkg the new package to upgrade to"] - #[doc = " @return the size of the download"] + #[doc = " Returns the size of the files that will be downloaded to install a\n package.\n @param newpkg the new package to upgrade to\n @return the size of the download"] pub fn alpm_pkg_download_size(newpkg: *mut alpm_pkg_t) -> off_t; } extern "C" { - #[doc = " Set install reason for a package in the local database."] - #[doc = " The provided package object must be from the local database or this method"] - #[doc = " will fail. The write to the local database is performed immediately."] - #[doc = " @param pkg the package to update"] - #[doc = " @param reason the new install reason"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Set install reason for a package in the local database.\n The provided package object must be from the local database or this method\n will fail. The write to the local database is performed immediately.\n @param pkg the package to update\n @param reason the new install reason\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_pkg_set_reason( pkg: *mut alpm_pkg_t, reason: alpm_pkgreason_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Open a package changelog for reading."] - #[doc = " Similar to fopen in functionality, except that the returned 'file"] - #[doc = " stream' could really be from an archive as well as from the database."] - #[doc = " @param pkg the package to read the changelog of (either file or db)"] - #[doc = " @return a 'file stream' to the package changelog"] + #[doc = " Open a package changelog for reading.\n Similar to fopen in functionality, except that the returned 'file\n stream' could really be from an archive as well as from the database.\n @param pkg the package to read the changelog of (either file or db)\n @return a 'file stream' to the package changelog"] pub fn alpm_pkg_changelog_open(pkg: *mut alpm_pkg_t) -> *mut ::std::os::raw::c_void; } extern "C" { - #[doc = " Read data from an open changelog 'file stream'."] - #[doc = " Similar to fread in functionality, this function takes a buffer and"] - #[doc = " amount of data to read. If an error occurs pm_errno will be set."] - #[doc = " @param ptr a buffer to fill with raw changelog data"] - #[doc = " @param size the size of the buffer"] - #[doc = " @param pkg the package that the changelog is being read from"] - #[doc = " @param fp a 'file stream' to the package changelog"] - #[doc = " @return the number of characters read, or 0 if there is no more data or an"] - #[doc = " error occurred."] + #[doc = " Read data from an open changelog 'file stream'.\n Similar to fread in functionality, this function takes a buffer and\n amount of data to read. If an error occurs pm_errno will be set.\n @param ptr a buffer to fill with raw changelog data\n @param size the size of the buffer\n @param pkg the package that the changelog is being read from\n @param fp a 'file stream' to the package changelog\n @return the number of characters read, or 0 if there is no more data or an\n error occurred."] pub fn alpm_pkg_changelog_read( ptr: *mut ::std::os::raw::c_void, size: usize, @@ -4686,27 +4024,18 @@ extern "C" { ) -> usize; } extern "C" { - #[doc = " Close a package changelog for reading."] - #[doc = " @param pkg the package to close the changelog of (either file or db)"] - #[doc = " @param fp the 'file stream' to the package changelog to close"] - #[doc = " @return 0 on success, -1 on error"] + #[doc = " Close a package changelog for reading.\n @param pkg the package to close the changelog of (either file or db)\n @param fp the 'file stream' to the package changelog to close\n @return 0 on success, -1 on error"] pub fn alpm_pkg_changelog_close( pkg: *const alpm_pkg_t, fp: *mut ::std::os::raw::c_void, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Open a package mtree file for reading."] - #[doc = " @param pkg the local package to read the mtree of"] - #[doc = " @return an archive structure for the package mtree file"] + #[doc = " Open a package mtree file for reading.\n @param pkg the local package to read the mtree of\n @return an archive structure for the package mtree file"] pub fn alpm_pkg_mtree_open(pkg: *mut alpm_pkg_t) -> *mut archive; } extern "C" { - #[doc = " Read next entry from a package mtree file."] - #[doc = " @param pkg the package that the mtree file is being read from"] - #[doc = " @param archive the archive structure reading from the mtree file"] - #[doc = " @param entry an archive_entry to store the entry header information"] - #[doc = " @return 0 on success, 1 if end of archive is reached, -1 otherwise."] + #[doc = " Read next entry from a package mtree file.\n @param pkg the package that the mtree file is being read from\n @param archive the archive structure reading from the mtree file\n @param entry an archive_entry to store the entry header information\n @return 0 on success, 1 if end of archive is reached, -1 otherwise."] pub fn alpm_pkg_mtree_next( pkg: *const alpm_pkg_t, archive: *mut archive, @@ -4714,9 +4043,7 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Close a package mtree file."] - #[doc = " @param pkg the local package to close the mtree of"] - #[doc = " @param archive the archive to close"] + #[doc = " Close a package mtree file.\n @param pkg the local package to close the mtree of\n @param archive the archive to close"] pub fn alpm_pkg_mtree_close( pkg: *const alpm_pkg_t, archive: *mut archive, @@ -4761,130 +4088,85 @@ pub mod _alpm_transflag_t { #[doc = " Transaction flags"] pub use self::_alpm_transflag_t::Type as alpm_transflag_t; extern "C" { - #[doc = " Returns the bitfield of flags for the current transaction."] - #[doc = " @param handle the context handle"] - #[doc = " @return the bitfield of transaction flags"] + #[doc = " Returns the bitfield of flags for the current transaction.\n @param handle the context handle\n @return the bitfield of transaction flags"] pub fn alpm_trans_get_flags(handle: *mut alpm_handle_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Returns a list of packages added by the transaction."] - #[doc = " @param handle the context handle"] - #[doc = " @return a list of alpm_pkg_t structures"] + #[doc = " Returns a list of packages added by the transaction.\n @param handle the context handle\n @return a list of alpm_pkg_t structures"] pub fn alpm_trans_get_add(handle: *mut alpm_handle_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Returns the list of packages removed by the transaction."] - #[doc = " @param handle the context handle"] - #[doc = " @return a list of alpm_pkg_t structures"] + #[doc = " Returns the list of packages removed by the transaction.\n @param handle the context handle\n @return a list of alpm_pkg_t structures"] pub fn alpm_trans_get_remove(handle: *mut alpm_handle_t) -> *mut alpm_list_t; } extern "C" { - #[doc = " Initialize the transaction."] - #[doc = " @param handle the context handle"] - #[doc = " @param flags flags of the transaction (like nodeps, etc; see alpm_transflag_t)"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Initialize the transaction.\n @param handle the context handle\n @param flags flags of the transaction (like nodeps, etc; see alpm_transflag_t)\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_trans_init( handle: *mut alpm_handle_t, flags: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Prepare a transaction."] - #[doc = " @param handle the context handle"] - #[doc = " @param data the address of an alpm_list where a list"] - #[doc = " of alpm_depmissing_t objects is dumped (conflicting packages)"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Prepare a transaction.\n @param handle the context handle\n @param data the address of an alpm_list where a list\n of alpm_depmissing_t objects is dumped (conflicting packages)\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_trans_prepare( handle: *mut alpm_handle_t, data: *mut *mut alpm_list_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Commit a transaction."] - #[doc = " @param handle the context handle"] - #[doc = " @param data the address of an alpm_list where detailed description"] - #[doc = " of an error can be dumped (i.e. list of conflicting files)"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Commit a transaction.\n @param handle the context handle\n @param data the address of an alpm_list where detailed description\n of an error can be dumped (i.e. list of conflicting files)\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_trans_commit( handle: *mut alpm_handle_t, data: *mut *mut alpm_list_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Interrupt a transaction."] - #[doc = " @param handle the context handle"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Interrupt a transaction.\n @param handle the context handle\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_trans_interrupt(handle: *mut alpm_handle_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Release a transaction."] - #[doc = " @param handle the context handle"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Release a transaction.\n @param handle the context handle\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_trans_release(handle: *mut alpm_handle_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Search for packages to upgrade and add them to the transaction."] - #[doc = " @param handle the context handle"] - #[doc = " @param enable_downgrade allow downgrading of packages if the remote version is lower"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Search for packages to upgrade and add them to the transaction.\n @param handle the context handle\n @param enable_downgrade allow downgrading of packages if the remote version is lower\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_sync_sysupgrade( handle: *mut alpm_handle_t, enable_downgrade: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Add a package to the transaction."] - #[doc = " If the package was loaded by alpm_pkg_load(), it will be freed upon"] - #[doc = " \\link alpm_trans_release \\endlink invocation."] - #[doc = " @param handle the context handle"] - #[doc = " @param pkg the package to add"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Add a package to the transaction.\n If the package was loaded by alpm_pkg_load(), it will be freed upon\n \\link alpm_trans_release \\endlink invocation.\n @param handle the context handle\n @param pkg the package to add\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_add_pkg(handle: *mut alpm_handle_t, pkg: *mut alpm_pkg_t) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Add a package removal to the transaction."] - #[doc = " @param handle the context handle"] - #[doc = " @param pkg the package to uninstall"] - #[doc = " @return 0 on success, -1 on error (pm_errno is set accordingly)"] + #[doc = " Add a package removal to the transaction.\n @param handle the context handle\n @param pkg the package to uninstall\n @return 0 on success, -1 on error (pm_errno is set accordingly)"] pub fn alpm_remove_pkg( handle: *mut alpm_handle_t, pkg: *mut alpm_pkg_t, ) -> ::std::os::raw::c_int; } extern "C" { - #[doc = " Check for new version of pkg in syncdbs."] - #[doc = ""] - #[doc = " If the same package appears multiple dbs only the first will be checked"] - #[doc = ""] - #[doc = " This only checks the syncdb for a newer version. It does not access the network at all."] - #[doc = " See \\link alpm_db_update \\endlink to update a database."] + #[doc = " Check for new version of pkg in syncdbs.\n\n If the same package appears multiple dbs only the first will be checked\n\n This only checks the syncdb for a newer version. It does not access the network at all.\n See \\link alpm_db_update \\endlink to update a database."] pub fn alpm_sync_get_new_version( pkg: *mut alpm_pkg_t, dbs_sync: *mut alpm_list_t, ) -> *mut alpm_pkg_t; } extern "C" { - #[doc = " Get the md5 sum of file."] - #[doc = " @param filename name of the file"] - #[doc = " @return the checksum on success, NULL on error"] + #[doc = " Get the md5 sum of file.\n @param filename name of the file\n @return the checksum on success, NULL on error"] pub fn alpm_compute_md5sum( filename: *const ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } extern "C" { - #[doc = " Get the sha256 sum of file."] - #[doc = " @param filename name of the file"] - #[doc = " @return the checksum on success, NULL on error"] + #[doc = " Get the sha256 sum of file.\n @param filename name of the file\n @return the checksum on success, NULL on error"] pub fn alpm_compute_sha256sum( filename: *const ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } extern "C" { - #[doc = " Remove the database lock file"] - #[doc = " @param handle the context handle"] - #[doc = " @return 0 on success, -1 on error"] - #[doc = ""] - #[doc = " @note Safe to call from inside signal handlers."] + #[doc = " Remove the database lock file\n @param handle the context handle\n @return 0 on success, -1 on error\n\n @note Safe to call from inside signal handlers."] pub fn alpm_unlock(handle: *mut alpm_handle_t) -> ::std::os::raw::c_int; } pub mod alpm_caps { @@ -4898,18 +4180,16 @@ pub mod alpm_caps { pub const ALPM_CAPABILITY_SIGNATURES: Type = 4; } extern "C" { - #[doc = " Get the version of library."] - #[doc = " @return the library version, e.g. \"6.0.4\""] + #[doc = " Get the version of library.\n @return the library version, e.g. \"6.0.4\""] pub fn alpm_version() -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Get the capabilities of the library."] - #[doc = " @return a bitmask of the capabilities"] + #[doc = " Get the capabilities of the library.\n @return a bitmask of the capabilities"] pub fn alpm_capabilities() -> ::std::os::raw::c_int; } pub type __builtin_va_list = [__va_list_tag; 1usize]; #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct __va_list_tag { pub gp_offset: ::std::os::raw::c_uint, pub fp_offset: ::std::os::raw::c_uint, @@ -4918,6 +4198,8 @@ pub struct __va_list_tag { } #[test] fn bindgen_test_layout___va_list_tag() { + const UNINIT: ::std::mem::MaybeUninit<__va_list_tag> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__va_list_tag>(), 24usize, @@ -4929,7 +4211,7 @@ fn bindgen_test_layout___va_list_tag() { concat!("Alignment of ", stringify!(__va_list_tag)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).gp_offset as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).gp_offset) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", @@ -4939,7 +4221,7 @@ fn bindgen_test_layout___va_list_tag() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).fp_offset as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).fp_offset) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", @@ -4949,7 +4231,7 @@ fn bindgen_test_layout___va_list_tag() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).overflow_arg_area as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).overflow_arg_area) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", @@ -4959,7 +4241,7 @@ fn bindgen_test_layout___va_list_tag() { ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).reg_save_area as *const _ as usize }, + unsafe { ::std::ptr::addr_of!((*ptr).reg_save_area) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ",