diff --git a/src/client.rs b/src/client.rs index cbe2929180..e89dc4f053 100644 --- a/src/client.rs +++ b/src/client.rs @@ -245,7 +245,7 @@ impl JanetClient { /// # } /// ``` #[inline] - pub fn add_c_fn(&mut self, cfun_opt: CFunOptions) { + pub fn add_c_fn(&mut self, cfun_opt: CFunOptions<'static>) { if self.env().is_none() { self.env_table = Some(JanetEnvironment::default()); } diff --git a/src/env.rs b/src/env.rs index 30dfeab9fd..b5e30fd79d 100644 --- a/src/env.rs +++ b/src/env.rs @@ -90,7 +90,7 @@ impl JanetEnvironment { /// Add a C function in the environment and register it on the VM. #[crate::cjvg("1.0.0", "1.17.0")] #[inline] - pub fn add_c_fn(&mut self, cfun_opt: CFunOptions) { + pub fn add_c_fn(&mut self, cfun_opt: CFunOptions<'static>) { let namespace = cfun_opt .namespace .map(|s| s.as_ptr()) @@ -121,7 +121,7 @@ impl JanetEnvironment { /// Add a C function in the environment and register it on the VM. #[crate::cjvg("1.17.0")] #[inline] - pub fn add_c_fn(&mut self, cfun_opt: CFunOptions) { + pub fn add_c_fn(&mut self, cfun_opt: CFunOptions<'static>) { let namespace = cfun_opt .namespace .map(|s| s.as_ptr())