summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2026-07-10 18:23:34 +0100
committerMichael Williamson <mike@zwobble.org>2026-07-10 18:23:34 +0100
commit1972eee6be452da55fc2f6eebc14eea043e42732 (patch)
treeec128c33fd6d1648543d60b343c7317733a84bce
parentfbc08f6ea80d36f86967d0f184a8d25ecaa9d314 (diff)
Document that jv_string_to_py_string does not consume its input
-rw-r--r--jq.pyx4
1 files changed, 4 insertions, 0 deletions
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")