[PyKDE] (no subject)

Phil Thompson phil at riverbankcomputing.co.uk
Sat Mar 13 11:22:00 GMT 2004


On Saturday 13 March 2004 02:29, Claus, Richard wrote:
> For a method:
>
> const struct timespec* timeStamp() const;
>
> SIP 3.10.1 (3.10.1-192) generates:
>
> ...
> 			const struct timespec *sipRes;
>
> 			Py_BEGIN_ALLOW_THREADS
> 			sipRes = sipCpp -> OSWtimeContribution::timeStamp();
> 			Py_END_ALLOW_THREADS
>
> 			return sipConvertFromVoidPtr(sipRes);
> ...
>
> Microsoft Visual C++ .NET complains:
> error C2664: 'sipConvertFromVoidPtr' : cannot convert parameter 1 from
> 'const timespec *' to 'void *' Conversion loses qualifiers
>
> Besides getting rid of the consts in the C++ source (which I'd rather not
> do for C++ users of my library), how do I solve this?  Should SIP perhaps
> generate:
>
> 			return sipConvertFromVoidPtr(const_cast(sipRes));
> or
> 			return sipConvertFromVoidPtr((void*)sipRes);
>
> perhaps with or without a warning?

Hopefully fixed in tonight's snapshot.

Thanks,
Phil




More information about the PyQt mailing list