r101152 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101151‎ | r101152 | r101153 >
Date:17:01, 28 October 2011
Author:platonides
Status:deferred
Tags:
Comment:
Move empty_str definition to expand.c
Was failing with multiple definition of `empty_str' (between expand.o and preprocesstoobj.o) in newer gcc
Due to gcc 4.3 changes? http://gcc.gnu.org/gcc-4.3/porting_to.html
Modified paths:
  • /trunk/extensions/NativePreprocessor/expand.c (modified) (history)
  • /trunk/extensions/NativePreprocessor/nodes.h (modified) (history)

Diff [purge]

Index: trunk/extensions/NativePreprocessor/expand.c
@@ -33,6 +33,8 @@
3434 void *parent;
3535 };
3636
 37+const struct str_ref empty_str = { NULL, 0, false };
 38+
3739 /* Call insertStripItem() in the parser object, and return the given
3840 * zval, which shall be a string (or null)
3941 */
Index: trunk/extensions/NativePreprocessor/nodes.h
@@ -32,11 +32,11 @@
3333
3434 /* May contain childs: root_node, ext_node, name_node, heading_node (h?_node), template_node, tplarg_node, title_node, part_node, value_node */
3535
36 -const struct str_ref {
 36+struct str_ref {
3737 char const* string;
3838 int length;
3939 bool allocated;
40 -} empty_str = { NULL, 0, false };
 40+};
4141
4242 extern inline void str_ref_free(struct str_ref* str) {
4343 if ( str->allocated ) {

Status & tagging log