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

Commit 1845366

Browse files
Merge pull request #43 from EPashkin/restore_callback_guard
Revert "Remove callback_guard"
2 parents d414e32 + 3a4b2ab commit 1845366

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+241
-44
lines changed

sourceview-sys/build.rs

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ fn find() -> Result<(), Error> {
5353

5454
let mut config = Config::new();
5555
config.atleast_version(version);
56+
config.print_system_libs(false);
5657
if hardcode_shared_libs {
5758
config.cargo_metadata(false);
5859
}

sourceview-sys/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This file was generated by gir (https://github.com/gtk-rs/gir @ ea993ed)
1+
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
22
// from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70)
33
// DO NOT EDIT
44

src/auto/buffer.rs

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb)
1+
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
22
// from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70)
33
// DO NOT EDIT
44

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

527527
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)
528528
where P: IsA<Buffer> {
529+
callback_guard!();
529530
let f: &&(Fn(&P, &gtk::TextIter, &gtk::TextIter) + 'static) = transmute(f);
530531
f(&Buffer::from_glib_borrow(this).downcast_unchecked(), &from_glib_borrow(start), &from_glib_borrow(end))
531532
}
532533

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

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

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

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

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

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

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

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

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

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

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

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

src/auto/completion.rs

+16-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb)
1+
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
22
// from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70)
33
// DO NOT EDIT
44

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

src/auto/completion_context.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb)
1+
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
22
// from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70)
33
// DO NOT EDIT
44

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

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

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

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

src/auto/completion_info.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb)
1+
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
22
// from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70)
33
// DO NOT EDIT
44

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

8787
unsafe extern "C" fn before_show_trampoline<P>(this: *mut ffi::GtkSourceCompletionInfo, f: glib_ffi::gpointer)
8888
where P: IsA<CompletionInfo> {
89+
callback_guard!();
8990
let f: &&(Fn(&P) + 'static) = transmute(f);
9091
f(&CompletionInfo::from_glib_borrow(this).downcast_unchecked())
9192
}

src/auto/completion_item.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb)
1+
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
22
// from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70)
33
// DO NOT EDIT
44

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

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

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

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

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

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

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

src/auto/completion_proposal.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb)
1+
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
22
// from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70)
33
// DO NOT EDIT
44

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

134134
unsafe extern "C" fn changed_trampoline<P>(this: *mut ffi::GtkSourceCompletionProposal, f: glib_ffi::gpointer)
135135
where P: IsA<CompletionProposal> {
136+
callback_guard!();
136137
let f: &&(Fn(&P) + 'static) = transmute(f);
137138
f(&CompletionProposal::from_glib_borrow(this).downcast_unchecked())
138139
}

src/auto/completion_provider.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This file was generated by gir (https://github.com/gtk-rs/gir @ 8b9d0bb)
1+
// This file was generated by gir (https://github.com/gtk-rs/gir @ fbb95f4)
22
// from gir-files (https://github.com/gtk-rs/gir-files @ 77d1f70)
33
// DO NOT EDIT
44

0 commit comments

Comments
 (0)