[pypy-svn] r79393 - pypy/trunk/pypy/translator/c/src

afa at codespeak.net afa at codespeak.net
Tue Nov 23 15:17:08 CET 2010


Author: afa
Date: Tue Nov 23 15:17:07 2010
New Revision: 79393

Modified:
   pypy/trunk/pypy/translator/c/src/debug_alloc.h
   pypy/trunk/pypy/translator/c/src/debug_print.h
Log:
Fix compilation on Windows


Modified: pypy/trunk/pypy/translator/c/src/debug_alloc.h
==============================================================================
--- pypy/trunk/pypy/translator/c/src/debug_alloc.h	(original)
+++ pypy/trunk/pypy/translator/c/src/debug_alloc.h	Tue Nov 23 15:17:07 2010
@@ -1,5 +1,5 @@
 /**************************************************************/
- /***  tracking raw mallocs and frees for debugging          ***/
+/***  tracking raw mallocs and frees for debugging          ***/
 
 #ifndef RPY_ASSERT
 
@@ -62,8 +62,8 @@
     count++;
   if (count > 0)
     {
-      fprintf(stderr, "debug_alloc.h: %ld mallocs left", count);
       char *env = getenv("PYPY_ALLOC");
+      fprintf(stderr, "debug_alloc.h: %ld mallocs left", count);
       if (env && *env)
         {
           fprintf(stderr, " (most recent first):\n");

Modified: pypy/trunk/pypy/translator/c/src/debug_print.h
==============================================================================
--- pypy/trunk/pypy/translator/c/src/debug_print.h	(original)
+++ pypy/trunk/pypy/translator/c/src/debug_print.h	Tue Nov 23 15:17:07 2010
@@ -72,7 +72,11 @@
 {
   char *filename = getenv("PYPYLOG");
   if (filename)
+#ifndef MS_WINDOWS
     unsetenv("PYPYLOG");   /* don't pass it to subprocesses */
+#else
+    putenv("PYPYLOG=");    /* don't pass it to subprocesses */
+#endif
   if (filename && filename[0])
     {
       char *colon = strchr(filename, ':');



More information about the Pypy-commit mailing list