Skip to content

Commit 8157cf6

Browse files
committedMay 24, 2017
template classes are not imperatively exported
followup a14ad32 fixes win build
1 parent f1383e2 commit 8157cf6

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed
 

‎scripts/sipify.pl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,11 @@ sub detect_comment_block{
410410
do {no warnings 'uninitialized';
411411
push @CLASSNAME, $3;
412412
dbg_info("class: ".$CLASSNAME[$#CLASSNAME]);
413-
$EXPORTED[-1]++ if $line =~ m/\b[A-Z]+_EXPORT\b/;
413+
if ($line =~ m/\b[A-Z]+_EXPORT\b/ || $#CLASSNAME != 0 || $lines[$line_idx-2] =~ m/^\s*template</){
414+
# class should be exported except those not at top level or template classes
415+
# if class is not exported, then its methods should be (checked whenever leaving out the class)
416+
$EXPORTED[-1]++;
417+
}
414418
};
415419
$line = "$1 $3";
416420
# Inheritance
@@ -490,7 +494,7 @@ sub detect_comment_block{
490494
pop(@global_bracket_nesting_index);
491495
pop(@ACCESS);
492496
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."
493-
if $EXPORTED[-1] == 0 && $#CLASSNAME == 0;
497+
if $EXPORTED[-1] == 0;
494498
pop @EXPORTED;
495499
}
496500
pop(@CLASSNAME);

‎src/core/qgsfeatureiterator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ class CORE_EXPORT QgsAbstractFeatureIterator
180180
* \note not available in Python bindings (although present in SIP file)
181181
*/
182182
template<typename T>
183-
class CORE_EXPORT QgsAbstractFeatureIteratorFromSource : public QgsAbstractFeatureIterator
183+
class QgsAbstractFeatureIteratorFromSource : public QgsAbstractFeatureIterator
184184
{
185185
public:
186186
QgsAbstractFeatureIteratorFromSource( T *source, bool ownSource, const QgsFeatureRequest &request )

0 commit comments

Comments
 (0)
Please sign in to comment.