[PyQt] Type map for python to Qt?
srhaque at theiet.org
Sun Feb 5 18:31:57 GMT 2017
On 5 February 2017 at 17:37, Barry Scott <barry at barrys-emacs.org> wrote:
> > On 5 Feb 2017, at 12:18, Shaheed Haque <srhaque at theiet.org> wrote:
> > The use of unions is really limited: across the whole of my
> interpreter thing by the looks of it). From a superficial look, it really
> does look like the polymorphic case but there is no obvious/explicit
> "what_type" in any of those case.
> Maybe there is a type field in each member of the union that allows the
> decode, it must be possible.
> Of course if the kjs component is not interesting to the python land
> ignore it.
> > That said, my basic thinking is to assume that the reader/writer knows
> what they are doing AND that from a SIP perspective, all I need is to
> provide Python access to the storage. So, for access to the individual
> members of the union, all I need do is take care of the change in
> representation between a C++ int/float/whatever and the corresponding
> Python object. That then leaves the union itself: there it seems to me that
> just doing a C++ memcpy in one direction or the other is all that is
> required. I *think* that pretty much covers the bases…
> Is that really robust to avoid crashes?
I don't see why not, but I guess we'll see!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt