summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/sol2/docs/source/api/stack_reference.rst
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-10-07 14:43:09 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2016-10-07 14:43:09 +0200
commit377472a6dd2c9bdff4d5667f5789c49aee2abb4c (patch)
treea0ce4d6fc3db1524609efc61307d48448e703f38 /3rdparty/sol2/docs/source/api/stack_reference.rst
parent1335933ce00cf6095e403a24d0b1dd9e0b565650 (diff)
Added sol2 header only library as future replacement for luabridge (nw)
Diffstat (limited to '3rdparty/sol2/docs/source/api/stack_reference.rst')
-rw-r--r--3rdparty/sol2/docs/source/api/stack_reference.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/3rdparty/sol2/docs/source/api/stack_reference.rst b/3rdparty/sol2/docs/source/api/stack_reference.rst
new file mode 100644
index 00000000000..db5359d11aa
--- /dev/null
+++ b/3rdparty/sol2/docs/source/api/stack_reference.rst
@@ -0,0 +1,8 @@
+stack_reference
+===============
+zero-overhead object on the stack
+---------------------------------
+
+When you work with a :doc:`sol::reference<reference>`, the object gotten from the stack has a reference to it made in the registry, keeping it alive. If you want to work with the Lua stack directly without having any additional references made, ``sol::stack_reference`` is for you. Its API is identical to ``sol::reference`` in every way, except it contains a ``int stack_index()`` member function that allows you to retrieve the stack index.
+
+All of the base types have ``stack`` versions of themselves, and the APIs are identical to their non-stack forms. This includes :doc:`sol::stack_table<table>`, :doc:`sol::stack_function<function>`, :doc:`sol::stack_protected_function<protected_function>`, :doc:`sol::stack_(light\_)userdata<userdata>` and :doc:`sol::stack_object<object>`. \ No newline at end of file