(void)hv_iterinit(hv);
EXTEND(sp, HvKEYS(hv) * 2);
while ((sv = hv_iternextsv(hv, &key, &len))) {
- PUSHs(newSVpvn(key, len));
+ mPUSHp(key, len);
PUSHs(make_sv_object(aTHX_ sv_newmortal(), sv));
}
}
if (GIMME_V == G_SCALAR) {
XSRETURN_IV(g_osver.dwPlatformId);
}
- XPUSHs(newSVpvn(g_osver.szCSDVersion, strlen(g_osver.szCSDVersion)));
+ mXPUSHp(g_osver.szCSDVersion, strlen(g_osver.szCSDVersion));
- XPUSHs(newSViv(g_osver.dwMajorVersion));
- XPUSHs(newSViv(g_osver.dwMinorVersion));
- XPUSHs(newSViv(g_osver.dwBuildNumber));
- XPUSHs(newSViv(g_osver.dwPlatformId));
+ mXPUSHi(g_osver.dwMajorVersion);
+ mXPUSHi(g_osver.dwMinorVersion);
+ mXPUSHi(g_osver.dwBuildNumber);
+ mXPUSHi(g_osver.dwPlatformId);
if (g_osver_ex) {
- XPUSHs(newSViv(g_osver.wServicePackMajor));
- XPUSHs(newSViv(g_osver.wServicePackMinor));
- XPUSHs(newSViv(g_osver.wSuiteMask));
- XPUSHs(newSViv(g_osver.wProductType));
+ mXPUSHi(g_osver.wServicePackMajor);
+ mXPUSHi(g_osver.wServicePackMinor);
+ mXPUSHi(g_osver.wSuiteMask);
+ mXPUSHi(g_osver.wProductType);
}
PUTBACK;
}
#endif
EXTEND(SP, 2);
PUSHs((SV*)rv);
- PUSHs(newSVpvn((char *)sip, sizeof(*sip)));
+ mPUSHp((char *)sip, sizeof(*sip));
}
}
&PipeState), "DosPeekNPipe() for state");
if (state) {
EXTEND(SP, 3);
- PUSHs(newSVuv(PipeState));
+ mPUSHu(PipeState);
/* Bytes (available/in-message) */
- PUSHs(newSViv(BytesAvail.cbpipe));
- PUSHs(newSViv(BytesAvail.cbmessage));
+ mPUSHi(BytesAvail.cbpipe);
+ mPUSHi(BytesAvail.cbmessage);
XSRETURN(3);
} else if (info) {
/* L S S C C C/Z*
else
size = strlen(b.pInfo.szName);
EXTEND(SP, 6);
- PUSHs(newSVpvn(b.pInfo.szName, size));
- PUSHs(newSVuv(b.id));
- PUSHs(newSViv(b.pInfo.cbOut));
- PUSHs(newSViv(b.pInfo.cbIn));
- PUSHs(newSViv(b.pInfo.cbMaxInst));
- PUSHs(newSViv(b.pInfo.cbCurInst));
+ mPUSHp(b.pInfo.szName, size);
+ mPUSHu(b.id);
+ mPUSHi(b.pInfo.cbOut);
+ mPUSHi(b.pInfo.cbIn);
+ mPUSHi(b.pInfo.cbMaxInst);
+ mPUSHi(b.pInfo.cbCurInst);
XSRETURN(6);
} else if (BytesAvail.cbpipe == 0) {
XSRETURN_NO;
}
#else
if (hent->h_addr)
- PUSHs(newSVpvn(hent->h_addr, len));
+ mPUSHp(hent->h_addr, len);
else
PUSHs(sv_mortalcopy(&PL_sv_no));
#endif /* h_addr */
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;
}
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;
}