diff options
author | David Mitchell <davem@iabyn.com> | 2017-03-06 09:14:34 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2017-03-06 09:14:34 +0000 |
commit | e152db302e1cf10a20b25be3c5eb1525b9da0815 (patch) | |
tree | 83d3970b9a8247df860a1a60f0c7cb1afe4b3d50 | |
parent | 565b06906fd882efd902930e86ffef5430b3ea96 (diff) | |
download | perl-e152db302e1cf10a20b25be3c5eb1525b9da0815.tar.gz |
perlxstut.pod: s/newRV/newRV_inc/g
newRV_inc() and newRV_noinc() are the preferred forms since 5.004;
newRV is #deffed to newRV_inc and is only kept for backwards
compatibility.
Spotted by KES.
-rw-r--r-- | dist/ExtUtils-ParseXS/lib/perlxstut.pod | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dist/ExtUtils-ParseXS/lib/perlxstut.pod b/dist/ExtUtils-ParseXS/lib/perlxstut.pod index f8a74ddf7a..ef154ad731 100644 --- a/dist/ExtUtils-ParseXS/lib/perlxstut.pod +++ b/dist/ExtUtils-ParseXS/lib/perlxstut.pod @@ -1143,9 +1143,9 @@ Mytest.xs: hv_store(rh, "f_files", 7, newSVnv(buf.f_files), 0); hv_store(rh, "f_type", 6, newSVnv(buf.f_type), 0); - av_push(results, newRV((SV *)rh)); + av_push(results, newRV_inc((SV *)rh)); } - RETVAL = newRV((SV *)results); + RETVAL = newRV_inc((SV *)results); OUTPUT: RETVAL @@ -1216,7 +1216,7 @@ for details. =item * -To create a reference, we use the C<newRV> function. Note that you can +To create a reference, we use the C<newRV_inc> function. Note that you can cast an AV* or an HV* to type SV* in this case (and many others). This allows you to take references to arrays, hashes and scalars with the same function. Conversely, the C<SvRV> function always returns an SV*, which may |