From 1972eee6be452da55fc2f6eebc14eea043e42732 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Fri, 10 Jul 2026 18:23:34 +0100 Subject: Document that jv_string_to_py_string does not consume its input --- jq.pyx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jq.pyx b/jq.pyx index 7ea6960..5a9704c 100644 --- a/jq.pyx +++ b/jq.pyx @@ -475,6 +475,10 @@ def jq(object program): cdef unicode jv_string_to_py_string(jv value): + """Convert a jv string into a Python string. + + Does not consume its input.""" + cdef int length = jv_string_length_bytes(jv_copy(value)) cdef char* string_value = jv_string_value(value) return string_value[:length].decode("utf-8") -- cgit v1.2.3