elua lib: add state_from_lua_state_get doc
authorDaniel Kolesa <d.kolesa@osg.samsung.com>
Mon, 20 Apr 2015 13:47:47 +0000 (14:47 +0100)
committerDaniel Kolesa <d.kolesa@osg.samsung.com>
Wed, 6 May 2015 14:05:21 +0000 (15:05 +0100)
src/lib/elua/Elua.h

index c88d209..e764750 100644 (file)
@@ -150,6 +150,20 @@ EAPI int elua_shutdown(void);
  * @ingroup Elua
  */
 EAPI Elua_State *elua_state_new(const char *progname);
+
+/**
+ * @brief Retrieve an Elua state from a Lua state.
+ *
+ * This doesn't create a new Elua state. Instead it just retrieves an existing
+ * Elua state given a Lua state. If no Elua state could be found (for example
+ * when the Lua state was created independently of Elua), this function returns
+ * NULL.
+ *
+ * @param[in] L The Lua state.
+ * @return An Elua state or NULL.
+ *
+ * @ingroup Elua
+ */
 EAPI Elua_State *elua_state_from_lua_state_get(lua_State *L);
 
 EAPI void elua_state_free(Elua_State *es);