[ci-skip] forgot the link to the examples in the docs. Oops.

This commit is contained in:
ThePhD 2017-04-02 16:15:24 -04:00
parent 309325d0f5
commit 5f1bdf84c8

View File

@ -25,4 +25,4 @@ members
The ones from table are used here (of particular note is the ability to use ``sol::environment(my_lua_state, sol::create);`` to make a fresh, unnamed environment), plus the one unique constructor shown above. It is generally used as ``sol::environmeny my_env(my_lua_state, sol::create, my_fallback_table);``. The fallback table serves as the backup to lookup attempts on the environment table being created. It is achieved by simply creating a metatable for the ``sol::environment`` being created, and then doing ``env_metatable["__index"] = fallback;``. You can achieve fancier effects by changing the metatable of the environment to your liking, by creating it in some fashion and then setting the metatable explicitly and populating it with data, particularly with :doc:`sol::metatable_key<metatable_key>`.
.. an example demonstrating the above and more:
.. _an example demonstrating the above and more: https://github.com/ThePhD/sol2/blob/develop/examples/environments.cpp