[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] If directive for declaring a function for different SIP versions
From: Phil Thompson <phil () riverbankcomputing ! com>
Date: 2013-06-26 21:27:31
Message-ID: 5e7b6f67dc1fee262f60f5939335d571 () localhost
[Download RAW message or body]
On Wed, 26 Jun 2013 16:16:41 -0400, Forest Yang <yzine0511@gmail.com>
wrote:
> Hi,
>
> I have one function to wrap, and want it to work with both sip 4.10 and
> 4.13,
> There is a KeywordArgs on it. It seems from 4.10 to 4.13 there are some
> changes
> from /KeywordArgs/ to /KeywordArgs="Optional"/.
But the old form should still work - it was deprecated, not removed.
> I hope I can use %if, like the following:
>
> %if (- SIP_4_13)
> void foo(...) /KeywordArgs/;
> %End
> %if (SIP_4_13_2 -)
> void foo(..) /KeywordArgs="Optional"/;
> %End
> %MethodCode
> .....
> %End.
>
>
> But sip complains about the syntax error at line "%MethodCode". I am
using
> sip_4_13_2.
You have to duplicate the %MethodCode in each of the %If blocks.
Phil
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic