From: Nicholas Clark Date: Thu, 15 Jul 2004 09:02:36 +0000 (+0000) Subject: This seems to be needed to get COW working on Win32 X-Git-Tag: accepted/trunk/20130322.191538~21780 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=62c28f1eb11a09465e40c241ad70e9821eac5d49;p=platform%2Fupstream%2Fperl.git This seems to be needed to get COW working on Win32 p4raw-id: //depot/perl@23111 --- diff --git a/win32/win32.c b/win32/win32.c index 3188805..bead78a 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -4807,13 +4807,15 @@ XS(w32_GetFullPathName) SV *fullpath; char *filepart; DWORD len; + STRLEN filename_len; + char *filename_p; if (items != 1) Perl_croak(aTHX_ "usage: Win32::GetFullPathName($filename)"); filename = ST(0); - fullpath = sv_mortalcopy(filename); - SvUPGRADE(fullpath, SVt_PV); + filename_p = SvPV(filename, filename_len); + fullpath = sv_2mortal(newSVpvn(filename_p, filename_len)); if (!SvPVX(fullpath) || !SvLEN(fullpath)) XSRETURN_UNDEF;