r80470 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80469‎ | r80470 | r80471 >
Date:21:54, 17 January 2011
Author:platonides
Status:deferred
Tags:
Comment:
Those printf should have been removed before committing r80376.
Modified paths:
  • /trunk/extensions/NativePreprocessor/nodes.h (modified) (history)

Diff [purge]

Index: trunk/extensions/NativePreprocessor/nodes.h
@@ -106,7 +106,7 @@
107107 ALLOC_NODESTRING(); \
108108 serializeNode(nodeString + nodeStringLen, &tmpnode); \
109109 nodeStringLen += NODE_LEN; \
110 - storedLength += length; printf("storedLength: %d @%d\n", storedLength, __LINE__);\
 110+ storedLength += length; \
111111 } while (0);
112112
113113 /**
@@ -114,7 +114,7 @@
115115 * Adjacent literal nodes are stored inside of a single node.
116116 */
117117 #define addLiteral(literalText,offset,length) \
118 - do { printf("Addliteral '%.*s'\n", length, literalText+offset);\
 118+ do { \
119119 int my_len = length; \
120120 assert( literalText == text ); \
121121 if ( my_len == -1 ) { \
@@ -139,7 +139,7 @@
140140 struct node* tmpnode; \
141141 if ( currentLiteral.len ) { \
142142 storeNodeWithText(literal_node, currentLiteral.from, currentLiteral.len); \
143 - currentLiteral.len = 0; printf("currentLiteral committed\n"); \
 143+ currentLiteral.len = 0; \
144144 } \
145145 \
146146 tmpnode = alloc_node(); \
@@ -156,7 +156,7 @@
157157 ALLOC_NODESTRING(); \
158158 serializeNode(nodeString + nodeStringLen, tmpnode); \
159159 nodeStringLen += NODE_LEN; \
160 - storedLength += charsToSkip; printf("storedLength: %d @%d\n", storedLength, __LINE__);\
 160+ storedLength += charsToSkip; \
161161 } while(0)
162162
163163 #define closeNode(nodeType) \
@@ -165,9 +165,8 @@
166166 assert( nodeType == tmpnode->type ); \
167167 if ( currentLiteral.len ) { \
168168 storeNodeWithText(literal_node, currentLiteral.from, currentLiteral.len); \
169 - printf("adding literal of %d with parent %c\n", currentLiteral.len, tmpnode->type); \
170169 currentLiteral.len = 0; \
171 - } printf("closing node %c at %d with len of %d\n", tmpnode->type, tmpnode->index, tmpnode->contentLength); \
 170+ } \
172171 tmpnode->nextSibling = nodeStringLen - tmpnode->index - NODE_LEN; \
173172 serializeNode( nodeString + tmpnode->index, tmpnode ); \
174173 parentNode = parentNode->parent; \
@@ -233,7 +232,7 @@
234233 * may be our nephew, instead of our sister (we could ask our
235234 * parent, though)
236235 */
237 -printf("breakSyntax(%.*s)\n", *nodeStringLen, nodeString);
 236+
238237 if ( node->type == bracket_node ) {
239238 node->type = literal_node;
240239 node->nextSibling = 0;
@@ -259,7 +258,7 @@
260259 }
261260
262261 /* Go for part nodes */
263 - while ( readpos < *nodeStringLen ) {printf("breakSyntaw(%.*s) %d %d\n", *nodeStringLen, nodeString, readpos, writepos);
 262+ while ( readpos < *nodeStringLen ) {
264263 assert( nodeString[readpos] == part_node ); /* <part> node */
265264 assert( !memcmp( nodeString + readpos + 8, "00000001", 8 ) ); /* Part nodes contain exactly one character (the pipe) */
266265 node->contentLength = 1;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r80376First half of the Native Preprocessor....platonides08:45, 15 January 2011

Status & tagging log