Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Revert "Remove callback_guard" #43

Merged
merged 1 commit into from
Mar 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sourceview-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ fn find() -> Result<(), Error> {

let mut config = Config::new();
config.atleast_version(version);
config.print_system_libs(false);
if hardcode_shared_libs {
config.cargo_metadata(false);
}
Expand Down
2 changes: 1 addition & 1 deletion sourceview-sys/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was generated by gir (https://github.com/gtk-rs/gir @ ea993ed)
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
// from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70)
// DO NOT EDIT

Expand Down
15 changes: 14 additions & 1 deletion src/auto/buffer.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb)
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
// from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70)
// DO NOT EDIT

Expand Down Expand Up @@ -526,79 +526,92 @@ impl<O: IsA<Buffer> + IsA<glib::object::Object>> BufferExt for O {

unsafe extern "C" fn highlight_updated_trampoline<P>(this: *mut ffi::GtkSourceBuffer, start: *mut gtk_ffi::GtkTextIter, end: *mut gtk_ffi::GtkTextIter, f: glib_ffi::gpointer)
where P: IsA<Buffer> {
callback_guard!();
let f: &&(Fn(&P, &gtk::TextIter, &gtk::TextIter) + 'static) = transmute(f);
f(&Buffer::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(start), &from_glib_borrow(end))
}

unsafe extern "C" fn redo_trampoline<P>(this: *mut ffi::GtkSourceBuffer, f: glib_ffi::gpointer)
where P: IsA<Buffer> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Buffer::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn source_mark_updated_trampoline<P>(this: *mut ffi::GtkSourceBuffer, mark: *mut gtk_ffi::GtkTextMark, f: glib_ffi::gpointer)
where P: IsA<Buffer> {
callback_guard!();
let f: &&(Fn(&P, &gtk::TextMark) + 'static) = transmute(f);
f(&Buffer::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(mark))
}

unsafe extern "C" fn undo_trampoline<P>(this: *mut ffi::GtkSourceBuffer, f: glib_ffi::gpointer)
where P: IsA<Buffer> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Buffer::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_can_redo_trampoline<P>(this: *mut ffi::GtkSourceBuffer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Buffer> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Buffer::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_can_undo_trampoline<P>(this: *mut ffi::GtkSourceBuffer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Buffer> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Buffer::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_highlight_matching_brackets_trampoline<P>(this: *mut ffi::GtkSourceBuffer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Buffer> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Buffer::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_highlight_syntax_trampoline<P>(this: *mut ffi::GtkSourceBuffer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Buffer> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Buffer::from_glib_borrow(this).downcast_unchecked())
}

#[cfg(any(feature = "v3_14", feature = "dox"))]
unsafe extern "C" fn notify_implicit_trailing_newline_trampoline<P>(this: *mut ffi::GtkSourceBuffer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Buffer> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Buffer::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_language_trampoline<P>(this: *mut ffi::GtkSourceBuffer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Buffer> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Buffer::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_max_undo_levels_trampoline<P>(this: *mut ffi::GtkSourceBuffer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Buffer> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Buffer::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_style_scheme_trampoline<P>(this: *mut ffi::GtkSourceBuffer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Buffer> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Buffer::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_undo_manager_trampoline<P>(this: *mut ffi::GtkSourceBuffer, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Buffer> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Buffer::from_glib_borrow(this).downcast_unchecked())
}
17 changes: 16 additions & 1 deletion src/auto/completion.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb)
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
// from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70)
// DO NOT EDIT

Expand Down Expand Up @@ -455,90 +455,105 @@ impl<O: IsA<Completion> + IsA<glib::object::Object> + glib::object::ObjectExt> C

unsafe extern "C" fn activate_proposal_trampoline<P>(this: *mut ffi::GtkSourceCompletion, f: glib_ffi::gpointer)
where P: IsA<Completion> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Completion::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn hide_trampoline<P>(this: *mut ffi::GtkSourceCompletion, f: glib_ffi::gpointer)
where P: IsA<Completion> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Completion::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn move_cursor_trampoline<P>(this: *mut ffi::GtkSourceCompletion, step: gtk_ffi::GtkScrollStep, num: libc::c_int, f: glib_ffi::gpointer)
where P: IsA<Completion> {
callback_guard!();
let f: &&(Fn(&P, gtk::ScrollStep, i32) + 'static) = transmute(f);
f(&Completion::from_glib_borrow(this).downcast_unchecked(), from_glib(step), num)
}

unsafe extern "C" fn move_page_trampoline<P>(this: *mut ffi::GtkSourceCompletion, step: gtk_ffi::GtkScrollStep, num: libc::c_int, f: glib_ffi::gpointer)
where P: IsA<Completion> {
callback_guard!();
let f: &&(Fn(&P, gtk::ScrollStep, i32) + 'static) = transmute(f);
f(&Completion::from_glib_borrow(this).downcast_unchecked(), from_glib(step), num)
}

unsafe extern "C" fn populate_context_trampoline<P>(this: *mut ffi::GtkSourceCompletion, context: *mut ffi::GtkSourceCompletionContext, f: glib_ffi::gpointer)
where P: IsA<Completion> {
callback_guard!();
let f: &&(Fn(&P, &CompletionContext) + 'static) = transmute(f);
f(&Completion::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(context))
}

unsafe extern "C" fn show_trampoline<P>(this: *mut ffi::GtkSourceCompletion, f: glib_ffi::gpointer)
where P: IsA<Completion> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Completion::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_accelerators_trampoline<P>(this: *mut ffi::GtkSourceCompletion, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Completion> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Completion::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_auto_complete_delay_trampoline<P>(this: *mut ffi::GtkSourceCompletion, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Completion> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Completion::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_proposal_page_size_trampoline<P>(this: *mut ffi::GtkSourceCompletion, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Completion> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Completion::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_provider_page_size_trampoline<P>(this: *mut ffi::GtkSourceCompletion, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Completion> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Completion::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_remember_info_visibility_trampoline<P>(this: *mut ffi::GtkSourceCompletion, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Completion> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Completion::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_select_on_show_trampoline<P>(this: *mut ffi::GtkSourceCompletion, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Completion> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Completion::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_show_headers_trampoline<P>(this: *mut ffi::GtkSourceCompletion, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Completion> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Completion::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_show_icons_trampoline<P>(this: *mut ffi::GtkSourceCompletion, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Completion> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Completion::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_view_trampoline<P>(this: *mut ffi::GtkSourceCompletion, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<Completion> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&Completion::from_glib_borrow(this).downcast_unchecked())
}
5 changes: 4 additions & 1 deletion src/auto/completion_context.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb)
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
// from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70)
// DO NOT EDIT

Expand Down Expand Up @@ -117,18 +117,21 @@ impl<O: IsA<CompletionContext> + IsA<glib::object::Object> + glib::object::Objec

unsafe extern "C" fn cancelled_trampoline<P>(this: *mut ffi::GtkSourceCompletionContext, f: glib_ffi::gpointer)
where P: IsA<CompletionContext> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&CompletionContext::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_activation_trampoline<P>(this: *mut ffi::GtkSourceCompletionContext, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<CompletionContext> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&CompletionContext::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_completion_trampoline<P>(this: *mut ffi::GtkSourceCompletionContext, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<CompletionContext> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&CompletionContext::from_glib_borrow(this).downcast_unchecked())
}
3 changes: 2 additions & 1 deletion src/auto/completion_info.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb)
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
// from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70)
// DO NOT EDIT

Expand Down Expand Up @@ -86,6 +86,7 @@ impl<O: IsA<CompletionInfo> + IsA<glib::object::Object> + glib::object::ObjectEx

unsafe extern "C" fn before_show_trampoline<P>(this: *mut ffi::GtkSourceCompletionInfo, f: glib_ffi::gpointer)
where P: IsA<CompletionInfo> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&CompletionInfo::from_glib_borrow(this).downcast_unchecked())
}
9 changes: 8 additions & 1 deletion src/auto/completion_item.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb)
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
// from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70)
// DO NOT EDIT

Expand Down Expand Up @@ -296,43 +296,50 @@ impl<O: IsA<CompletionItem> + IsA<glib::object::Object>> CompletionItemExt for O
#[cfg(any(feature = "v3_18", feature = "dox"))]
unsafe extern "C" fn notify_gicon_trampoline<P>(this: *mut ffi::GtkSourceCompletionItem, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<CompletionItem> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&CompletionItem::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_icon_trampoline<P>(this: *mut ffi::GtkSourceCompletionItem, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<CompletionItem> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&CompletionItem::from_glib_borrow(this).downcast_unchecked())
}

#[cfg(any(feature = "v3_18", feature = "dox"))]
unsafe extern "C" fn notify_icon_name_trampoline<P>(this: *mut ffi::GtkSourceCompletionItem, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<CompletionItem> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&CompletionItem::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_info_trampoline<P>(this: *mut ffi::GtkSourceCompletionItem, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<CompletionItem> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&CompletionItem::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_label_trampoline<P>(this: *mut ffi::GtkSourceCompletionItem, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<CompletionItem> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&CompletionItem::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_markup_trampoline<P>(this: *mut ffi::GtkSourceCompletionItem, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<CompletionItem> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&CompletionItem::from_glib_borrow(this).downcast_unchecked())
}

unsafe extern "C" fn notify_text_trampoline<P>(this: *mut ffi::GtkSourceCompletionItem, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer)
where P: IsA<CompletionItem> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&CompletionItem::from_glib_borrow(this).downcast_unchecked())
}
3 changes: 2 additions & 1 deletion src/auto/completion_proposal.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb)
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
// from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70)
// DO NOT EDIT

Expand Down Expand Up @@ -133,6 +133,7 @@ impl<O: IsA<CompletionProposal> + IsA<glib::object::Object> + glib::object::Obje

unsafe extern "C" fn changed_trampoline<P>(this: *mut ffi::GtkSourceCompletionProposal, f: glib_ffi::gpointer)
where P: IsA<CompletionProposal> {
callback_guard!();
let f: &&(Fn(&P) + 'static) = transmute(f);
f(&CompletionProposal::from_glib_borrow(this).downcast_unchecked())
}
2 changes: 1 addition & 1 deletion src/auto/completion_provider.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb)
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
// from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70)
// DO NOT EDIT

Expand Down
Loading