[Python-checkins] r85679 - python/branches/py3k/Modules/_multiprocessing/semaphore.c

georg.brandl python-checkins at python.org
Mon Oct 18 07:06:18 CEST 2010


Author: georg.brandl
Date: Mon Oct 18 07:06:18 2010
New Revision: 85679

Log:
Fix compiler warnings about formatting pid_t as an int, by always casting to long.

Modified:
   python/branches/py3k/Modules/_multiprocessing/semaphore.c

Modified: python/branches/py3k/Modules/_multiprocessing/semaphore.c
==============================================================================
--- python/branches/py3k/Modules/_multiprocessing/semaphore.c	(original)
+++ python/branches/py3k/Modules/_multiprocessing/semaphore.c	Mon Oct 18 07:06:18 2010
@@ -433,7 +433,7 @@
         return NULL;
     }
 
-    PyOS_snprintf(buffer, sizeof(buffer), "/mp%d-%d", getpid(), counter++);
+    PyOS_snprintf(buffer, sizeof(buffer), "/mp%ld-%d", (long)getpid(), counter++);
 
     SEM_CLEAR_ERROR();
     handle = SEM_CREATE(buffer, value, maxvalue);


More information about the Python-checkins mailing list