Skip to content

Commit a5590f0

Browse files
committed
Clarify the lookup paths. Fixes #68.
1 parent f6968f9 commit a5590f0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

doc/libmaxminddb.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -531,8 +531,10 @@ will be populated with the data that is being looked up, if any is found. If
531531
nothing is found, then the `has_data` member of this structure will be false.
532532
If `has_data` is true then you can look at the `data_type` member.
533533
534-
The final parameter is a lookup path. This allow you to navigate a complex
535-
data structure. For example, given this example:
534+
The final parameter is a lookup path. The path consists of a set of strings
535+
representing either map keys (e.g, "city") or array indexes (e.g., "0", "1")
536+
to use in the lookup. This allow you to navigate a complex data structure. For
537+
example, given this example:
536538
537539
```js
538540
{
@@ -564,7 +566,7 @@ regardless of which function you call.
564566
565567
The `MMDB_get_value` function takes a variable number of arguments. All of the
566568
arguments after the `MMDB_entry_data_s *` structure pointer are the lookup
567-
path.
569+
path. The last argument must be `NULL`.
568570
569571
The `MMDB_vget_value` function accepts a `va_list` as the lookup path. The
570572
last element retrieved by `va_arg()` must be `NULL`.

0 commit comments

Comments
 (0)