Author: Armin Rigo <[email protected]>
Branch:
Changeset: r977:83b7d2d60a20
Date: 2014-03-12 09:26 +0100
http://bitbucket.org/pypy/stmgc/changeset/83b7d2d60a20/
Log: Tweak: expose this logic for pypy
diff --git a/c7/stm/fprintcolor.c b/c7/stm/fprintcolor.c
--- a/c7/stm/fprintcolor.c
+++ b/c7/stm/fprintcolor.c
@@ -3,11 +3,6 @@
/* ------------------------------------------------------------ */
-static int dprintfcolor(void)
-{
- return 31 + STM_SEGMENT->segment_num % 6;
-}
-
static int threadcolor_printf(const char *format, ...)
{
char buffer[2048];
diff --git a/c7/stm/fprintcolor.h b/c7/stm/fprintcolor.h
--- a/c7/stm/fprintcolor.h
+++ b/c7/stm/fprintcolor.h
@@ -7,7 +7,10 @@
#define dprintf(args) threadcolor_printf args
-static int dprintfcolor(void);
+static inline int dprintfcolor(void)
+{
+ return 31 + STM_SEGMENT->segment_num % 6;
+}
static int threadcolor_printf(const char *format, ...)
__attribute__((format (printf, 1, 2)));
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit