Re: treeiter stamp sign extension



Torsten Schoenfeld <kaffeetisch gmx de> writes:

I think that's fair (2147483648 is out of range for 32 bit gints) --

Yes.

but it can be considered a backwards incompatibility.

I guess 32-bit unsigned currently works ok on int==long==32bit, and up
to 64-bit unsigned on int==long==64bit.  The question would be whether
anyone, like me, has used that in ignorance -- including not noticing
it's not quite right on int==32 long==64.



Incidentally, I was tempted to propose a func which would generate a
random non-zero stamp of the right size/sign/etc.  But I guess there's
different strategies for generating, like a global variable which just
incremented, or a pointer value (which I tried), instead of random.

I was even tempted to have the method dispatching funcs like
gtk2perl_tree_model_get_path() validate the stamp in the iter against
the stamp in the object, if you ask for that, or put the stamp in the
hash under a specified name, or something.  Such a check of course is
normally the first thing every model implementation will do.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]