scpt_autoload_ns
Last updated March 2020
Name
scpt_autoload_ns — Wire up autoload items, just in time
Synopsis
#include "modules/scriptlets/ec_scriptlet.h"
| int **scpt_autoload_ns** (
| thr, | |
| | name_space)
; | |
Description
Wire up autoload items, just in time.
Call this from an __index function to perform just-in-time registration of global constants and other registered items.
This reduces the initial set up time for a scriptlet VM, at the cost of an extra couple of hash lookups the first time each of these constants is accessed.
- thr
-
The Lua VM state. For more information see “scpt_thread”.
- name_space
-
The name space.
This function returns 1
if any work is performed; Otherwise it returns 0
.
It is legal to call this function in any thread.
See Also
Was this page helpful?