Skip to content

Commit 3d35a56

Browse files
committed
Fix compilation with ICU 68
nip2 depends on the ICU library via libxml2. ICU released version 68 on 2010-10-28, and switched to using the C99 bool type in its public headers. nip2 was using "bool" as the name for a gboolean in the ParseConst struct. This commit renames this to "boolean".
1 parent c924df0 commit 3d35a56

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/compile.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ compile_graph( Compile *compile, ParseNode *pn, PElement *out )
815815
break;
816816

817817
case PARSE_CONST_BOOL:
818-
PEPUTP( out, ELEMENT_BOOL, pn->con.val.bool );
818+
PEPUTP( out, ELEMENT_BOOL, pn->con.val.boolean );
819819
break;
820820

821821
case PARSE_CONST_ELIST:
@@ -2523,7 +2523,7 @@ compile_pattern_condition( Compile *compile,
25232523
int i;
25242524

25252525
n.type = PARSE_CONST_BOOL;
2526-
n.val.bool = TRUE;
2526+
n.val.boolean = TRUE;
25272527
node = tree_const_new( compile, n );
25282528

25292529
for( i = depth - 1; i >= 0; i-- ) {

src/lex.l

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ TRUE {
207207
BEGIN BINARY;
208208

209209
yylval.yy_const.type = PARSE_CONST_BOOL;
210-
yylval.yy_const.val.bool = TRUE;
210+
yylval.yy_const.val.boolean = TRUE;
211211

212212
return( TK_CONST );
213213
}
@@ -216,7 +216,7 @@ FALSE {
216216
BEGIN BINARY;
217217

218218
yylval.yy_const.type = PARSE_CONST_BOOL;
219-
yylval.yy_const.val.bool = FALSE;
219+
yylval.yy_const.val.boolean = FALSE;
220220

221221
return( TK_CONST );
222222
}

src/tree.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ struct _ParseConst {
126126
union {
127127
double num;
128128
char *str;
129-
gboolean bool;
129+
gboolean boolean;
130130
int ch;
131131
} val;
132132
};

0 commit comments

Comments
 (0)