Skip to content

Commit 24828e2

Browse files
authored
Merge pull request #1 from Geballin/master
On modern gcc, bool is now a data type
2 parents 1ed6525 + abb82c2 commit 24828e2

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

tclxml.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1576,7 +1576,7 @@ TclXMLInstanceConfigure (interp, xmlinfo, objc, objv)
15761576
int objc;
15771577
Tcl_Obj *CONST objv[];
15781578
{
1579-
int index, bool, doParse = 0, result;
1579+
int index, boolean, doParse = 0, result;
15801580
TclXML_ParserClassInfo *classinfo = (TclXML_ParserClassInfo *) xmlinfo->parserClass;
15811581

15821582
while (objc > 1) {
@@ -1635,22 +1635,22 @@ TclXMLInstanceConfigure (interp, xmlinfo, objc, objv)
16351635
switch ((enum instanceConfigureSwitches) index) {
16361636
case TCLXML_FINAL: /* -final */
16371637

1638-
if (Tcl_GetBooleanFromObj(interp, objv[1], &bool) != TCL_OK) {
1638+
if (Tcl_GetBooleanFromObj(interp, objv[1], &boolean) != TCL_OK) {
16391639
return TCL_ERROR;
16401640
}
16411641

1642-
if (bool && !xmlinfo->final) {
1642+
if (boolean && !xmlinfo->final) {
16431643
doParse = 1;
16441644

1645-
} else if (!bool && xmlinfo->final) {
1645+
} else if (!boolean && xmlinfo->final) {
16461646
/*
16471647
* Reset the parser for new input
16481648
*/
16491649

16501650
TclXMLResetParser(interp, xmlinfo);
16511651
doParse = 0;
16521652
}
1653-
xmlinfo->final = bool;
1653+
xmlinfo->final = boolean;
16541654
break;
16551655

16561656
case TCLXML_ENCODING: /* -encoding */
@@ -1662,14 +1662,14 @@ TclXMLInstanceConfigure (interp, xmlinfo, objc, objv)
16621662
break;
16631663

16641664
case TCLXML_VALIDATE: /* -validate */
1665-
if (Tcl_GetBooleanFromObj(interp, objv[1], &bool) != TCL_OK) {
1665+
if (Tcl_GetBooleanFromObj(interp, objv[1], &boolean) != TCL_OK) {
16661666
return TCL_ERROR;
16671667
}
16681668
/*
16691669
* If the parser is in the middle of parsing a document,
16701670
* this will be ignored. Perhaps an error should be returned?
16711671
*/
1672-
xmlinfo->validate = bool;
1672+
xmlinfo->validate = boolean;
16731673
break;
16741674

16751675
case TCLXML_BASEURL: /* -baseurl, -baseuri */
@@ -1684,10 +1684,10 @@ TclXMLInstanceConfigure (interp, xmlinfo, objc, objv)
16841684

16851685
case TCLXML_DEFAULTEXPANDINTERNALENTITIES: /* -defaultexpandinternalentities */
16861686
/* ericm@scriptics */
1687-
if (Tcl_GetBooleanFromObj(interp, objv[1], &bool) != TCL_OK) {
1687+
if (Tcl_GetBooleanFromObj(interp, objv[1], &boolean) != TCL_OK) {
16881688
return TCL_ERROR;
16891689
}
1690-
xmlinfo->expandinternalentities = bool;
1690+
xmlinfo->expandinternalentities = boolean;
16911691
break;
16921692

16931693
case TCLXML_PARAMENTITYPARSING:

tclxslt-libxslt.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2420,10 +2420,10 @@ TclXSLT_ConvertTclObjToXPathObj(interp, objPtr)
24202420
return NULL;
24212421
}
24222422
} else if (objPtr->typePtr == Tcl_GetObjType("boolean")) {
2423-
int bool;
2423+
int boolean;
24242424

2425-
if (Tcl_GetBooleanFromObj(interp, objPtr, &bool) == TCL_OK) {
2426-
return xmlXPathNewBoolean(bool);
2425+
if (Tcl_GetBooleanFromObj(interp, objPtr, &boolean) == TCL_OK) {
2426+
return xmlXPathNewBoolean(boolean);
24272427
} else {
24282428
return NULL;
24292429
}

0 commit comments

Comments
 (0)