Skip to content

Commit

Permalink
thread and state awareness: update single
Browse files Browse the repository at this point in the history
  • Loading branch information
ThePhD committed Jan 7, 2017
1 parent 3baa99f commit 764b2ad
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions single/sol/sol.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 764b2ad

Please sign in to comment.