summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2004-07-15 09:02:36 +0000
committerNicholas Clark <nick@ccl4.org>2004-07-15 09:02:36 +0000
commit62c28f1eb11a09465e40c241ad70e9821eac5d49 (patch)
tree7ce8d24e4907ac99a547d7db54c187ea83263262 /win32
parentc491ecac864a369a2913fd8e3ff31636a481b18b (diff)
downloadperl-62c28f1eb11a09465e40c241ad70e9821eac5d49.tar.gz
This seems to be needed to get COW working on Win32
p4raw-id: //depot/perl@23111
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 3188805c69..bead78a8a8 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;