From: Jarkko Hietaniemi Date: Thu, 7 Jun 2001 12:08:56 +0000 (+0000) Subject: IOK vs pIOK docs X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9e9796d60fe5caa415e63b60595d4ea57c358a48;p=p5sagit%2Fp5-mst-13.2.git IOK vs pIOK docs Date: Thu, 7 Jun 2001 10:09:59 +0100 (BST) Reply-To: Dave Mitchell Message-Id: <200106070909.KAA25610@gizmo.fdgroup.co.uk> p4raw-id: //depot/perl@10468 --- diff --git a/pod/perlguts.pod b/pod/perlguts.pod index 3fea294..aa5de9f 100644 --- a/pod/perlguts.pod +++ b/pod/perlguts.pod @@ -274,6 +274,14 @@ pointer in an SV, you can use the following three macros instead: These will tell you if you truly have an integer, double, or string pointer stored in your SV. The "p" stands for private. +The are various ways in which the private and public flags may differ. +For example, a tied SV may have a valid underlying value in the IV slot +(so SvIOKp is true), but the data should be accessed via the FETCH +routine rather than directly, so SvIOK is false. Another is when +numeric conversion has occured and precision has been lost: only the +private flag is set on 'lossy' values. So when an NV is converted to an +IV with loss, SvIOKp, SvNOKp and SvNOK will be set, while SvIOK wont be. + In general, though, it's best to use the C macros. =head2 Working with AVs