Add lifetimes to GlobalRuntimeState and EvalState for future needs.

This commit is contained in:
Stephen Chung
2022-01-22 17:48:07 +08:00
parent c32ace40a4
commit fb0b071fe0
7 changed files with 29 additions and 21 deletions

View File

@@ -65,7 +65,7 @@ pub struct NativeCallContext<'a> {
/// Function source, if any.
source: Option<&'a str>,
/// The current [`GlobalRuntimeState`], if any.
global: Option<&'a GlobalRuntimeState>,
global: Option<&'a GlobalRuntimeState<'a>>,
/// The current stack of loaded [modules][Module].
lib: &'a [&'a Module],
/// [Position] of the function call.
@@ -77,7 +77,7 @@ impl<'a, M: AsRef<[&'a Module]> + ?Sized, S: AsRef<str> + 'a + ?Sized>
&'a Engine,
&'a S,
Option<&'a S>,
&'a GlobalRuntimeState,
&'a GlobalRuntimeState<'a>,
&'a M,
Position,
)> for NativeCallContext<'a>