aboutsummaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorHadriel Kaplan <hadrielk@yahoo.com>2014-02-09 02:49:44 -0500
committerEvan Huus <eapache@gmail.com>2014-02-09 16:04:36 +0000
commit4e8832bb0a59aa40b85bac72a54ba00784e4229d (patch)
tree5b413088379cda4869b1e39532e60a4f9ef3d298 /services
parent0353c9a8e357f688cd8d9523ab10a95c7bc8473d (diff)
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>
Diffstat (limited to 'services')
0 files changed, 0 insertions, 0 deletions