wireshark/test/lua
Peter Wu 537705a8b2 wslua: prepare for split class/instance (meta)methods
Previously the metatables for classes were the same for the class and
its instances. This results in issues like calling __gc on the class
table on exit.

Make it possible to declare separate class methods (functions) and
instance methods. Observe that all attributes apply to the instances
only, so make these just available on the instance.

The attribute/methods lookup method (via __index/__newindex) have been
rewritten to use upvalues, removing the technical need for the
properties __getters/__setters/__methods. The "lua globals" test still
checks for these, but it could be removed in the future.

To fix bug 12968, the __gc method is removed from the class method.
Future patches should remove the WSLUA_REGISTER_CLASS,
WSLUA_REGISTER_META and WSLUA_REGISTER_ATTRIBUTES macros completely and
create split class functions/methods (such that __call for an instance
cannot accidentally be invoked on the class).

Removed duplicate "fragmented" property from Pinfo (which triggered an
error) and replaced exit() by g_error() for debugger friendliness.
Remove lua_shiftstring since checkstring always returns non-NULL.

Bug: 12968
Change-Id: I57f8a93d08bb84c79b0e94cf2c82d8402fc16646
Reviewed-on: https://code.wireshark.org/review/18026
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
2016-10-18 20:41:34 +00:00
..
acme_file.lua Change a lot of http:// URLs to https://. 2015-03-10 19:30:50 +00:00
common_sets.lua Add GLib's regex library into Lua 2014-03-10 07:11:12 +00:00
dir.lua Fix lua directory tests. 2014-05-21 03:17:15 +00:00
dissectFPM.lua Lua: Expose tcp_dissect_pdus() to Lua 2015-01-27 15:14:12 +00:00
dissector.lua Lua: allow a Dissector object to be passed in for register_heuristic 2014-12-31 16:01:51 +00:00
field.lua Lua: add functions for more field information 2015-07-09 01:49:11 +00:00
glib_sets.lua Add GLib's regex library into Lua 2014-03-10 07:11:12 +00:00
globals_2.2.txt wslua: prepare for split class/instance (meta)methods 2016-10-18 20:41:34 +00:00
gregex.lua Lua: regex test suite fails with UTF-8 locale 2015-01-02 13:09:16 +00:00
inspect.lua Fix spelling mistakes in Lua test scripts 2014-03-22 17:42:16 +00:00
int64.lua Remove executable bit from a few files 2014-02-24 22:34:26 +00:00
listener.lua Fix bug 6357: Lua all_field_infos() broken within tap/listener 2014-02-25 21:06:50 +00:00
luatest.lua Add GLib's regex library into Lua 2014-03-10 07:11:12 +00:00
nstime.lua Add 4 more test scripts for Lua, and its own testsuite menu 2014-02-20 18:42:13 +00:00
pat2pcre.lua Add GLib's regex library into Lua 2014-03-10 07:11:12 +00:00
pcap_file.lua For now, call the finish routine in Lua file writers "close". 2015-11-16 19:18:15 +00:00
pcre_sets.lua Add GLib's regex library into Lua 2014-03-10 07:11:12 +00:00
pcre_sets2.lua Add GLib's regex library into Lua 2014-03-10 07:11:12 +00:00
pinfo.lua Fix test script to test Lua Pinfo, and fix problem it found. 2015-01-23 01:52:24 +00:00
proto.lua Add filterable expert info for Lua 2014-03-26 05:20:17 +00:00
script_args.lua Remove executable bit from a few files 2014-02-24 22:34:26 +00:00
struct.lua Add Lua Struct.values() function, and prevent coercion in all Struct functions 2014-03-23 07:05:30 +00:00
tvb.lua Add tvb_get and proto_tree_add for string-encoded byte arrays 2014-04-17 14:04:19 +00:00
verify_dissector.lua Update Lua tests after g9eda2fa 2016-01-24 21:49:12 +00:00
verify_globals.lua Fix Bug 9870 'Lua: trying to call/get an invalid name results in a get-loop error' 2014-03-11 05:30:58 +00:00