diff options
author | Karl Williamson <khw@cpan.org> | 2022-05-19 19:56:59 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2022-05-27 21:24:39 -0600 |
commit | 077e4a84c69999ec24ed099cabf973ea74febd54 (patch) | |
tree | f3777ccd62f1767b9c6af7bde37c03369a7e390b /scope.c | |
parent | e76506c9659e52bc10b6190aebe32f079f5fccc0 (diff) | |
download | perl-077e4a84c69999ec24ed099cabf973ea74febd54.tar.gz |
perlintern: Document save_scalar_at
Diffstat (limited to 'scope.c')
-rw-r--r-- | scope.c | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -238,6 +238,27 @@ Perl_free_tmps(pTHX) } } +/* +=for apidoc save_scalar_at + +A helper function for localizing the SV referenced by C<*sptr>. + +If C<SAVEf_KEEPOLDELEM> is set in in C<flags>, the function returns the input +scalar untouched. + +Otherwise it replaces C<*sptr> with a new C<undef> scalar, and returns that. +The new scalar will have the old one's magic (if any) copied to it. +If there is such magic, and C<SAVEf_SETMAGIC> is set in in C<flags>, 'set' +magic will be processed on the new scalar. If unset, 'set' magic will be +skipped. The latter typically means that assignment will soon follow (I<e.g.>, +S<C<'local $x = $y'>>), and that will handle the magic. + +=for apidoc Amnh ||SAVEf_KEEPOLDELEM +=for apidoc Amnh ||SAVEf_SETMAGIC + +=cut +*/ + STATIC SV * S_save_scalar_at(pTHX_ SV **sptr, const U32 flags) { |