Skip to content

Commit

Permalink
[sipify] do not remove function body within SIP_RUN blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Apr 24, 2017
1 parent 10d34ec commit 9b523cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/sipify.pl
Expand Up @@ -414,7 +414,7 @@ sub processDoxygenLine
}

# remove function bodies
if ( $line =~ m/^(\s*)?(virtual )?(static |const )*(([\w:]+(<.*?>)?\s+(\*|&)?)?(\w+|operator.{1,2})\(.*?(\(.*\))*.*\)( (?:const|SIP_[A-Z_]*?))*)\s*(\{.*\})?(?!;)(\s*\/\/.*)?$/ ){
if ( $SIP_RUN != 1 && $line =~ m/^(\s*)?(virtual )?(static |const )*(([\w:]+(<.*?>)?\s+(\*|&)?)?(\w+|operator.{1,2})\(.*?(\(.*\))*.*\)( (?:const|SIP_[A-Z_]*?))*)\s*(\{.*\})?(?!;)(\s*\/\/.*)?$/ ){
my $newline = "$1$2$3$4;";
if ($line !~ m/\{.*?\}$/){
$line = $lines[$line_idx];
Expand Down Expand Up @@ -480,7 +480,7 @@ sub processDoxygenLine
$line =~ s/SIP_FORCE//;

# fix astyle placing space after % character
$line =~ s/\s*% (MappedType|TypeHeaderCode|ConvertFromTypeCode|ConvertToTypeCode|MethodCode|End)/%$1/;
$line =~ s/\s*% (MappedType|TypeCode|TypeHeaderCode|ConvertFromTypeCode|ConvertToTypeCode|MethodCode|End)/%$1/;
$line =~ s/\/\s+GetWrapper\s+\//\/GetWrapper\//;

push @output, "$line\n";
Expand Down

0 comments on commit 9b523cb

Please sign in to comment.