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

Commit 616daf1

Browse files
committed
doc: add missing API docs
Signed-off-by: Alexander Bezzubov <[email protected]>
1 parent 00abee9 commit 616daf1

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ generation and [libuast](https://github.com/bblfsh/libuast) for XPath queries.
66

77
### Status
88

9-
Latest`scala-client` v2.x supports [UASTv2 protocol](https://doc.bblf.sh/uast/uast-specification-v2.html).
9+
The latest `scala-client` *v2.x* supports the [UASTv2 protocol](https://doc.bblf.sh/uast/uast-specification-v2.html).
1010

1111
### Installation
1212

src/main/native/org_bblfsh_client_v2_libuast_Libuast.cc

+4
Original file line numberDiff line numberDiff line change
@@ -401,12 +401,16 @@ class Node : public uast::Node<Node *> {
401401
}
402402
};
403403

404+
// Custom comparator for keys in std::map<object>.
405+
// Compares actual objects instead of JNI references.
404406
struct EqByObj {
405407
bool operator()(jobject a, jobject b) const {
406408
return getJNIEnv()->IsSameObject(a, b);
407409
}
408410
};
409411

412+
// Custom hasing function for keys in std::map<object>.
413+
// Deligates actual hasing to the managed .hashCode() impl.
410414
struct HashByObj {
411415
std::size_t operator()(jobject obj) const noexcept {
412416
auto hash = IntMethod(getJNIEnv(), "hashCode", "()I", CLS_OBJ, obj);

0 commit comments

Comments
 (0)