awesome/common
Uli Schlachter 9566defa93 C: Add a .data table to all C objects
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>
2016-09-30 11:07:55 +02:00
..
array.h Deprecate signal_add() on C-API objects 2016-06-04 17:51:45 +02:00
atoms.c remove encoding=utf-8 from modelines 2011-09-11 17:34:09 +02:00
atoms.h remove encoding=utf-8 from modelines 2011-09-11 17:34:09 +02:00
atoms.list Keep client order across restarts 2015-07-27 13:47:09 +02:00
backtrace.c remove encoding=utf-8 from modelines 2011-09-11 17:34:09 +02:00
backtrace.h remove encoding=utf-8 from modelines 2011-09-11 17:34:09 +02:00
buffer.c Add a vim modeline to all C source 2015-12-12 17:42:16 +01:00
buffer.h Add a vim modeline to all C source 2015-12-12 17:42:16 +01:00
luaclass.c C: Add a .data table to all C objects 2016-09-30 11:07:55 +02:00
luaclass.h Deprecate signal_add() on C-API objects 2016-06-04 17:51:45 +02:00
lualib.c Add a vim modeline to all C source 2015-12-12 17:42:16 +01:00
lualib.h minor: fix/improve doc comments 2015-07-12 17:42:53 +02:00
luaobject.c Fix disconnecting not connected signals (#950) 2016-06-09 00:03:08 +02:00
luaobject.h C: Add a .data table to all C objects 2016-09-30 11:07:55 +02:00
signal.h Test & fix a bug with dbus.disconnect_signal (#1096) 2016-09-18 12:50:40 +02:00
util.c Add timestamps to messages on stderr (#602) 2015-12-31 15:38:17 +01:00
util.h Add timestamps to messages on stderr (#602) 2015-12-31 15:38:17 +01:00
version.c Print LuaJIT version in --version (#996) 2016-07-09 19:05:44 +02:00
version.h Add a vim modeline to all C source 2015-12-12 17:42:16 +01:00
xcursor.c Switch from libXcursor to libxcb-cursor 2013-09-19 16:48:10 +02:00
xcursor.h Switch from libXcursor to libxcb-cursor 2013-09-19 16:48:10 +02:00
xembed.c Properly support the XEMBED_MAPPED bit 2016-05-31 08:55:42 +02:00
xembed.h Clean up header includes 2014-03-30 20:07:48 +02:00
xutil.c Remove some unused fields from globalconf 2015-12-22 17:25:45 +01:00
xutil.h xutil.h: Add defines for valid coordinates and sizes 2016-04-17 13:48:24 +02:00