Removes alternative function enter/leave macro scheme (#678)
* Committing clang-format changes * Converted BEGIN_FUNC, etc. macros to FUNC_ENTER * Rips out the BEGIN_FUNC, etc. macros * Removes 'end if', etc. comments from H5HL package * Committing clang-format changes * Fixes an H5EA iterate issue * Fixes an issue in the H5FA iterator code * Further cleanup in bin/trace after macro removal * Iterator changes in H5EA and H5FA Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
31
bin/trace
31
bin/trace
@@ -283,8 +283,8 @@ my $file_api = 0;
|
||||
my $file_args = 0;
|
||||
my $total_api = 0;
|
||||
my $total_args = 0;
|
||||
sub rewrite_func ($$$$$$$$) {
|
||||
my ($file, $begin, $type, $aftertype, $name, $args, $close, $body) = @_;
|
||||
sub rewrite_func ($$$$$) {
|
||||
my ($file, $type, $name, $args, $body) = @_;
|
||||
my ($arg, $trace, $argtrace);
|
||||
my (@arg_name, @arg_str, @arg_type);
|
||||
local $_;
|
||||
@@ -459,7 +459,7 @@ sub rewrite_func ($$$$$$$$) {
|
||||
}
|
||||
|
||||
error:
|
||||
return "\n$begin$type$aftertype$name($orig_args)$close$body";
|
||||
return "\n$type\n$name($orig_args)\n$body";
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
@@ -481,25 +481,12 @@ for $file (@ARGV) {
|
||||
# Make a copy of the original data
|
||||
my $original = $Source;
|
||||
|
||||
# Check which style of function declaration is used in this file
|
||||
if ( $Source =~ /BEGIN_FUNC/ ) {
|
||||
# Make modifications
|
||||
$Source =~ s/\n(BEGIN_FUNC.*?\n) #begin
|
||||
([A-Za-z]\w*(\s+[A-Za-z]\w*)*\s*\**) #type
|
||||
(.*?\n) #aftertype
|
||||
(H5[A-Z]{0,2}_?[a-zA-Z0-9_]\w*) #name
|
||||
\s*\((.*?)\)\s* #args
|
||||
(\)) #close
|
||||
(\n.*?\nEND_FUNC\([^\n]*) #body
|
||||
/rewrite_func($file,$1,$2,$4,$5,$6,$7,$8)/segx;
|
||||
} else {
|
||||
# Make modifications
|
||||
$Source =~ s/\n([A-Za-z]\w*(\s+[A-Za-z]\w*)*\s*\**)\n #type
|
||||
(H5[A-Z]{0,2}_?[a-zA-Z0-9_]\w*) #name
|
||||
\s*\((.*?)\)\s* #args
|
||||
(\{.*?\n\}[^\n]*) #body
|
||||
/rewrite_func($file,"",$1,"\n",$3,$4,"\n",$5)/segx;
|
||||
}
|
||||
# Make modifications
|
||||
$Source =~ s/\n([A-Za-z]\w*(\s+[A-Za-z]\w*)*\s*\**)\n #type
|
||||
(H5[A-Z]{0,2}_?[a-zA-Z0-9_]\w*) #name
|
||||
\s*\((.*?)\)\s* #args
|
||||
(\{.*?\n\}[^\n]*) #body
|
||||
/rewrite_func($file,$1,$3,$4,$5)/segx;
|
||||
|
||||
# If the source changed then print out the new version
|
||||
if ($original ne $Source) {
|
||||
|
||||
Reference in New Issue
Block a user