From 62c28f1eb11a09465e40c241ad70e9821eac5d49 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Thu, 15 Jul 2004 09:02:36 +0000 Subject: [PATCH] This seems to be needed to get COW working on Win32 p4raw-id: //depot/perl@23111 --- win32/win32.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; -- 2.7.4