[libdispatch-changes] [64] trunk/src/internal.h

source_changes at macosforge.org source_changes at macosforge.org
Wed Oct 28 02:21:12 PDT 2009


Revision: 64
          http://trac.macosforge.org/projects/libdispatch/changeset/64
Author:   robert at fledge.watson.org
Date:     2009-10-28 02:21:08 -0700 (Wed, 28 Oct 2009)
Log Message:
-----------
Cast _dispatch_thread_self() to (void *) before printing as a pointer,
as thread IDs are not pointers on all platforms.  It's not clear exactly
what format string should be used to print a thread ID, but %p continues
seems to remain a reasonable way forward.

Submitted by:	Paolo Bonzini <bonzini at gnu.org>

Modified Paths:
--------------
    trunk/src/internal.h

Modified: trunk/src/internal.h
===================================================================
--- trunk/src/internal.h	2009-10-28 09:02:48 UTC (rev 63)
+++ trunk/src/internal.h	2009-10-28 09:21:08 UTC (rev 64)
@@ -229,7 +229,8 @@
 #define _dispatch_debug(x, args...)	\
 ({	\
 	if (DISPATCH_DEBUG) {	\
-		_dispatch_log("libdispatch: %u\t%p\t" x, __LINE__, _dispatch_thread_self(), ##args);	\
+		_dispatch_log("libdispatch: %u\t%p\t" x, __LINE__,	\
+		    (void *)_dispatch_thread_self(), ##args);	\
 	}	\
 })
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/libdispatch-changes/attachments/20091028/5f334f09/attachment.html>


More information about the libdispatch-changes mailing list