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>
This commit is contained in:
Hadriel Kaplan 2014-02-07 23:36:31 -05:00 committed by Alexis La Goutte
parent 9a26416e3e
commit f5554155a1
1 changed files with 2 additions and 1 deletions

View File

@ -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";
}
}