From 511765c734ad06a67a5a7af74a8c4e00d216e1ef Mon Sep 17 00:00:00 2001 From: Jeffrey Quesnelle Date: Wed, 17 Oct 2018 14:29:30 -0400 Subject: [PATCH 1/3] Pop stack element used as argument of lua_topointer --- sol/reference.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/sol/reference.hpp b/sol/reference.hpp index 0693a434..2d26c9c3 100644 --- a/sol/reference.hpp +++ b/sol/reference.hpp @@ -432,6 +432,7 @@ namespace sol { const void* pointer() const noexcept { int si = push(); const void* vp = lua_topointer(lua_state(), -si); + pop(); return vp; } From 2ebbe5de86e6c78972a43ca1e5f3e975ee21f44b Mon Sep 17 00:00:00 2001 From: Jeffrey Quesnelle Date: Wed, 17 Oct 2018 14:40:18 -0400 Subject: [PATCH 2/3] Pop the correct element that was pushed --- sol/reference.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sol/reference.hpp b/sol/reference.hpp index 2d26c9c3..4f517ebf 100644 --- a/sol/reference.hpp +++ b/sol/reference.hpp @@ -432,7 +432,7 @@ namespace sol { const void* pointer() const noexcept { int si = push(); const void* vp = lua_topointer(lua_state(), -si); - pop(); + lua_pop(this->lua_state(), si); return vp; } From 3f49a4e2de578d391cf56e00cb51feff84aaf7a2 Mon Sep 17 00:00:00 2001 From: ThePhD Date: Thu, 25 Oct 2018 01:52:37 -0400 Subject: [PATCH 3/3] Update README --- README.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index a4094a84..576d04bf 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Find it [here](http://sol2.rtfd.io/). A run-through kind of tutorial is [here](h ## Sneak Peek ```cpp -#include +#include #include int main() { @@ -29,7 +29,7 @@ int main() { ``` ```cpp -#include +#include #include struct vars { @@ -49,12 +49,9 @@ More examples are given in the examples directory [here](https://github.com/TheP ## Supporting -You can [donate to support Sol and the project](https://www.paypal.me/LMeneide), which is always appreciated! This is a time-consuming effort, so individuals who donate get to: +Help the project grow on [patreon](https://www.patreon.com/thephd)! -- steer the direction and time spent on sol -- get a role on the Discord server -- get their name put up in the CONTRIBUTORS list -- put something of their choice on sol2's README or the documentation's front page +You can also [donate to support Sol](https://www.paypal.me/LMeneide), which is always appreciated! There are reward tiers for patrons on patreon, too! You can also help out the library by submitting pull requests to fix anything or add anything you think would be helpful! This includes making small, useful examples of something you haven't seen, or fixing typos and bad code in the documentation.