Mac-NSGetExecutablePath

 view release on metacpan or  search on metacpan

NSGetExecutablePath.xs  view on Meta::CPAN

PROTOTYPES: ENABLE

void
NSGetExecutablePath()
PROTOTYPE:
PREINIT:
 char      buf[1];
 uint32_t  size = sizeof buf;
 SV       *dst;
 char     *buffer;
PPCODE:
 _NSGetExecutablePath(buf, &size);
 if (size >= MAXPATHLEN * MAXPATHLEN)
  croak(nsgep_too_long);
 dst    = sv_newmortal();
 sv_upgrade(dst, SVt_PV);
 buffer = SvGROW(dst, size);
 if (_NSGetExecutablePath(buffer, &size))
  croak(nsgep_too_long);
 if (size)
  SvCUR_set(dst, size - 1);



( run in 0.607 second using v1.01-cache-2.11-cpan-5511b514fd6 )