[PyKDE] unsigned longs returned by functions and SIP
Phil Thompson
phil at riverbankcomputing.co.uk
Tue Mar 9 19:19:01 GMT 2004
On Tuesday 09 March 2004 04:12, Claus, Richard wrote:
> How do I handle _unsigned_ longs returned by functions I want to expose to
> Python using SIP? When they are greater than sys.maxint I get:
>
> FutureWarning: %u/%o/%x/%X of negative int will return a signed string in
> Python 2.4 and up
>
> Python 2.3.3, SIP 3.10 (3.10-171).
>
> I could provide %MethodCode that uses PyLong_FromUnsignedLong() instead of
> the PyInt_FromLong() call SIP uses, but maybe SIP can already do that for
> me if I knew how to ask it.
SIP doesn't know about it.
Phil
More information about the PyQt
mailing list