Handle FreeFunctions outside with_api_handle_types

It is a singleton which doesn't actually need to be passed through over
the bridge.
This commit is contained in:
bjorn3 2025-10-03 21:27:26 +00:00
parent ef819e49a8
commit dabae7eea4
2 changed files with 4 additions and 2 deletions

View file

@ -120,6 +120,7 @@ impl fmt::Debug for Span {
}
}
pub(crate) use super::FreeFunctions;
pub(crate) use super::symbol::Symbol;
macro_rules! define_client_side {

View file

@ -49,7 +49,6 @@ macro_rules! with_api {
($S:ident, $self:ident, $m:ident) => {
$m! {
FreeFunctions {
fn drop($self: $S::FreeFunctions);
fn injected_env_var(var: &str) -> Option<String>;
fn track_env_var(var: &str, value: Option<&str>);
fn track_path(path: &str);
@ -109,7 +108,7 @@ macro_rules! with_api_handle_types {
($m:ident) => {
$m! {
'owned:
FreeFunctions,
// FreeFunctions is handled manually
TokenStream,
'interned:
@ -119,6 +118,8 @@ macro_rules! with_api_handle_types {
};
}
pub(crate) struct FreeFunctions;
#[allow(unsafe_code)]
mod arena;
#[allow(unsafe_code)]