Branch: refs/heads/yves/RCPV_macros_and_docs
Home: https://github.com/Perl/perl5
Commit: 4c352ba4e50b3dcf54045940f8fbc5890f4e90f5
https://github.com/Perl/perl5/commit/4c352ba4e50b3dcf54045940f8fbc5890f4e90f5
Author: Yves Orton <[email protected]>
Date: 2023-03-05 (Sun, 05 Mar 2023)
Changed paths:
M scope.c
Log Message:
-----------
scope.c - fix typo
Commit: 2b65675064be8283a4d666f098982bcd563fc5a4
https://github.com/Perl/perl5/commit/2b65675064be8283a4d666f098982bcd563fc5a4
Author: Yves Orton <[email protected]>
Date: 2023-03-05 (Sun, 05 Mar 2023)
Changed paths:
M cop.h
M embed.fnc
M embed.h
M pod/perlguts.pod
M proto.h
M regen/scope_types.pl
M scope.c
M scope.h
M scope_types.h
M sv.c
Log Message:
-----------
scope.c - improved RCPV support, SAVERCPV SAVEFREERCPV
I misnamed some of the RCPV stuff when it was introduced. The macro
which I called SAVERCPVFREE should have been called SAVERCPV,
and there should also have been a SAVEFREERCPV macro.
Note the naming system for these functions is a bit confusing.
SAVEFREERCPV /just/ frees. SAVERCPV saves and restores (eg, its like
local). SAVEFREESV is an exception. :-( and it behaves like SAVERCPV.
See for instance SAVEPV or similar macros.
There also should have been RCPV_REFCNT_dec() and RCPV_REFCNT_inc()
macros.
There was also missing documentation. This patch should fix all of these
issues. Since this functionality has never been released in a production
perl it should be fine to do these renames, nothing out there should use
these macros yet.
I noticed these oversights while fixing Scope::Upper, see also:
https://github.com/Perl/perl5/issues/20861
https://rt.cpan.org/Ticket/Display.html?id=146897
Compare: https://github.com/Perl/perl5/compare/d7cb837fe522...2b65675064be