1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
|
From: =?utf-8?b?Z8OpYmFsbGlu?= <macniaque@free.fr>
Date: Wed, 9 Jun 2021 00:23:40 +0200
Subject: Rename bool to boolean since bool is now a type in C (until C99...)
Closes: #1011718
URL: https://github.com/olebole/tclxml/pull/1
---
tclxml.c | 18 +++++++++---------
tclxslt-libxslt.c | 6 +++---
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/tclxml.c b/tclxml.c
index adc2e0f..2ee5d4f 100755
--- a/tclxml.c
+++ b/tclxml.c
@@ -1580,7 +1580,7 @@ TclXMLInstanceConfigure (interp, xmlinfo, objc, objv)
int objc;
Tcl_Obj *CONST objv[];
{
- int index, bool, doParse = 0, result;
+ int index, boolean, doParse = 0, result;
TclXML_ParserClassInfo *classinfo = (TclXML_ParserClassInfo *) xmlinfo->parserClass;
while (objc > 1) {
@@ -1639,14 +1639,14 @@ TclXMLInstanceConfigure (interp, xmlinfo, objc, objv)
switch ((enum instanceConfigureSwitches) index) {
case TCLXML_FINAL: /* -final */
- if (Tcl_GetBooleanFromObj(interp, objv[1], &bool) != TCL_OK) {
+ if (Tcl_GetBooleanFromObj(interp, objv[1], &boolean) != TCL_OK) {
return TCL_ERROR;
}
- if (bool && !xmlinfo->final) {
+ if (boolean && !xmlinfo->final) {
doParse = 1;
- } else if (!bool && xmlinfo->final) {
+ } else if (!boolean && xmlinfo->final) {
/*
* Reset the parser for new input
*/
@@ -1654,7 +1654,7 @@ TclXMLInstanceConfigure (interp, xmlinfo, objc, objv)
TclXMLResetParser(interp, xmlinfo);
doParse = 0;
}
- xmlinfo->final = bool;
+ xmlinfo->final = boolean;
break;
case TCLXML_ENCODING: /* -encoding */
@@ -1666,14 +1666,14 @@ TclXMLInstanceConfigure (interp, xmlinfo, objc, objv)
break;
case TCLXML_VALIDATE: /* -validate */
- if (Tcl_GetBooleanFromObj(interp, objv[1], &bool) != TCL_OK) {
+ if (Tcl_GetBooleanFromObj(interp, objv[1], &boolean) != TCL_OK) {
return TCL_ERROR;
}
/*
* If the parser is in the middle of parsing a document,
* this will be ignored. Perhaps an error should be returned?
*/
- xmlinfo->validate = bool;
+ xmlinfo->validate = boolean;
break;
case TCLXML_BASEURL: /* -baseurl, -baseuri */
@@ -1688,10 +1688,10 @@ TclXMLInstanceConfigure (interp, xmlinfo, objc, objv)
case TCLXML_DEFAULTEXPANDINTERNALENTITIES: /* -defaultexpandinternalentities */
/* ericm@scriptics */
- if (Tcl_GetBooleanFromObj(interp, objv[1], &bool) != TCL_OK) {
+ if (Tcl_GetBooleanFromObj(interp, objv[1], &boolean) != TCL_OK) {
return TCL_ERROR;
}
- xmlinfo->expandinternalentities = bool;
+ xmlinfo->expandinternalentities = boolean;
break;
case TCLXML_PARAMENTITYPARSING:
diff --git a/tclxslt-libxslt.c b/tclxslt-libxslt.c
index 73e0f61..a6b9be2 100644
--- a/tclxslt-libxslt.c
+++ b/tclxslt-libxslt.c
@@ -1565,10 +1565,10 @@ TclXSLT_ConvertTclObjToXPathObj(interp, objPtr)
return NULL;
}
} else if (objPtr->typePtr == Tcl_GetObjType("boolean")) {
- int bool;
+ int boolean;
- if (Tcl_GetBooleanFromObj(interp, objPtr, &bool) == TCL_OK) {
- return xmlXPathNewBoolean(bool);
+ if (Tcl_GetBooleanFromObj(interp, objPtr, &boolean) == TCL_OK) {
+ return xmlXPathNewBoolean(boolean);
} else {
return NULL;
}
|