1
0
Fork 0
forked from wry/wry

all: mark extern blocks as unsafe

This commit is contained in:
Julian Orth 2024-10-20 16:28:47 +02:00
parent 0cbaf4493e
commit 448b9e332e
6 changed files with 10 additions and 10 deletions

View file

@ -86,7 +86,7 @@ pub struct LibInput {
li: *mut libinput,
}
extern "C" {
unsafe extern "C" {
fn jay_libinput_log_handler_bridge();
}

View file

@ -34,7 +34,7 @@ pub struct libinput_tablet_tool(u8);
pub struct libinput_event_touch(u8);
#[link(name = "input")]
extern "C" {
unsafe extern "C" {
pub fn libinput_log_set_handler(libinput: *mut libinput, log_handler: libinput_log_handler);
pub fn libinput_log_set_priority(libinput: *mut libinput, priority: libinput_log_priority);
pub fn libinput_path_create_context(

View file

@ -20,7 +20,7 @@ struct cairo_surface_t(u8);
struct cairo_t(u8);
#[link(name = "cairo")]
extern "C" {
unsafe extern "C" {
fn cairo_image_surface_create(
format: cairo_format_t,
width: c::c_int,
@ -47,7 +47,7 @@ extern "C" {
struct PangoContext_(u8);
#[link(name = "pangocairo-1.0")]
extern "C" {
unsafe extern "C" {
fn pango_cairo_create_context(cr: *mut cairo_t) -> *mut PangoContext_;
fn pango_cairo_show_layout(cr: *mut cairo_t, layout: *mut PangoLayout_);
}
@ -56,7 +56,7 @@ extern "C" {
struct GObject(u8);
#[link(name = "gobject-2.0")]
extern "C" {
unsafe extern "C" {
fn g_object_unref(object: *mut GObject);
}
@ -66,7 +66,7 @@ struct PangoFontDescription_(u8);
struct PangoLayout_(u8);
#[link(name = "pango-1.0")]
extern "C" {
unsafe extern "C" {
fn pango_font_description_from_string(str: *const c::c_char) -> *mut PangoFontDescription_;
fn pango_font_description_free(desc: *mut PangoFontDescription_);
fn pango_font_description_get_size(desc: *mut PangoFontDescription_) -> c::c_int;

View file

@ -19,7 +19,7 @@ struct udev_list_entry(u8);
struct udev_device(u8);
#[link(name = "udev")]
extern "C" {
unsafe extern "C" {
fn udev_new() -> *mut udev;
fn udev_unref(udev: *mut udev) -> *mut udev;

View file

@ -83,7 +83,7 @@ struct gbm_import_fd_modifier_data {
}
#[link(name = "gbm")]
extern "C" {
unsafe extern "C" {
fn gbm_create_device(fd: c::c_int) -> *mut Device;
fn gbm_device_destroy(dev: *mut Device);

View file

@ -71,7 +71,7 @@ impl Default for xkb_rule_names {
}
#[link(name = "xkbcommon")]
extern "C" {
unsafe extern "C" {
fn xkb_context_new(flags: xkb_context_flags) -> *mut xkb_context;
fn xkb_context_unref(context: *mut xkb_context);
fn xkb_context_set_log_verbosity(context: *mut xkb_context, verbosity: c::c_int);
@ -121,7 +121,7 @@ pub struct XkbContext {
ids: KeymapIds,
}
extern "C" {
unsafe extern "C" {
fn jay_xkbcommon_log_handler_bridge();
}