I program well, I swear. .-.

This commit is contained in:
ThePhD 2016-03-14 17:12:03 -04:00
parent 3de38f8da1
commit 0c42c203c9
4 changed files with 30 additions and 1 deletions

View File

@ -73,4 +73,25 @@ Get either the global table or the Lua registry as a :doc:`sol::table<table>`, w
Overrides the panic function Lua calls when something unrecoverable or unexpected happens in the Lua VM. Must be a function of the that matches the ``int(*)(lua_State*)`` function signature.
.. code-block:: cpp
:caption: function: make a thread
thread create();
static thread create (lua_State* L);
Creates a thread. Forwards its arguments to :ref:`thread::create<thread-create>`.
.. code-block:: cpp
:caption: function: make a table
table create_table(int narr = 0, int nrec = 0);
template <typename Key, typename Value, typename... Args>
table create_table(int narr, int nrec, Key&& key, Value&& value, Args&&... args);
static table create_table(lua_State* L, int narr = 0, int nrec = 0);
template <typename Key, typename Value, typename... Args>
static table create_table(lua_State* L, int narr, int nrec, Key&& key, Value&& value, Args&&... args);
Creates a table. Forwards its arguments to :ref:`table::create<table-create>`.
.. _standard lua libraries: http://www.lua.org/manual/5.2/manual.html#6

View File

@ -109,7 +109,12 @@ Sets the desired function to the specified key value. Note that it also allows f
.. code-block:: cpp
:caption: function: create a table with defaults
:name: table-create
table create(int narr = 0, int nrec = 0);
template <typename Key, typename Value, typename... Args>
table create(int narr, int nrec, Key&& key, Value&& value, Args&&... args);
static table create(lua_State* L, int narr = 0, int nrec = 0);
template <typename Key, typename Value, typename... Args>
static table create(lua_State* L, int narr, int nrec, Key&& key, Value&& value, Args&&... args);

View File

@ -36,8 +36,10 @@ This function retrieves the ``lua_State*`` that represents the thread.
Retrieves the :doc:`thread status<types>` that describes the current state of the thread.
.. code-block:: cpp
:caption: thread creation
:caption: function: thread creation
:name: thread-create
thread create();
static thread create (lua_State* L);
Creates a new thread from the given a ``lua_State*``.

View File

@ -24,6 +24,7 @@
#include "error.hpp"
#include "table.hpp"
#include "thread.hpp"
#include <memory>
namespace sol {