LUA_PUSHLIGHTUSERDATA(3) Library Functions Manual LUA_PUSHLIGHTUSERDATA(3)

lua_pushlightuserdatapushes a light userdata onto the stack, function indicator [-0, +1, -]

#include <lua.h>

void
lua_pushlightuserdata(lua_State *L, void *p);

() pushes a light userdata onto the stack.

Userdata represent C values in Lua. A represents a pointer. It is a value (like a number): you do not create it, it has no individual metatable, and it is not collected (as it was never created). A light userdata is equal to "any" light userdata with the same C address.

Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes, Lua 5.1 Reference Manual.

The lua_pushlightuserdata() manual page is based on Lua Reference Manual 5.1 and was created by Sergey Bronnikov.

July 18, 2022 Debian