1
0
Fork 0
forked from wry/wry

Merge pull request #300 from mahkoh/jorth/edition-2024

Prepare for rust 2024 edition
This commit is contained in:
mahkoh 2024-10-20 16:32:53 +02:00 committed by GitHub
commit 6438dba656
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 14 additions and 14 deletions

View file

@ -2,7 +2,7 @@
#[macro_export]
macro_rules! config {
($f:path) => {
#[no_mangle]
#[unsafe(no_mangle)]
#[used]
pub static mut JAY_CONFIG_ENTRY_V1: $crate::_private::ConfigEntry = {
struct X;

View file

@ -86,7 +86,7 @@ pub struct LibInput {
li: *mut libinput,
}
extern "C" {
unsafe extern "C" {
fn jay_libinput_log_handler_bridge();
}
@ -166,7 +166,7 @@ impl Drop for LibInput {
}
}
#[no_mangle]
#[unsafe(no_mangle)]
unsafe extern "C" fn jay_libinput_log_handler(
_libinput: *mut libinput,
priority: libinput_log_priority,

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

@ -175,7 +175,7 @@ impl Drop for RenderingFrame {
}
}
#[no_mangle]
#[unsafe(no_mangle)]
unsafe extern "C" fn ___tracy_demangle(
mangled: *const std::ffi::c_char,
) -> *const std::ffi::c_char {

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();
}
@ -408,7 +408,7 @@ impl Drop for XkbState {
}
}
#[no_mangle]
#[unsafe(no_mangle)]
unsafe extern "C" fn jay_xkbcommon_log_handler(
_ctx: *mut xkb_context,
level: xkb_log_level,