Skip to content

Commit

Permalink
template classes are not imperatively exported
Browse files Browse the repository at this point in the history
followup a14ad32
fixes win build
  • Loading branch information
3nids committed May 24, 2017
1 parent f1383e2 commit 8157cf6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions scripts/sipify.pl
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,11 @@ sub detect_comment_block{
do {no warnings 'uninitialized';
push @CLASSNAME, $3;
dbg_info("class: ".$CLASSNAME[$#CLASSNAME]);
$EXPORTED[-1]++ if $line =~ m/\b[A-Z]+_EXPORT\b/;
if ($line =~ m/\b[A-Z]+_EXPORT\b/ || $#CLASSNAME != 0 || $lines[$line_idx-2] =~ m/^\s*template</){
# class should be exported except those not at top level or template classes
# if class is not exported, then its methods should be (checked whenever leaving out the class)
$EXPORTED[-1]++;
}
};
$line = "$1 $3";
# Inheritance
Expand Down Expand Up @@ -490,7 +494,7 @@ sub detect_comment_block{
pop(@global_bracket_nesting_index);
pop(@ACCESS);
die "Class $CLASSNAME[$#CLASSNAME] in $headerfile at line $line_idx should be exported with appropriate [LIB]_EXPORT macro. If this should not be available in python, wrap it in a `#ifndef SIP_RUN` block."
if $EXPORTED[-1] == 0 && $#CLASSNAME == 0;
if $EXPORTED[-1] == 0;
pop @EXPORTED;
}
pop(@CLASSNAME);
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsfeatureiterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class CORE_EXPORT QgsAbstractFeatureIterator
* \note not available in Python bindings (although present in SIP file)
*/
template<typename T>
class CORE_EXPORT QgsAbstractFeatureIteratorFromSource : public QgsAbstractFeatureIterator
class QgsAbstractFeatureIteratorFromSource : public QgsAbstractFeatureIterator
{
public:
QgsAbstractFeatureIteratorFromSource( T *source, bool ownSource, const QgsFeatureRequest &request )
Expand Down

0 comments on commit 8157cf6

Please sign in to comment.