diff options
author | Nicolas Williams <nico@cryptonector.com> | 2014-08-08 19:36:43 -0500 |
---|---|---|
committer | Nicolas Williams <nico@cryptonector.com> | 2014-08-08 19:36:43 -0500 |
commit | 4249bbf0d549c6c2e9e1e1e93ccda7f87523cf05 (patch) | |
tree | 89817a01b42dae35c434e8899d05b1a14dde3904 | |
parent | 8a57c27e9210fa6ef197258a0941fdecbd452bf3 (diff) |
Make `nwise` private
-rw-r--r-- | builtin.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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);", // |