aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tools.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tools.c b/src/tools.c
index a297913..2c8a9f0 100644
--- a/src/tools.c
+++ b/src/tools.c
@@ -1674,10 +1674,10 @@ static bool_t inter_copy_function( Universe* U, lua_State* L2, uint_t L2_cache_i
1674 1674
1675 // this function has 2 upvalues: the fqn of its metatable, and the userdata itself 1675 // this function has 2 upvalues: the fqn of its metatable, and the userdata itself
1676 lookup_table( L2, L, source_i_, mode_, upName_); // ... mt 1676 lookup_table( L2, L, source_i_, mode_, upName_); // ... mt
1677 // originally 'i' slot was the proxy closure, but from now on it indexes the actual userdata we extracted from it 1677 // originally 'source_i_' slot was the proxy closure, but from now on it indexes the actual userdata we extracted from it
1678 source_i_ = lua_gettop( L); 1678 source_i_ = lua_gettop( L);
1679 source = lua_touserdata( L, -1); 1679 source = lua_touserdata( L, -1);
1680 // call the cloning function with 1 argument, should return the number of bytes to allocate for the clone 1680 // get the number of bytes to allocate for the clone
1681 userdata_size = (size_t) lua_rawlen( L, -1); 1681 userdata_size = (size_t) lua_rawlen( L, -1);
1682 { 1682 {
1683 // extract uservalues (don't transfer them yet) 1683 // extract uservalues (don't transfer them yet)
@@ -1713,12 +1713,12 @@ static bool_t inter_copy_function( Universe* U, lua_State* L2, uint_t L2_cache_i
1713 // perform the custom cloning part 1713 // perform the custom cloning part
1714 lua_insert( L2, -2); // ... u mt 1714 lua_insert( L2, -2); // ... u mt
1715 // __lanesclone should always exist because we wouldn't be restoring data from a userdata_clone_sentinel closure to begin with 1715 // __lanesclone should always exist because we wouldn't be restoring data from a userdata_clone_sentinel closure to begin with
1716 lua_getfield(L2, -2, "__lanesclone"); // ... u mt __lanesclone 1716 lua_getfield(L2, -1, "__lanesclone"); // ... u mt __lanesclone
1717 lua_remove( L2, -2); // ... u __lanesclone 1717 lua_remove( L2, -2); // ... u __lanesclone
1718 lua_pushlightuserdata( L2, clone); // ... u __lanesclone clone 1718 lua_pushlightuserdata( L2, clone); // ... u __lanesclone clone
1719 lua_pushlightuserdata( L2, source); // ... u __lanesclone clone source 1719 lua_pushlightuserdata( L2, source); // ... u __lanesclone clone source
1720 lua_pushinteger( L2, userdata_size); // ... u __lanesclone clone source size 1720 lua_pushinteger( L2, userdata_size); // ... u __lanesclone clone source size
1721 // clone:__lanesclone(source, size) 1721 // clone:__lanesclone(dest, source, size)
1722 lua_call( L2, 3, 0); // ... u 1722 lua_call( L2, 3, 0); // ... u
1723 } 1723 }
1724 else // regular function 1724 else // regular function