Skip to content

mg.c: Perl_magic_get() dont call libc's getter func _errno() over and over #23370

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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions mg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1009,20 +1009,20 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg)
{
dSAVE_ERRNO;
#ifdef VMS
sv_setnv(sv, (NV)((errno == EVMSERR) ? vaxc$errno : errno));
sv_setnv(sv, (NV)((saved_errno == EVMSERR) ? vaxc$errno : saved_errno));
#else
sv_setnv(sv, (NV)errno);
sv_setnv(sv, (NV)saved_errno);
#endif
#ifdef OS2
if (errno == errno_isOS2 || errno == errno_isOS2_set)
if (saved_errno == errno_isOS2 || saved_errno == errno_isOS2_set)
sv_setpv(sv, os2error(Perl_rc));
else
#endif
if (! errno) {
if (! saved_errno) {
SvPVCLEAR(sv);
}
else {
sv_string_from_errnum(errno, sv);
sv_string_from_errnum(saved_errno, sv);
/* If no useful string is available, don't
* claim to have a string part. The SvNOK_on()
* below will cause just the number part to be valid */
Expand Down
Loading