mercurial/cffi/mpatch.py
branchstable
changeset 51788 472699b5ddb3
parent 51786 ecc3a893979d
child 51859 f4733654f144
--- a/mercurial/cffi/mpatch.py	Mon Aug 05 21:21:32 2024 +0200
+++ b/mercurial/cffi/mpatch.py	Tue Aug 06 17:53:59 2024 +0200
@@ -20,7 +20,7 @@
 def cffi_get_next_item(arg, pos):
     all, bins = ffi.from_handle(arg)
     container = ffi.new("struct mpatch_flist*[1]")
-    to_pass = ffi.new("char[]", str(bins[pos]))
+    to_pass = ffi.new("char[]", bytes(bins[pos]))
     all.append(to_pass)
     r = lib.mpatch_decode(to_pass, len(to_pass) - 1, container)
     if r < 0: