Contents
Syntax
The syntax for
lua_pushlightuserdata(var)
@lua_pushlightuserdata(var)
Description
The
f++ example
Example of
:=(string, str) lua_pushlightuserdata(str) lua_setglobal("s") lua_addnsmfns lua { nsm_setstring(s, "hello, world!") } console(str)
Note: You can achieve essentially the same as above as follows:
:=(string, str) lua_addnsmfns lua { s = nsm_tolightuserdata("str") nsm_setstring(s, "hello, world!") } console(str)
n++ example
Example of
@:=(string, str) @lua_pushlightuserdata(str) @lua_setglobal("s") @lua_addnsmfns @lua { nsm_setstring(s, "hello, world!") } @console(str)