URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=451b93ed99505b50174a9aa2a3032868c5fd45be
Submitter: "Anders Broman <a.broman58@xxxxxxxxx>"
Changed: branch: master
Repository: wireshark
Commits:
451b93e by Jeff Morriss (jeff.morriss.ws@xxxxxxxxx):
checkAPIs: use new regex to remove comments.
The new pattern is from the Perl FAQ; it works better for me than the
old code. Of note is that it works with C++/C99-style comments
following a statement (as opposed to at the start of a line).
The new regex is only slightly slower than the old one: `make checkAPI`
goes from 3m30s of user time to 3m35s.
The big functional difference can be seen by looking at the
post-removal contents of packet-hl7.c.
Before:
struct msh { // typical/default values
char field_separator; //
char component_separator; //
char repetition_separator; //
char escape_character; // &\0\0MSH\0\0';
if (tree) {
(With the old regex we lost a lot of code!)
After:
struct msh {
char field_separator;
char component_separator;
char repetition_separator;
char escape_character;
char subcomponent_separator;
char message_type[4];
char trigger_event[4];
};
Change-Id: Iac35413d480cc7b05b820cb3b292f87ed30e6801
Reviewed-on: https://code.wireshark.org/review/30265
Petri-Dish: Jeff Morriss <jeff.morriss.ws@xxxxxxxxx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
Actions performed:
from 89d2b33 Fix capitalization of preference display name.
add 451b93e checkAPIs: use new regex to remove comments.
Summary of changes:
tools/checkAPIs.pl | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)