summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Williams <nico@cryptonector.com>2014-08-08 19:36:43 -0500
committerNicolas Williams <nico@cryptonector.com>2014-08-08 19:36:43 -0500
commit4249bbf0d549c6c2e9e1e1e93ccda7f87523cf05 (patch)
tree89817a01b42dae35c434e8899d05b1a14dde3904
parent8a57c27e9210fa6ef197258a0941fdecbd452bf3 (diff)
Make `nwise` private
-rw-r--r--builtin.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin.c b/builtin.c
index fdf947a0..79f89af0 100644
--- a/builtin.c
+++ b/builtin.c
@@ -998,15 +998,15 @@ static const char* const jq_builtins[] = {
//
// If input is an array, then emit a stream of successive subarrays of length n (or less),
// and similarly for strings.
- "def nwise(a; $n): if a|length <= $n then a else a[0:$n] , nwise(a[$n:]; $n) end;",
- "def nwise($n): nwise(.; $n);",
+ "def _nwise(a; $n): if a|length <= $n then a else a[0:$n] , _nwise(a[$n:]; $n) end;",
+ "def _nwise($n): _nwise(.; $n);",
//
// splits/1 produces a stream; split/1 is retained for backward compatibility.
"def splits($re; flags): . as $s"
// # multiple occurrences of "g" are acceptable
" | [ match($re; \"g\" + flags) | (.offset, .offset + .length) ]"
" | [0] + . +[$s|length]"
- " | nwise(2)"
+ " | _nwise(2)"
" | $s[.[0]:.[1] ] ;",
"def splits($re): splits($re; null);",
//