wireshark/epan/wslua
Hadriel Kaplan 4e8832bb0a Fix bug 9736 'Lua: new Int64/UInt64 functions don't prevent division by zero'
OK, in all fairness this does a bit more than just fix that bug. It also
adds a 'Int64()' and 'UInt64()' __call metamethods. I generally dislike
using __call metamethods, because they're often unintuitive (for example
the wireshark Field and FielInfo use this in a bizarre fashion).  But this
happens to be a perfect use for it, and very natural, imho.  Another change
is to make the metatables of classes visible to scripts. There was never
really a good reason not to make them visible, and they have to be visible
to do things like use __call on a plain table... not to mention I need them
to be visible to run test scripts verifying evrything is kosher.

I also updated the test suite to test for the div/mod by zero.

Change-Id: Ia4c594c8f59d4e799090716bd032ba2815df032f
Reviewed-on: https://code.wireshark.org/review/149
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-09 16:04:36 +00:00
..
CMakeLists.txt Adds support for Lua Int64 and UInt64 operators, functions, and general 2014-02-04 00:37:46 +00:00
Makefile.am Adds support for Lua Int64 and UInt64 operators, functions, and general 2014-02-04 00:37:46 +00:00
Makefile.nmake Adds support for Lua Int64 and UInt64 operators, functions, and general 2014-02-04 00:37:46 +00:00
console.lua Update Free Software Foundation address. 2012-06-28 22:56:06 +00:00
dtd_gen.lua Update Free Software Foundation address. 2012-06-28 22:56:06 +00:00
init_wslua.c Fix for Bug-9711 Lua: the Lua stack is growing slightly during initialization. 2014-01-31 16:31:59 +00:00
init_wslua.h Add extern C for init_wslua (for future use in Wireshark Qt) 2014-01-01 14:12:38 +00:00
lua_bitop.c Fix bug 9720 'Lua: bitop library is missing in Lua 5.2' 2014-02-04 22:01:01 +00:00
lua_bitop.h In a source file that defines external functions, the header file that 2014-01-13 22:06:12 +00:00
make-init-lua.pl Fix bug 9733 ' Lua: wtap_filetypes.TSPREC_ variable names are missing from the Lua global table' 2014-02-08 11:31:02 +00:00
make-reg.pl Adds support for Lua Int64 and UInt64 operators, functions, and general 2014-02-04 00:37:46 +00:00
make-taps.pl Don't cast away constness. 2014-01-14 18:12:14 +00:00
taps Enable Lua ldap, smb and smb2 taps 2013-09-10 11:18:41 +00:00
template-init.lua Lua: Added a utility function file_exists(). 2014-01-29 16:05:48 +01:00
wslua.h Fix bug 9736 'Lua: new Int64/UInt64 functions don't prevent division by zero' 2014-02-09 16:04:36 +00:00
wslua_dumper.c Fix for Bug-9711 Lua: the Lua stack is growing slightly during initialization. 2014-01-31 16:31:59 +00:00
wslua_field.c Adds support for Lua Int64 and UInt64 operators, functions, and general 2014-02-04 00:37:46 +00:00
wslua_gui.c Fix bug 9732: ' Lua: recent commit changed some MENU_ key names in init.lua' 2014-02-08 11:29:32 +00:00
wslua_int64.c Fix bug 9736 'Lua: new Int64/UInt64 functions don't prevent division by zero' 2014-02-09 16:04:36 +00:00
wslua_listener.c Fix for Bug-9711 Lua: the Lua stack is growing slightly during initialization. 2014-01-31 16:31:59 +00:00
wslua_pinfo.c Fix for Bug-9711 Lua: the Lua stack is growing slightly during initialization. 2014-01-31 16:31:59 +00:00
wslua_proto.c Fix Bug 9728 'Lua: ProtoField.bool() VALUESTRING argument is not optional but was supposed to be' 2014-02-07 19:19:54 +00:00
wslua_tree.c Fix Bug 9728 'Lua: ProtoField.bool() VALUESTRING argument is not optional but was supposed to be' 2014-02-07 19:19:54 +00:00
wslua_tvb.c Fix Bug 9728 'Lua: ProtoField.bool() VALUESTRING argument is not optional but was supposed to be' 2014-02-07 19:19:54 +00:00
wslua_util.c Adds support for Lua Int64 and UInt64 operators, functions, and general 2014-02-04 00:37:46 +00:00