diff --git a/epan/proto.h b/epan/proto.h index fc38254e44..2401edc421 100644 --- a/epan/proto.h +++ b/epan/proto.h @@ -78,6 +78,9 @@ struct expert_field; /** Make a const val64_string[] look like a _val64_string pointer, used to set header_field_info.strings */ #define VALS64(x) (const struct _val64_string*)(x) +/** Something to satisfy checkAPIs when you have a pointer to a value_string_ext (e.g., one built with value_string_ext_new()) */ +#define VALS_EXT_PTR(x) (x) + /** Make a const true_false_string[] look like a _true_false_string pointer, used to set header_field_info.strings */ #define TFS(x) (const struct true_false_string*)(x) diff --git a/tools/checkAPIs.pl b/tools/checkAPIs.pl index 5352709c7b..dc850c8dc5 100755 --- a/tools/checkAPIs.pl +++ b/tools/checkAPIs.pl @@ -1817,7 +1817,7 @@ sub check_hf_entries($$) print STDERR "Error: $hf is passing the address of a pointer to RVALS in $filename\n"; $errorCount++; } - if ($convert !~ m/^((0[xX]0?)?0$|NULL$|VALS|VALS64|RVALS|TFS|CF_FUNC|FRAMENUM_TYPE|&)/ && $display !~ /BASE_CUSTOM/) { + if ($convert !~ m/^((0[xX]0?)?0$|NULL$|VALS|VALS64|VALS_EXT_PTR|RVALS|TFS|CF_FUNC|FRAMENUM_TYPE|&)/ && $display !~ /BASE_CUSTOM/) { print STDERR "Error: non-null $hf 'convert' field missing 'VALS|VALS64|RVALS|TFS|CF_FUNC|FRAMENUM_TYPE|&' in $filename ?\n"; $errorCount++; }