@@ -14974,18 +14974,18 @@ S_sv_dup_common(pTHX_ const SV *const ssv, CLONE_PARAMS *const param)
14974
14974
14975
14975
In spite of their generic names, these are very specialized functions mainly
14976
14976
for use when cloning an interpreter instance. You are probably looking for
14977
- L<perlapi/newSVsv>.
14977
+ L<perlapi/newSVsv>. Generally speaking you will only want to use these in
14978
+ either a C<svt_dup> magic handler, or a C<CLONE> method.
14978
14979
14979
14980
They duplicate an SV of any type (not just a plain SV, but including AV, HV
14980
- I<etc>.), returning a pointer to the cloned object. The difference is that the
14981
- new SV under C<sv_dup> has a reference count of 0, but 1 under C<sv_dup_inc>.
14982
- Only specialized cases will want a zero reference count, almost certainly only
14983
- when you aren't already holding a reference. Thus, you almost always want to
14984
- use the C<sv_dup_inc> form.
14985
-
14986
- The cloning process uses a cache, so that if a particular SV address has
14987
- already been duped, that duped SV is returned again rather than creating a
14988
- second duplicate.
14981
+ I<etc>.), returning a pointer to the cloned object. The cloning process uses a
14982
+ lookup table, so that if a particular source SV address has already been duped,
14983
+ that duped SV is returned rather than creating a second duplicate.
14984
+
14985
+ The difference is that the new SV under C<sv_dup> will not have its reference count incremented
14986
+ (potentially causing it to be zero), unlike under C<sv_dup_inc>. This is only
14987
+ desirable when cloning a non-owning pointer. Thus, you almost always want to use
14988
+ the C<sv_dup_inc> form.
14989
14989
14990
14990
C<param> has type S<C<CLONE_PARAMS *>>. This is mostly for internal core use
14991
14991
when duplicating something more complicated than an SV (code in common is
0 commit comments