[PySide] pickling enums (again)

John Ehresman jpe at wingware.com
Fri Apr 26 19:06:41 CEST 2013


On 4/26/13 12:50 PM, Hugo Parente Lima wrote:
>> How would converting integers into enums after checking that they
>> were valid cause a segfault?
> 
> After checking they are valid wont cause any problems, but checking
> if they are valid on every function call seems like a unnecessary
> overhead IMO, although I don't have numbers to prove this possible
> overhead :-)
> 
> My point is about not doing the check plus converting every integer
> with a reinterpret_cast.

Yes, not checking would be a problem.  I tend to think the overhead
from checking would be negligible.  Does anyone know if PyQt would
accept an integer in these cases?

Thanks,

John




More information about the PySide mailing list