Skip to content
Permalink
Browse files
[sipify] remove EXPORT macro from struct definition
  • Loading branch information
3nids committed Apr 24, 2017
1 parent 2a7d5d4 commit 419185bc21a7c9b451d37bd6a70af66a5af67854
Showing with 15 additions and 2 deletions.
  1. +5 −2 scripts/sipify.pl
  2. +5 −0 tests/scripts/sipifyheader.expected.sip
  3. +5 −0 tests/scripts/sipifyheader.h
@@ -74,7 +74,7 @@ sub processDoxygenLine
while ($line_idx < $line_count){
$line = $lines[$line_idx];
$line_idx++;
#push @output, "$line\n";
#print "$line\n";

if ($line =~ m/^\s*SIP_FEATURE\( (\w+) \)(.*)$/){
push @output, "%Feature $1$2\n";
@@ -312,7 +312,7 @@ sub processDoxygenLine
push @output, "$line\n";
$line = $lines[$line_idx];
$line_idx++;
$line =~ m/^\s*\{\s*$/ || die 'Unexpected content: enum should be followed by {';
$line =~ m/^\s*\{\s*$/ || die "Unexpected content: enum should be followed by {\nline: $line";
push @output, "$line\n";
while ($line_idx < $line_count){
$line = $lines[$line_idx];
@@ -464,6 +464,9 @@ sub processDoxygenLine
next;
}

# remove export macro from struct definition
$line =~ s/^(\s*struct )\w+_EXPORT (.+)$/$1$2/;

$line =~ s/\bSIP_FACTORY\b/\/Factory\//;
$line =~ s/\bSIP_OUT\b/\/Out\//g;
$line =~ s/\bSIP_INOUT\b/\/In,Out\//g;
@@ -250,6 +250,11 @@ Removing function body with virtual const reference

bool initializedMember;

struct PublicStruct
{
int var;
}

protected:
bool thisShouldBeListed();
%Docstring
@@ -250,6 +250,11 @@ class CORE_EXPORT QgsSipifyHeader : public QtClass<QVariant>, private Ui::QgsBas

bool initializedMember{ false };

struct CORE_EXPORT PublicStruct
{
int var;
}

protected:
bool thisShouldBeListed();

0 comments on commit 419185b

Please sign in to comment.