Wireshark-commits: [Wireshark-commits] master 4e8832b: Fix bug 9736 'Lua: new Int64/UInt64 function

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Mon, 10 Feb 2014 19:41:07 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=4e8832bb0a59aa40b85bac72a54ba00784e4229d
Submitter: Evan Huus (eapache@xxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

4e8832b by Hadriel Kaplan (hadrielk@xxxxxxxxx):

      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@xxxxxxxxx>
      

Actions performed:

      from  0353c9a   Fix Bug 6489 to stop compiler warning on gcrypt deprecated delcarations
      adds  4e8832b   Fix bug 9736 'Lua: new Int64/UInt64 functions don't prevent division by zero'


Summary of changes:
 epan/wslua/wslua.h       |    7 ++---
 epan/wslua/wslua_int64.c |   74 ++++++++++++++++++++++++++++++++++------------
 test/lua/int64.lua       |   66 +++++++++++++++++++++++++++++++----------
 3 files changed, 108 insertions(+), 39 deletions(-)