Skip to content

Commit

Permalink
Add G and g_ to allowlist for binding types to include glib types and…
Browse files Browse the repository at this point in the history
… functions
  • Loading branch information
novafacing committed Dec 6, 2024
1 parent 250311e commit 5586182
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
2 changes: 2 additions & 0 deletions qemu-plugin-sys/generate-bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ fn generate_bindings(qemu_plugin_header: &Path, bindings_path: &Path, def_path:
// ALlowlist all other qemu_plugin.* items
.allowlist_item("qemu_plugin.*")
.allowlist_item("QEMU_PLUGIN.*")
.allowlist_item("G.*")
.allowlist_item("g_.*")
.generate()?;

rust_bindings.write_to_file(bindings_path)?;
Expand Down
30 changes: 30 additions & 0 deletions qemu-plugin-sys/src/bindings_v1.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,36 @@
/* automatically generated by rust-bindgen 0.70.1 */

pub const QEMU_PLUGIN_VERSION: u32 = 1;
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct GArray {
pub data: *mut ::std::os::raw::c_char,
pub len: ::std::os::raw::c_uint,
}
impl Default for GArray {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
pub struct GByteArray {
pub data: *mut ::std::os::raw::c_uchar,
pub len: ::std::os::raw::c_uint,
}
impl Default for GByteArray {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[doc = " typedef qemu_plugin_id_t - Unique plugin ID"]
pub type qemu_plugin_id_t = u64;
#[doc = " struct qemu_info_t - system information for plugins\n\n This structure provides for some limited information about the\n system to allow the plugin to make decisions on how to proceed. For\n example it might only be suitable for running on some guest\n architectures or when under full system emulation."]
Expand Down

0 comments on commit 5586182

Please sign in to comment.