develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r34800 - trunk/src

From:
kjs
Date:
January 2, 2009 04:32
Subject:
[svn:parrot] r34800 - trunk/src
Message ID:
20090102123230.38553CB9FA@x12.develooper.com
Author: kjs
Date: Fri Jan  2 04:32:29 2009
New Revision: 34800

Modified:
   trunk/src/debug.c

Log:
[src] the ASSERT_ARGS macro in debug.c expands to a statement, after which a var. declaration follows. This is not allowed, and won't build on MSVC. This patch moves the declaration to before the assertion, but it can't be 'const' any more, as the declaration is separate from initialization.

Modified: trunk/src/debug.c
==============================================================================
--- trunk/src/debug.c	(original)
+++ trunk/src/debug.c	Fri Jan  2 04:32:29 2009
@@ -783,8 +783,9 @@
 static void
 chop_newline(ARGMOD(char * buf))
 {
+    size_t l;
     ASSERT_ARGS(chop_newline);
-    const size_t l = strlen(buf);
+    l = strlen(buf);
     if (l > 0 && buf [l - 1] == '\n')
         buf [l - 1] = '\0';
 }



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About