X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FMac-NSGetExecutablePath.git;a=blobdiff_plain;f=NSGetExecutablePath.xs;fp=NSGetExecutablePath.xs;h=93ba9a301e11539cf01a67680bd70ac91e95881f;hp=c0a3a93bccce1e339aa4617a75fd5f2be1577e67;hb=180647c780dba17e20b7fe68103d8032f37c697e;hpb=68720c70b78fdbcb3d79362b6e4bb3543e8c6da4 diff --git a/NSGetExecutablePath.xs b/NSGetExecutablePath.xs index c0a3a93..93ba9a3 100644 --- a/NSGetExecutablePath.xs +++ b/NSGetExecutablePath.xs @@ -29,12 +29,8 @@ PPCODE: _NSGetExecutablePath(buf, &size); if (size >= MAXPATHLEN * MAXPATHLEN) croak(nsgep_too_long); -#ifdef newSV_type - dst = newSV_type(SVt_PV); -#else - dst = sv_newmortal(); - (void) SvUPGRADE(dst, SVt_PV); -#endif + dst = sv_newmortal(); + sv_upgrade(dst, SVt_PV); buffer = SvGROW(dst, size); if (_NSGetExecutablePath(buffer, &size)) croak(nsgep_too_long);