diff options
| author | Benoit Germain <benoit.germain@ubisoft.com> | 2024-06-14 17:00:01 +0200 |
|---|---|---|
| committer | Benoit Germain <benoit.germain@ubisoft.com> | 2024-06-14 17:00:01 +0200 |
| commit | 7d65cec0385b6dcaf3346d3f862efb5eb07ad14a (patch) | |
| tree | 230de536a854b62017c54d3dffdd147f68bda0e4 /src/intercopycontext.cpp | |
| parent | 28ffb99fe2d9a4df1c60d35a39de47992076167f (diff) | |
| download | lanes-7d65cec0385b6dcaf3346d3f862efb5eb07ad14a.tar.gz lanes-7d65cec0385b6dcaf3346d3f862efb5eb07ad14a.tar.bz2 lanes-7d65cec0385b6dcaf3346d3f862efb5eb07ad14a.zip | |
Handle std::ignore cases that should not be ignored
Diffstat (limited to 'src/intercopycontext.cpp')
| -rw-r--r-- | src/intercopycontext.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/intercopycontext.cpp b/src/intercopycontext.cpp index 285ca9b..34a1c95 100644 --- a/src/intercopycontext.cpp +++ b/src/intercopycontext.cpp | |||
| @@ -913,7 +913,10 @@ LuaType InterCopyContext::processConversion() const | |||
| 913 | // perform the custom cloning part | 913 | // perform the custom cloning part |
| 914 | lua_insert(L2, -2); // L2: ... u mt | 914 | lua_insert(L2, -2); // L2: ... u mt |
| 915 | // __lanesclone should always exist because we wouldn't be restoring data from a userdata_clone_sentinel closure to begin with | 915 | // __lanesclone should always exist because we wouldn't be restoring data from a userdata_clone_sentinel closure to begin with |
| 916 | std::ignore = luaG_getfield(L2, -1, "__lanesclone"); // L2: ... u mt __lanesclone | 916 | LuaType const _funcType{ luaG_getfield(L2, -1, "__lanesclone") }; // L2: ... u mt __lanesclone |
| 917 | if (_funcType != LuaType::FUNCTION) { | ||
| 918 | raise_luaL_error(getErrL(), "INTERNAL ERROR: __lanesclone is a %s, not a function", luaG_typename(L2, _funcType).data()); | ||
| 919 | } | ||
| 917 | lua_remove(L2, -2); // L2: ... u __lanesclone | 920 | lua_remove(L2, -2); // L2: ... u __lanesclone |
| 918 | lua_pushlightuserdata(L2, _clone); // L2: ... u __lanesclone clone | 921 | lua_pushlightuserdata(L2, _clone); // L2: ... u __lanesclone clone |
| 919 | lua_pushlightuserdata(L2, _source); // L2: ... u __lanesclone clone source | 922 | lua_pushlightuserdata(L2, _source); // L2: ... u __lanesclone clone source |
