mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
thread and state awareness: update single
This commit is contained in:
parent
3baa99f941
commit
764b2ad7b2
|
@ -20,8 +20,8 @@
|
|||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// This file was generated with a script.
|
||||
// Generated 2017-01-02 14:35:36.677712 UTC
|
||||
// This header was generated with sol v2.15.5 (revision bacd93a)
|
||||
// Generated 2017-01-07 05:41:25.618337 UTC
|
||||
// This header was generated with sol v2.16.6 (revision 3baa99f)
|
||||
// https://github.com/ThePhD/sol2
|
||||
|
||||
#ifndef SOL_SINGLE_INCLUDE_HPP
|
||||
|
@ -3797,7 +3797,10 @@ namespace sol {
|
|||
}
|
||||
|
||||
int push(lua_State* Ls) const noexcept {
|
||||
lua_pushvalue(Ls, index);
|
||||
lua_pushvalue(lua_state(), index);
|
||||
if (Ls != lua_state()) {
|
||||
lua_xmove(lua_state(), Ls, 1);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -9667,11 +9670,18 @@ namespace sol {
|
|||
const_reverse_iterator crend() const { return std::reverse_iterator<const_iterator>(cend()); }
|
||||
|
||||
int push() const {
|
||||
push(L);
|
||||
}
|
||||
|
||||
int push(lua_State* target) const {
|
||||
int pushcount = 0;
|
||||
for (int i = index; i <= stacktop; ++i) {
|
||||
lua_pushvalue(L, i);
|
||||
pushcount += 1;
|
||||
}
|
||||
if (target != L) {
|
||||
lua_xmove(L, target, pushcount);
|
||||
}
|
||||
return pushcount;
|
||||
}
|
||||
|
||||
|
@ -9701,8 +9711,8 @@ namespace sol {
|
|||
|
||||
template <>
|
||||
struct pusher<variadic_args> {
|
||||
static int push(lua_State*, const variadic_args& ref) {
|
||||
return ref.push();
|
||||
static int push(lua_State* L, const variadic_args& ref) {
|
||||
return ref.push(L);
|
||||
}
|
||||
};
|
||||
} // stack
|
||||
|
|
Loading…
Reference in New Issue
Block a user