Skip to content
Permalink
Browse files
[sipify] do not remove function body within SIP_RUN blocks
  • Loading branch information
3nids committed Apr 24, 2017
1 parent 10d34ec commit 9b523cb19b01014977862e1adbeb0be0376d4f93
Showing with 2 additions and 2 deletions.
  1. +2 −2 scripts/sipify.pl
@@ -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];
@@ -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";

0 comments on commit 9b523cb

Please sign in to comment.