Change 34090 by [EMAIL PROTECTED] on 2008/06/27 14:39:33

        Upgrade to Win32-0.37

Affected files ...

... //depot/perl/ext/Win32/Changes#4 edit
... //depot/perl/ext/Win32/Win32.pm#16 edit
... //depot/perl/ext/Win32/Win32.xs#12 edit

Differences ...

==== //depot/perl/ext/Win32/Changes#4 (text) ====
Index: perl/ext/Win32/Changes
--- perl/ext/Win32/Changes#3~33720~     2008-04-22 02:38:45.000000000 -0700
+++ perl/ext/Win32/Changes      2008-06-27 07:39:33.000000000 -0700
@@ -1,5 +1,8 @@
 Revision history for the Perl extension Win32.
 
+0.37   [2008-06-26]
+       - Add Win32::GetCurrentProcessId() function
+
 0.36   [2008-04-17]
        - Add typecasts for Win64 compilation
 

==== //depot/perl/ext/Win32/Win32.pm#16 (text) ====
Index: perl/ext/Win32/Win32.pm
--- perl/ext/Win32/Win32.pm#15~33720~   2008-04-22 02:38:45.000000000 -0700
+++ perl/ext/Win32/Win32.pm     2008-06-27 07:39:33.000000000 -0700
@@ -8,7 +8,7 @@
     require DynaLoader;
 
     @ISA = qw|Exporter DynaLoader|;
-    $VERSION = '0.36';
+    $VERSION = '0.37';
     $XS_VERSION = $VERSION;
     $VERSION = eval $VERSION;
 
@@ -403,15 +403,25 @@
 ANSI path name for the current directory if the long pathname cannot
 be represented in the system codepage.
 
+=item Win32::GetCurrentProcessId()
+
+Returns the process identifier of the current process.  Until the
+process terminates, the process identifier uniquely identifies the
+process throughout the system.
+
+The current process identifier is normally also available via the
+predefined $$ variable.  Under fork() emulation however $$ may contain
+a pseudo-process identifier that is only meaningful to the Perl
+kill(), wait() and waitpid() functions.  The
+Win32::GetCurrentProcessId() function will always return the regular
+Windows process id, even when called from inside a pseudo-process.
+
 =item Win32::GetCurrentThreadId()
 
 Returns the thread identifier of the calling thread.  Until the thread
 terminates, the thread identifier uniquely identifies the thread
 throughout the system.
 
-Note: the current process identifier is available via the predefined
-$$ variable.
-
 =item Win32::GetFileVersion(FILENAME)
 
 Returns the file version number from the VERSIONINFO resource of

==== //depot/perl/ext/Win32/Win32.xs#12 (text) ====
Index: perl/ext/Win32/Win32.xs
--- perl/ext/Win32/Win32.xs#11~33720~   2008-04-22 02:38:45.000000000 -0700
+++ perl/ext/Win32/Win32.xs     2008-06-27 07:39:33.000000000 -0700
@@ -1590,6 +1590,13 @@
     XSRETURN_EMPTY;
 }
 
+XS(w32_GetCurrentProcessId)
+{
+    dXSARGS;
+    EXTEND(SP,1);
+    XSRETURN_IV(GetCurrentProcessId());
+}
+
 XS(w32_GetCurrentThreadId)
 {
     dXSARGS;
@@ -1701,6 +1708,7 @@
     newXS("Win32::CopyFile", w32_CopyFile, file);
     newXS("Win32::Sleep", w32_Sleep, file);
     newXS("Win32::OutputDebugString", w32_OutputDebugString, file);
+    newXS("Win32::GetCurrentProcessId", w32_GetCurrentProcessId, file);
     newXS("Win32::GetCurrentThreadId", w32_GetCurrentThreadId, file);
     newXS("Win32::CreateDirectory", w32_CreateDirectory, file);
     newXS("Win32::CreateFile", w32_CreateFile, file);
End of Patch.

Reply via email to