diff options
author | Michael Mann <mmann78@netscape.net> | 2013-02-25 22:05:28 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2013-02-25 22:05:28 +0000 |
commit | 2c7844cc69aec2c3decbb1802598d17f1e03b1d3 (patch) | |
tree | 39d458825fde882b1337c3962e976adc7b8764cc /epan/wslua/template-init.lua | |
parent | 6dbd0b68e47b4b029be1299a0f5c7cdbb39cd8e4 (diff) |
Fix typos/errors and make Lua API more consistent.
From Hadriel Kaplan, bug 8393 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8393)
svn path=/trunk/; revision=47885
Diffstat (limited to 'epan/wslua/template-init.lua')
-rw-r--r-- | epan/wslua/template-init.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/epan/wslua/template-init.lua b/epan/wslua/template-init.lua index 46051f1788..e15bc863ee 100644 --- a/epan/wslua/template-init.lua +++ b/epan/wslua/template-init.lua @@ -59,6 +59,11 @@ if gui_enabled() then print = info end +function typeof(obj) + local mt = getmetatable(obj) + return mt and mt.__typeof or type(obj) +end + -- %WTAP_ENCAPS% -- %FT_TYPES% |