summaryrefslogtreecommitdiff
path: root/win32/wince.c
diff options
context:
space:
mode:
authorVincent Pit <perl@profvince.com>2008-01-03 20:26:05 +0100
committerMarcus Holland-Moritz <mhx-perl@gmx.net>2008-01-04 01:22:22 +0000
commit22f1178fc6ea7d78b2fce6108796ec629a70476b (patch)
treedb1b5b4ee2350f41eef0952ef108e64f43f5641b /win32/wince.c
parent6e449a3ab1e3bd9d7e138ca681c733e57d4daa49 (diff)
downloadperl-22f1178fc6ea7d78b2fce6108796ec629a70476b.tar.gz
Re: SV leak?
Message-ID: <477D28BD.5060801@profvince.com> Mortalize SVs that are being pushed on the stack. Try to use specialized macros for pushing mortals. p4raw-id: //depot/perl@32822
Diffstat (limited to 'win32/wince.c')
-rw-r--r--win32/wince.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/win32/wince.c b/win32/wince.c
index 60a6809664..103a66534c 100644
--- a/win32/wince.c
+++ b/win32/wince.c
@@ -2440,12 +2440,12 @@ XS(w32_GetOSVersion)
if (!XCEGetVersionExA(&osver)) {
XSRETURN_EMPTY;
}
- XPUSHs(newSVpvn(osver.szCSDVersion, strlen(osver.szCSDVersion)));
- XPUSHs(newSViv(osver.dwMajorVersion));
- XPUSHs(newSViv(osver.dwMinorVersion));
- XPUSHs(newSViv(osver.dwBuildNumber));
+ mXPUSHp(osver.szCSDVersion, strlen(osver.szCSDVersion));
+ mXPUSHi(osver.dwMajorVersion);
+ mXPUSHi(osver.dwMinorVersion);
+ mXPUSHi(osver.dwBuildNumber);
/* WINCE = 3 */
- XPUSHs(newSViv(osver.dwPlatformId));
+ mXPUSHi(osver.dwPlatformId);
PUTBACK;
}
@@ -2554,15 +2554,15 @@ XS(w32_GetPowerStatus)
XSRETURN_EMPTY;
}
- XPUSHs(newSViv(sps.ACLineStatus));
- XPUSHs(newSViv(sps.BatteryFlag));
- XPUSHs(newSViv(sps.BatteryLifePercent));
- XPUSHs(newSViv(sps.BatteryLifeTime));
- XPUSHs(newSViv(sps.BatteryFullLifeTime));
- XPUSHs(newSViv(sps.BackupBatteryFlag));
- XPUSHs(newSViv(sps.BackupBatteryLifePercent));
- XPUSHs(newSViv(sps.BackupBatteryLifeTime));
- XPUSHs(newSViv(sps.BackupBatteryFullLifeTime));
+ mXPUSHi(sps.ACLineStatus);
+ mXPUSHi(sps.BatteryFlag);
+ mXPUSHi(sps.BatteryLifePercent);
+ mXPUSHi(sps.BatteryLifeTime);
+ mXPUSHi(sps.BatteryFullLifeTime);
+ mXPUSHi(sps.BackupBatteryFlag);
+ mXPUSHi(sps.BackupBatteryLifePercent);
+ mXPUSHi(sps.BackupBatteryLifeTime);
+ mXPUSHi(sps.BackupBatteryFullLifeTime);
PUTBACK;
}