Skip to content

Commit

Permalink
Merge pull request #60 from jfedyczak/master
Browse files Browse the repository at this point in the history
use the proper api for array push (64-bit FreeBSD XPath fix)
  • Loading branch information
polotek committed Dec 16, 2011
2 parents daaa71b + a51d7b7 commit e433189
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/xml_xpath_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,9 @@ XmlXpathContext::evaluate(const xmlChar* xpath) {
v8::Handle<v8::Array> nodes = v8::Array::New(result->nodesetval->nodeNr);
v8::Handle<v8::Function> push = v8::Handle<v8::Function>::Cast(
nodes->Get(v8::String::NewSymbol("push")));
v8::Handle<v8::Value> argv[1];
for (int i = 0; i != result->nodesetval->nodeNr; ++i) {
xmlNode *node = result->nodesetval->nodeTab[i];
argv[0] = LibXmlObj::GetMaybeBuild<XmlElement, xmlNode>(node);
push->Call(nodes, 1, argv);
nodes->Set(i,LibXmlObj::GetMaybeBuild<XmlElement, xmlNode>(node));
}

xmlXPathFreeObject(result);
Expand Down

0 comments on commit e433189

Please sign in to comment.