diff options
| author | Michael Williamson <mike@zwobble.org> | 2026-07-10 17:57:36 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2026-07-10 17:57:36 +0100 |
| commit | a98b7eccf5230a5cfe7c97e31cb0039ad956da4c (patch) | |
| tree | ce48c018782e1708121886601893bdd0a73eae1e /jq.pyx | |
| parent | 40f4b9da27f54b57cc682e5642a2b181d4488de8 (diff) | |
Get length once
Diffstat (limited to 'jq.pyx')
| -rw-r--r-- | jq.pyx | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -105,7 +105,8 @@ cdef object _jv_to_python(jv value): python_value = jv_string_to_py_string(value) elif kind == JV_KIND_ARRAY: python_value = [] - for idx in range(0, jv_array_length(jv_copy(value))): + length = jv_array_length(jv_copy(value)) + for idx in range(0, length): property_value = jv_array_get(jv_copy(value), idx) python_value.append(_jv_to_python(property_value)) elif kind == JV_KIND_OBJECT: |
