diff options
Diffstat (limited to 'src/intercopycontext.cpp')
-rw-r--r-- | src/intercopycontext.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/intercopycontext.cpp b/src/intercopycontext.cpp index 7244ed8..06cafbd 100644 --- a/src/intercopycontext.cpp +++ b/src/intercopycontext.cpp | |||
@@ -671,7 +671,7 @@ LuaType InterCopyContext::processConversion() const | |||
671 | 671 | ||
672 | [[nodiscard]] bool InterCopyContext::tryCopyClonable() const | 672 | [[nodiscard]] bool InterCopyContext::tryCopyClonable() const |
673 | { | 673 | { |
674 | SourceIndex const _L1_i{ luaG_absindex(L1, L1_i) }; | 674 | SourceIndex const _L1_i{ luaG_absindex(L1, L1_i).value() }; |
675 | void* const _source{ lua_touserdata(L1, _L1_i) }; | 675 | void* const _source{ lua_touserdata(L1, _L1_i) }; |
676 | 676 | ||
677 | STACK_CHECK_START_REL(L1, 0); | 677 | STACK_CHECK_START_REL(L1, 0); |
@@ -740,7 +740,7 @@ LuaType InterCopyContext::processConversion() const | |||
740 | // assign uservalues | 740 | // assign uservalues |
741 | UserValueIndex _uvi{ _nuv.value() }; | 741 | UserValueIndex _uvi{ _nuv.value() }; |
742 | while (_uvi > 0) { | 742 | while (_uvi > 0) { |
743 | _c.L1_i = SourceIndex{ luaG_absindex(L1, kIdxTop) }; | 743 | _c.L1_i = SourceIndex{ luaG_absindex(L1, kIdxTop).value() }; |
744 | if (_c.interCopyOne() != InterCopyResult::Success) { // L2: ... u uv | 744 | if (_c.interCopyOne() != InterCopyResult::Success) { // L2: ... u uv |
745 | raise_luaL_error(getErrL(), "Cannot copy upvalue type '%s'", luaL_typename(L1, -1)); | 745 | raise_luaL_error(getErrL(), "Cannot copy upvalue type '%s'", luaL_typename(L1, -1)); |
746 | } | 746 | } |
@@ -798,7 +798,7 @@ LuaType InterCopyContext::processConversion() const | |||
798 | STACK_GROW(L2, _nuv); | 798 | STACK_GROW(L2, _nuv); |
799 | UserValueIndex _uvi{ _nuv.value() }; | 799 | UserValueIndex _uvi{ _nuv.value() }; |
800 | while (_uvi) { | 800 | while (_uvi) { |
801 | _c.L1_i = SourceIndex{ luaG_absindex(L1, kIdxTop) }; | 801 | _c.L1_i = SourceIndex{ luaG_absindex(L1, kIdxTop).value() }; |
802 | if (_c.interCopyOne() != InterCopyResult::Success) { // L1: ... deep ... [uv]* L2: deep uv | 802 | if (_c.interCopyOne() != InterCopyResult::Success) { // L1: ... deep ... [uv]* L2: deep uv |
803 | raise_luaL_error(getErrL(), "Cannot copy upvalue type '%s'", luaL_typename(L1, -1)); | 803 | raise_luaL_error(getErrL(), "Cannot copy upvalue type '%s'", luaL_typename(L1, -1)); |
804 | } | 804 | } |
@@ -882,7 +882,7 @@ LuaType InterCopyContext::processConversion() const | |||
882 | InterCopyContext _c{ *this }; | 882 | InterCopyContext _c{ *this }; |
883 | UserValueIndex _uvi{ _nuv.value() }; | 883 | UserValueIndex _uvi{ _nuv.value() }; |
884 | while (_uvi > 0) { | 884 | while (_uvi > 0) { |
885 | _c.L1_i = SourceIndex{ luaG_absindex(L1, kIdxTop) }; | 885 | _c.L1_i = SourceIndex{ luaG_absindex(L1, kIdxTop).value() }; |
886 | if (_c.interCopyOne() != InterCopyResult::Success) { // L2: ... mt u uv | 886 | if (_c.interCopyOne() != InterCopyResult::Success) { // L2: ... mt u uv |
887 | raise_luaL_error(getErrL(), "Cannot copy upvalue type '%s'", luaL_typename(L1, -1)); | 887 | raise_luaL_error(getErrL(), "Cannot copy upvalue type '%s'", luaL_typename(L1, -1)); |
888 | } | 888 | } |
@@ -1301,10 +1301,10 @@ namespace { | |||
1301 | for (StackIndex _i{ (L1_i != 0) ? L1_i.value() : (_top_L1 - n_ + 1) }, _j{ 1 }; _j <= n_; ++_i, ++_j) { | 1301 | for (StackIndex _i{ (L1_i != 0) ? L1_i.value() : (_top_L1 - n_ + 1) }, _j{ 1 }; _j <= n_; ++_i, ++_j) { |
1302 | char _tmpBuf[16]; | 1302 | char _tmpBuf[16]; |
1303 | if (U->verboseErrors) { | 1303 | if (U->verboseErrors) { |
1304 | sprintf(_tmpBuf, "arg_%d", _j.operator int()); | 1304 | sprintf(_tmpBuf, "arg_%d", _j.value()); |
1305 | _c.name = _tmpBuf; | 1305 | _c.name = _tmpBuf; |
1306 | } | 1306 | } |
1307 | _c.L1_i = SourceIndex{ _i }; | 1307 | _c.L1_i = SourceIndex{ _i.value() }; |
1308 | _copyok = _c.interCopyOne(); // L2: ... cache {}n | 1308 | _copyok = _c.interCopyOne(); // L2: ... cache {}n |
1309 | if (_copyok != InterCopyResult::Success) { | 1309 | if (_copyok != InterCopyResult::Success) { |
1310 | break; | 1310 | break; |