diff options
author | Benoit Germain <benoit.germain@ubisoft.com> | 2025-09-30 15:06:21 +0200 |
---|---|---|
committer | Benoit Germain <benoit.germain@ubisoft.com> | 2025-09-30 15:06:21 +0200 |
commit | ae43a00657a6505910010bdf920c9c0f4823a9c0 (patch) | |
tree | 198f7e3d816ac99152a94f5fe3a5328117a36a8e /src | |
parent | f011dcafb0f583c89ed9971238fd83ddcbdb5438 (diff) | |
download | lanes-master.tar.gz lanes-master.tar.bz2 lanes-master.zip |
As demonstrated by the unit tests, there is no problem with using a function or a userdata as a table key, as long as they are transferable
Diffstat (limited to 'src')
-rw-r--r-- | src/intercopycontext.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/intercopycontext.cpp b/src/intercopycontext.cpp index 7fb2706..61ce08f 100644 --- a/src/intercopycontext.cpp +++ b/src/intercopycontext.cpp | |||
@@ -937,10 +937,6 @@ void InterCopyContext::interCopyBoolean() const | |||
937 | [[nodiscard]] | 937 | [[nodiscard]] |
938 | bool InterCopyContext::interCopyFunction() const | 938 | bool InterCopyContext::interCopyFunction() const |
939 | { | 939 | { |
940 | if (vt == VT::KEY) { | ||
941 | return false; | ||
942 | } | ||
943 | |||
944 | STACK_CHECK_START_REL(L1, 0); | 940 | STACK_CHECK_START_REL(L1, 0); |
945 | STACK_CHECK_START_REL(L2, 0); | 941 | STACK_CHECK_START_REL(L2, 0); |
946 | DEBUGSPEW_CODE(DebugSpew(nullptr) << "FUNCTION " << name << std::endl); | 942 | DEBUGSPEW_CODE(DebugSpew(nullptr) << "FUNCTION " << name << std::endl); |
@@ -1169,9 +1165,6 @@ InterCopyOneResult InterCopyContext::interCopyUserdata() const | |||
1169 | { | 1165 | { |
1170 | STACK_CHECK_START_REL(L1, 0); | 1166 | STACK_CHECK_START_REL(L1, 0); |
1171 | STACK_CHECK_START_REL(L2, 0); | 1167 | STACK_CHECK_START_REL(L2, 0); |
1172 | if (vt == VT::KEY) { | ||
1173 | return InterCopyOneResult::NotCopied; | ||
1174 | } | ||
1175 | 1168 | ||
1176 | // try clonable userdata first | 1169 | // try clonable userdata first |
1177 | if (tryCopyClonable()) { | 1170 | if (tryCopyClonable()) { |