summary refs log tree commit diff stats
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 52d3d23..cf04809 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -183,6 +183,8 @@
  * -[ ] ???
  */
 
+#![cfg_attr(feature="nightly_tests", feature(c_variadic))]
+
 #[macro_use]
 extern crate impl_trait;
 #[doc(hidden)]
@@ -205,6 +207,9 @@ mod extra_tests;
 mod infoid;
 mod internals;
 pub mod list;
+#[doc(hidden)]
+#[cfg(feature="nightly_tests")]
+pub mod mock;
 mod pluginfo;
 mod strip;
 mod word;
@@ -1920,7 +1925,7 @@ pub unsafe fn hexchat_plugin_init<'ph, T>(plugin_handle: LtPhPtr<'ph>,
             // must register this before the plugin registers anything else!
             let context_hook = pluginhandle.hook_print("Close Context", c_int::min_value(), move |ph, _| {
                 // just remove the context! it's that simple!
-                let ctx = unsafe { ph_call!(hexchat_get_context(ph)) };
+                let ctx = ph_call!(hexchat_get_context(ph));
                 contexts.borrow_mut().remove(&ctx);
                 EAT_NONE
             });