summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/sol2/docs/source/api/reference.rst
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2017-02-05 16:01:50 +0100
committer Miodrag Milanovic <mmicko@gmail.com>2017-02-05 16:06:06 +0100
commitac096aa2a0921efde96b76252dffb119dcf27efc (patch)
tree2ad9a28a7f6babce8cfcbf5995e3e055ff13ff60 /3rdparty/sol2/docs/source/api/reference.rst
parent29df715138452ee18ba19ec4b07e18c4b3185de7 (diff)
Update sol2 (nw)
Diffstat (limited to '3rdparty/sol2/docs/source/api/reference.rst')
-rw-r--r--3rdparty/sol2/docs/source/api/reference.rst5
1 files changed, 4 insertions, 1 deletions
diff --git a/3rdparty/sol2/docs/source/api/reference.rst b/3rdparty/sol2/docs/source/api/reference.rst
index 37886dc2300..57869de7db0 100644
--- a/3rdparty/sol2/docs/source/api/reference.rst
+++ b/3rdparty/sol2/docs/source/api/reference.rst
@@ -20,8 +20,11 @@ members
:caption: constructor: reference
reference(lua_State* L, int index = -1);
+ reference(lua_State* L, ref_index index);
+ template <typename Object>
+ reference(Object&& o);
-Creates a reference from the Lua stack at the specified index, saving it into the metatable registry. This constructor is exposed on all types that derive from ``sol::reference``.
+The first constructor creates a reference from the Lua stack at the specified index, saving it into the metatable registry. The second attemtps to register something that already exists in the registry. The third attempts to reference a pre-existing object and create a reference to it. These constructors are exposed on all types that derive from ``sol::reference``, meaning that you can grab tables, functions, and coroutines from the registry, stack, or from other objects easily.
.. code-block:: cpp
:caption: function: push referred-to element from the stack