aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorHadriel Kaplan <hadrielk@yahoo.com>2014-02-07 23:36:31 -0500
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2014-02-08 11:31:02 +0000
commitf5554155a1acef955df56fc5da656a5d6496c59d (patch)
tree2d40dd2a4bc888cbba64817f7c50eea22e2f6d86 /epan
parent9a26416e3ecdd37c1cb54973ed4ee4e0f1ad0b7f (diff)
Fix bug 9733 ' Lua: wtap_filetypes.TSPREC_ variable names are missing from the Lua global table'
The fix for bug 9712, which involved changing the make-init-lua.pl perl script to handle the new C-code define names for filetypes in release 1.11, unfortunately also stopped matching against the timestamp define names. Arguably the timestamp ones should never have been matched to begin with, at least not by the same regex function, because they're not "filetypes". But they've been matched and exported into the Lua table forever, so we'll break backward-compat if we don't keep doing it. Ugh. The good news is I caught this bug using a new test script I wrote which verifies previous release's Lua stuff didn't disappear. I'll submit that separately when I get a chance to clean it up, hopefully next week. Change-Id: Ibf1d1da0dc4ed62cc1bacf345742dccf8ec40e30 Reviewed-on: https://code.wireshark.org/review/143 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan')
-rwxr-xr-xepan/wslua/make-init-lua.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/epan/wslua/make-init-lua.pl b/epan/wslua/make-init-lua.pl
index 2febfecdb1..0c1f54c34a 100755
--- a/epan/wslua/make-init-lua.pl
+++ b/epan/wslua/make-init-lua.pl
@@ -78,7 +78,8 @@ while(<WTAP_H>) {
$wtap_encaps_table .= "\t[\"$1\"] = $2,\n";
}
- if ( /^#define WTAP_FILE_TYPE_SUBTYPE_([A-Z0-9_]+)\s+(\d+)/ ) {
+ # this has to catch both file types and timestamp precision defines (yuck)
+ if ( /^#define WTAP_FILE_(?:TYPE_SUBTYPE_)?([A-Z0-9_]+)\s+(\d+)/ ) {
$wtap_filetypes_table .= "\t[\"$1\"] = $2,\n";
}
}