mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
9566defa93
This table is "just a normal Lua table". Lua code can use it in whatever way it wants to store things related to a given C object. An object (userdata) already references a "plain Lua table" via lua_setuservalue() / lua_setfenv(). This is used to keep a reference to signal functions that are connected to an object. The signal code only uses lightuserdata keys in this table. This commit adds an entry with key "data" to this table which just references another table. This is the table that is made available as .data. Via this .data property, Lua code can add own properties to C objects without having to use, for example, weak tables. The weak tables have the downside that they produce a leak if the value references the key. The new .data property does not have any such problem (no weak references are involved). This new data property is not documented, because I'd have to touch lots of files and I'm lazy. Signed-off-by: Uli Schlachter <psychon@znc.in> |
||
---|---|---|
.. | ||
array.h | ||
atoms.c | ||
atoms.h | ||
atoms.list | ||
backtrace.c | ||
backtrace.h | ||
buffer.c | ||
buffer.h | ||
luaclass.c | ||
luaclass.h | ||
lualib.c | ||
lualib.h | ||
luaobject.c | ||
luaobject.h | ||
signal.h | ||
util.c | ||
util.h | ||
version.c | ||
version.h | ||
xcursor.c | ||
xcursor.h | ||
xembed.c | ||
xembed.h | ||
xutil.c | ||
xutil.h |