This indeed fixes the problem, but a check called std::size_t_Check is added
in the generated code. I just removed it for now - but I'm sure you will
have a proper solution :-)


Thanks!
--
Kjelle


On Thu, Sep 1, 2011 at 7:14 PM, Hugo Parente Lima
<[email protected]>wrote:

> On Thursday 01 September 2011 13:02:37 Kjelle Apers wrote:
> > Hi,
> > I tried the implementation of this function in the shiboken module. I've
> >
> > compiled everything for 64 bit but now I'm facing the following problem:
> > >>> wrapInstance(9223372036854775808 ,QtGui.QWidget)
> > >>> OverflowError
> >
> > Shouldn't this value be valid for a 64bit memory address? It looks like
> the
> > pointer address is interpreted as being signed here. What might be the
> > cause of this issue?
>
> I'm using "unsigned long", but the correctly is: "std::size_t" which could
> be
> a typedef for "unsigned long" or not, depends on the platform.
>
> The fix probably is just change:
>
> <add-function signature="wrapInstance(unsigned long, PyType)" return-
> type="PyObject*">
>
> to
>
> <add-function signature="wrapInstance(std::size_t, PyType)" return-
> type="PyObject*">
>
> but beware using functions from shiboken module right now, although this
> function probably will not change until the final version of the PSEP,
> other
> functions on this module may change, besides the shiboken module could even
> not be shipped on the next release if the PSEP doesn't achieve a final
> state
> some time before the next release.
>
> > Thanks,
> > --
> > Kjelle
>
> --
> Hugo Parente Lima
> INdT - Instituto Nokia de Tecnologia
>
_______________________________________________
PySide mailing list
[email protected]
http://lists.pyside.org/listinfo/pyside

Reply via email to