* Allowing check_const.pl to check constants with number in it. Example: LSM_VOLUME_RAID_TYPE_RAID1
Signed-off-by: Gris Ge <f...@redhat.com> --- tools/utility/check_const.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/utility/check_const.pl b/tools/utility/check_const.pl index 9e5a700..e41c1e9 100644 --- a/tools/utility/check_const.pl +++ b/tools/utility/check_const.pl @@ -101,7 +101,7 @@ my $REGEX_C_CONST_FORMAT = qr/ (?&NUM_BIT_SHIFT) | (?&NUM_HEX) | (?&NUM_INT) ) (?<CNAME_PAT> - [A-Z][A-Z_]+ + [A-Z][A-Z_0-9]+ ) (?<HEADER1> [\ \t]* @@ -179,7 +179,7 @@ sub py_name_2_c_name($) { # 2. Convert System to SYSTEM # 3. Convert Capabilities to CAP and etc using %PY_CLASS_NAME_CONV; my $py_name = shift; - if ( $py_name =~ /^lsm\.([a-zA-Z]+)\.([A-Z_]+)$/ ) { + if ( $py_name =~ /^lsm\.([a-zA-Z]+)\.([A-Z_][A-Z_0-9]+)$/ ) { my $py_class_name = $1; my $py_var_name = $2; @@ -308,7 +308,7 @@ sub _get_py_class_consts($$){ } if ($line =~ /^$current_idention [\ ]+ - ([A-Z][A-Z\_]+) + ([A-Z][A-Z\_0-9]+) [\ ]*=[\ ]* ($REGEX_VALUE_FORMAT)/x){ my $var_name = $1; -- 1.8.3.1 ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Libstoragemgmt-devel mailing list Libstoragemgmt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libstoragemgmt-devel