From: Ilya M. <m_...@us...> - 2003-03-29 15:44:00
|
Update of /cvsroot/perl-xml/XML-LibXML-XPathContext In directory sc8-pr-cvs1:/tmp/cvs-serv5708 Modified Files: XPathContext.xs Log Message: Add missing include for xpathInternals.h which fixes problems with float numbers used in xpath expressions on platforms where PV != double Index: XPathContext.xs =================================================================== RCS file: /cvsroot/perl-xml/XML-LibXML-XPathContext/XPathContext.xs,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- XPathContext.xs 27 Mar 2003 10:06:37 -0000 1.25 +++ XPathContext.xs 29 Mar 2003 15:43:54 -0000 1.26 @@ -17,6 +17,7 @@ #include "perl-libxml-mm.h" #include "xpath.h" +#include "xpathInternals.h" #ifdef __cplusplus } @@ -128,7 +129,6 @@ AV * array_result; xmlXPathObjectPtr ret; - /* warn("result is a node list\n"); */ ret = (xmlXPathObjectPtr) xmlXPathNewNodeSet((xmlNodePtr) NULL); array_result = (AV*)SvRV(perl_result); length = av_len(array_result); @@ -154,7 +154,6 @@ xmlNodePtr tmp_node; xmlXPathObjectPtr ret; - /* warn("result is a node\n"); */ ret = (xmlXPathObjectPtr)xmlXPathNewNodeSet(NULL); tmp_node = (xmlNodePtr)PmmSvNode(perl_result); xmlXPathNodeSetAdd(ret->nodesetval,tmp_node); @@ -166,12 +165,10 @@ return ret; } else if (sv_isa(perl_result, "XML::LibXML::Boolean")) { - /* warn("result is a boolean\n"); */ return (xmlXPathObjectPtr) xmlXPathNewBoolean(SvIV(SvRV(perl_result))); } else if (sv_isa(perl_result, "XML::LibXML::Literal")) { - /* warn("result is a literal\n"); */ return (xmlXPathObjectPtr) xmlXPathNewCString(SvPV_nolen(SvRV(perl_result))); } @@ -180,10 +177,8 @@ xmlXPathNewFloat(SvNV(SvRV(perl_result))); } } else if (SvNOK(perl_result) || SvIOK(perl_result)) { - /* warn("result is an unblessed number\n"); */ return (xmlXPathObjectPtr)xmlXPathNewFloat(SvNV(perl_result)); } else { - /* warn("result is an unblessed string\n"); */ return (xmlXPathObjectPtr) xmlXPathNewCString(SvPV_nolen(perl_result)); } |