On Friday 02 September 2011 09:15:36 Kjelle Apers wrote:
> In fact, the wrapInstance mehtod now works with high numbers like in my
> example, but the wrapped widget is useless. When I try to use it, the
> application crashes.
> 
> I tried some other things but in the end had to revert back to "unsigned
> long" for the type, which brings me back to the initial problem.
> 
> I'll keep searching but any hints are very welcome on this issue.

What are you using on type system? Could you paste here?
 
> Thanks,
> --
> Kjelle
> 
> On Fri, Sep 2, 2011 at 9:34 AM, Kjelle Apers <[email protected]> wrote:
> > 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

-- 
Hugo Parente Lima
INdT - Instituto Nokia de Tecnologia

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
PySide mailing list
[email protected]
http://lists.pyside.org/listinfo/pyside

Reply via email to