X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlguts.pod;h=f2b4b909b8c41ab8dc0aad18285bc53b5afd0fb1;hb=0fd3e83781d94dc1f84f1fcb8cce89958518b5e8;hp=8f4839aa20a588e7945b198f0397b2a5452f7520;hpb=0cf5025feb32fb02ae5300679222908dde622ca9;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlguts.pod b/pod/perlguts.pod index 8f4839a..f2b4b90 100644 --- a/pod/perlguts.pod +++ b/pod/perlguts.pod @@ -1320,16 +1320,17 @@ function). Here is a handy table of equivalents between ordinary C and Perl's memory abstraction layer: - Instead Of: Use: - malloc New - calloc Newz - realloc Renew - memcopy Copy - memmove Move - free Safefree - strdup savepv - strndup savepvn (Hey, strndup doesn't exist!) - memcopy/*(struct foo *) StructCopy + Instead Of: Use: + + malloc New + calloc Newz + realloc Renew + memcopy Copy + memmove Move + free Safefree + strdup savepv + strndup savepvn (Hey, strndup doesn't exist!) + memcpy/*(struct foo *) StructCopy =head2 PerlIO @@ -1876,6 +1877,19 @@ This function isn't exported out of the Perl core. If you edit F, you will need to run C to force a rebuild of F and other auto-generated files. +=head2 Formatted Printing of IVs and UVs + +If you are printing IVs or UVs instead of the stdio(3) style formatting +codes like C<%d> you should use the following macros for portability + + IVdf IV in decimal + UVuf UV in decimal + UVof UV in octal + UVxf UV in hexadecimal + +For example: printf("IV is %"IVdf"\n", iv); That will expand +to whatever is the correct format for the IVs. + =head2 Source Documentation There's an effort going on to document the internal functions and