Skip to content

sv.c: make PUSH_EXTEND_MORTAL__SV_C an inline function #23234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: blead
Choose a base branch
from

Conversation

mauke
Copy link
Contributor

@mauke mauke commented May 1, 2025

This macro could easily be a function, so why not make it one?


  • This set of changes does not require a perldelta entry.

This macro could easily be a function, so why not make it one?
@ap ap added the defer-next-dev This PR should not be merged yet, but await the next development cycle label May 1, 2025
@richardleach
Copy link
Contributor

When doing something like sv_2mortal(newSViv(27)), the checks in Perl_sv_2mortal for (!sv) and SvIMMORTAL(sv) are unnecessary and what remains is this new function's body plus SvTEMP_on(sv).

Is it worth making this function Perl_push_extend_mortal and part of the API, whether that's in sv.c or in sv_inline.h?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defer-next-dev This PR should not be merged yet, but await the next development cycle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants