LUA libraries are LUA scripts or chunks (lua compiled files) executed with the dofile() function. To complete successfully a library must return 1. Loading a lua library is performed by the dolib() function. This function handles proper library loading. It consists on :
Functions | |
loadlib (var name, var libpath) | |
Load a lua library. | |
dolib (var name, var force, var libpath) | |
Load a lua library. | |
Variables | |
string | LIBRARY_PATH [] |
Default lua library pathes. | |
string | loaded_libraries [] |
Global loaded library table. |
|
Load a lua library. For each path stored in the libpath table, the loadlib function calls a dofile({PATH}/{NAME}.lua). It stops if the library loads properly and returns a non nil value. On success, the loaded_libraries[{NAME}] is set to 1 and the full-path is returned. On failure, the loaded_libraries[{NAME}] is unset and the function returns nil. Before starting the search, loaded_libraries[{NAME}] is set to 2. This is special value used by dolib() function to avoid circular reference.
|
|
Load a lua library.
|
dcplaya documentation version 2.0 | Generated on November 2004 by doxygen 1.3.6 |