develooper Front page | perl.perl5.porters | Postings from December 2012

Re: I think b630937 (SvUOK docs) is wrong

Thread Previous | Thread Next
December 25, 2012 05:27
Re: I think b630937 (SvUOK docs) is wrong
Message ID:
Karl Williamson wrote:

> I don't understand most of what you are saying.  I did this because I 
> got burned.  In blead, doing a SvUOK(newSVuv(1)) returns FALSE.  That 
> needs to be either changed or documented.  Investigation showed that it 
> would return TRUE iff the value being stored won't fit in an IV.  I 
> hoped that documenting it might cause people to question the current 
> design.
> Patches or wording suggestions welcome.

My wording suggestion.

Returns a boolean indicating whether the SV contains an integer which 
must be interpreted as unsigned. An integer whose value is within the 
range of both an IV and an UV maybe be flagged as either.

Another note for nitpicking, none of the *OK macros return booleans (1 
or 0). They return 0 or not 0.  I don't want to say true/false either 
since that means something else in C++. Not sure if its worth correcting 
the "boolean" word or not, or its obvious that you will learn very quick 
to not compare it to 1.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About