aboutsummaryrefslogtreecommitdiffstats
path: root/epan/wslua/template-init.lua
diff options
context:
space:
mode:
authorHadriel Kaplan <hadrielk@yahoo.com>2014-02-02 22:49:30 -0500
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2014-02-14 10:11:50 +0000
commitc4f1777a97415b8b7d76eda27dcd6f238501e5f3 (patch)
treecbbd054deb3b70052b9cf95e655378b941005e43 /epan/wslua/template-init.lua
parent7a503703ac0c4ce5bc00225d6cd61d83c1ff947e (diff)
Adds support for Lua struct library so one can pack/unpack binary structures
This is based on Roberto Ierusalimschy's struct library, along with additional options based on Flemming Madsen's patch to the lua-users mailing list, and some changes I made to support 64-bit integer packing/unpacking. Details are in the top comments for wslua_struct.c. This also includes a test script. Change-Id: Ifcd0116ba013d5c760927721c8d6e9f28965534b Reviewed-on: https://code.wireshark.org/review/98 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/wslua/template-init.lua')
-rw-r--r--epan/wslua/template-init.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/wslua/template-init.lua b/epan/wslua/template-init.lua
index 74380263d9..f036c2460a 100644
--- a/epan/wslua/template-init.lua
+++ b/epan/wslua/template-init.lua
@@ -61,7 +61,7 @@ end
function typeof(obj)
local mt = getmetatable(obj)
- return mt and mt.__typeof or type(obj)
+ return mt and mt.__typeof or obj.__typeof or type(obj)
end
function file_exists(name)