From 66499a912cbf7ca0205b68a17b430070ef94bc49 Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Thu, 2 May 2024 11:24:10 +0200 Subject: InterCopyContext always raises errors in a non-Keeper state --- src/tools.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/tools.h') diff --git a/src/tools.h b/src/tools.h index f5fdabc..9d4ed4c 100644 --- a/src/tools.h +++ b/src/tools.h @@ -42,6 +42,10 @@ class InterCopyContext char const* name; // that one can change when we reuse the context private: + // when mode == LookupMode::FromKeeper, L1 is a keeper state and L2 is not, therefore L2 is the state where we want to raise the error + // whon mode != LookupMode::FromKeeper, L1 is not a keeper state, therefore L1 is the state where we want to raise the error + lua_State* getErrL() const { return (mode == LookupMode::FromKeeper) ? L2 : L1; } + // for use in copy_cached_func void copy_func() const; void lookup_native_func() const; -- cgit v1.2.3-55-g6feb