[xml] Question about xmlXPathCastStringToBoolean function
- From: Matthias Jung <matthias jung xtradyne com>
- To: xml gnome org
- Subject: [xml] Question about xmlXPathCastStringToBoolean function
- Date: Mon, 14 Jul 2003 16:20:06 +0200
Hey Daniel, All
is the implementation of xmlXPathCastStringToBoolean really correct?
I at least would have expected this function to return '0' if the input
is a string like 'false'.
In the current (2.5.7) implementation a call like:
if ( xmlXPathCastStringToBoolean(BAD_CAST "false") )
would evaluate to true;
Regards
Matthias
See:
int
xmlXPathCastStringToBoolean (const xmlChar *val) {
if ((val == NULL) || (xmlStrlen(val) == 0))
return(0);
return(1);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]