Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

Commit

Permalink
Bump libuast version (#74)
Browse files Browse the repository at this point in the history
* Bump libuast version

Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
  • Loading branch information
juanjux authored and dennwc committed Aug 16, 2018
1 parent a2109b5 commit 65e3651
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Package configuration
PROJECT = client-go
LIBUAST_VERSION ?= 2.0.0
LIBUAST_VERSION ?= 2.0.1

TOOLS_FOLDER = tools

Expand Down Expand Up @@ -65,4 +65,4 @@ unix-dependencies:
curl -SL https://github.com/bblfsh/libuast/archive/v$(LIBUAST_VERSION).tar.gz | tar xz
mv libuast-$(LIBUAST_VERSION)/src/* $(TOOLS_FOLDER)/.
rm -rf libuast-$(LIBUAST_VERSION)
.PHONY: unix-dependencies
.PHONY: unix-dependencies
5 changes: 4 additions & 1 deletion tools/uast.cc
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,11 @@ Nodes *UastFilter(const Uast *ctx, NodeHandle node, const char *query) {

auto nodeset = queryResult.xpathObj->nodesetval;
if (!nodeset) {
Error(nullptr, "Unable to get array of result nodes\n");
if (NodesSetSize(nodes, 0) != 0) {
Error(nullptr, "Unable to set nodes size\n");
throw std::runtime_error("");
}
return nodes;
}

auto results = nodeset->nodeTab;
Expand Down

0 comments on commit 65e3651

Please sign in to comment.