Change 31470 by [EMAIL PROTECTED] on 2007/06/26 09:10:24

        Upgrade to Win32-0.30

Affected files ...

... //depot/perl/MANIFEST#1595 edit
... //depot/perl/ext/Win32/Makefile.PL#3 edit
... //depot/perl/ext/Win32/Win32.pm#5 edit
... //depot/perl/ext/Win32/Win32.xs#5 edit
... //depot/perl/ext/Win32/t/GetShortPathName.t#1 add
... //depot/perl/ext/Win32/t/Unicode.t#4 edit

Differences ...

==== //depot/perl/MANIFEST#1595 (text) ====
Index: perl/MANIFEST
--- perl/MANIFEST#1594~31464~   2007-06-25 07:20:04.000000000 -0700
+++ perl/MANIFEST       2007-06-26 02:10:24.000000000 -0700
@@ -1223,6 +1223,7 @@
 ext/Win32/t/GetFullPathName.t  See if Win32 extension works
 ext/Win32/t/GetLongPathName.t  See if Win32 extension works
 ext/Win32/t/GetOSVersion.t     See if Win32 extension works
+ext/Win32/t/GetShortPathName.t See if Win32 extension works
 ext/Win32/t/GuidGen.t          See if Win32 extension works
 ext/Win32/t/Unicode.t          See if Win32 extension works
 ext/Win32/Win32.pm             Win32 extension Perl module

==== //depot/perl/ext/Win32/Makefile.PL#3 (text) ====
Index: perl/ext/Win32/Makefile.PL
--- perl/ext/Win32/Makefile.PL#2~31235~ 2007-05-18 03:46:57.000000000 -0700
+++ perl/ext/Win32/Makefile.PL  2007-06-26 02:10:24.000000000 -0700
@@ -9,6 +9,7 @@
     VERSION_FROM  => 'Win32.pm',
     LIBS          => [EMAIL PROTECTED],
     INSTALLDIRS   => ($] >= 5.008004 ? 'perl' : 'site'),
+    NO_META       => 1,
 
     AUTHOR        => 'Jan Dubois <[EMAIL PROTECTED]>',
     ABSTRACT_FROM => 'Win32.pm',

==== //depot/perl/ext/Win32/Win32.pm#5 (text) ====
Index: perl/ext/Win32/Win32.pm
--- perl/ext/Win32/Win32.pm#4~31235~    2007-05-18 03:46:57.000000000 -0700
+++ perl/ext/Win32/Win32.pm     2007-06-26 02:10:24.000000000 -0700
@@ -8,7 +8,7 @@
     require DynaLoader;
 
     @ISA = qw|Exporter DynaLoader|;
-    $VERSION = '0.29';
+    $VERSION = '0.30';
     $XS_VERSION = $VERSION;
     $VERSION = eval $VERSION;
 
@@ -605,7 +605,8 @@
 (8.3) path components where available.  For path components where the
 file system has not generated the short form the returned path will
 use the long form, so this function might still for instance return a
-path containing spaces.  Compare with Win32::GetFullPathName() and
+path containing spaces.  Returns C<undef> when the PATHNAME does not
+exist. Compare with Win32::GetFullPathName() and
 Win32::GetLongPathName().
 
 =item Win32::GetProcAddress(INSTANCE, PROCNAME)
@@ -650,8 +651,8 @@
 current process/thread is running belongs to the local group of
 Administrators in the built-in system domain; returns 0 if not.
 On Windows Vista it will only return non-zero if the process is
-actually running with elevated privileges.  Returns the undefined
-value and prints a warning if an error occurred.  This function always
+actually running with elevated privileges.  Returns C<undef>
+and prints a warning if an error occurred.  This function always
 returns 1 on Win9X.
 
 =item Win32::IsWinNT()

==== //depot/perl/ext/Win32/Win32.xs#5 (text) ====
Index: perl/ext/Win32/Win32.xs
--- perl/ext/Win32/Win32.xs#4~31235~    2007-05-18 03:46:57.000000000 -0700
+++ perl/ext/Win32/Win32.xs     2007-06-26 02:10:24.000000000 -0700
@@ -1337,7 +1337,7 @@
         WCHAR *wlong = sv_to_wstr(aTHX_ ST(0));
         len = GetShortPathNameW(wlong, wshort, countof(wshort));
         Safefree(wlong);
-        if (len < sizeof(wshort)) {
+        if (len && len < sizeof(wshort)) {
             ST(0) = wstr_to_sv(aTHX_ wshort);
             XSRETURN(1);
         }

==== //depot/perl/ext/Win32/t/GetShortPathName.t#1 (text) ====
Index: perl/ext/Win32/t/GetShortPathName.t
--- /dev/null   2007-03-19 09:41:43.516454971 -0700
+++ perl/ext/Win32/t/GetShortPathName.t 2007-06-26 02:10:24.000000000 -0700
@@ -0,0 +1,20 @@
+use strict;
+use Test;
+use Win32;
+
+my $path = "Long Path $$";
+unlink($path);
+END { unlink $path }
+
+plan tests => 5;
+
+Win32::CreateFile($path);
+ok(-f $path);
+
+my $short = Win32::GetShortPathName($path);
+ok($short, qr/^\S{1,8}(\.\S{1,3})?$/);
+ok(-f $short);
+
+unlink($path);
+ok(!-f $path);
+ok(!defined Win32::GetShortPathName($path));

==== //depot/perl/ext/Win32/t/Unicode.t#4 (text) ====
Index: perl/ext/Win32/t/Unicode.t
--- perl/ext/Win32/t/Unicode.t#3~31259~ 2007-05-23 01:12:14.000000000 -0700
+++ perl/ext/Win32/t/Unicode.t  2007-06-26 02:10:24.000000000 -0700
@@ -1,6 +1,5 @@
 use strict;
 use Test;
-
 use Cwd qw(cwd);
 use Win32;
 
End of Patch.

Reply via email to