pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

wip/cyclone: Fix copying of empty bytevectors



Module Name:	pkgsrc-wip
Committed By:	Yorick Hardy <yorickhardy%gmail.com@localhost>
Pushed By:	yhardy
Date:		Mon Jul 27 21:54:28 2026 +0000
Changeset:	1db506ca7368dbcec9e6c92cb12b1a7b9dc8c54f

Modified Files:
	cyclone/distinfo
	cyclone/patches/patch-scheme_base.sld

Log Message:
wip/cyclone: Fix copying of empty bytevectors

Pull request: https://github.com/justinethier/cyclone/pull/565

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=1db506ca7368dbcec9e6c92cb12b1a7b9dc8c54f

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 cyclone/distinfo                      |  2 +-
 cyclone/patches/patch-scheme_base.sld | 20 +++++++++++++++++---
 2 files changed, 18 insertions(+), 4 deletions(-)

diffs:
diff --git a/cyclone/distinfo b/cyclone/distinfo
index bc9ae18e33..d954741942 100644
--- a/cyclone/distinfo
+++ b/cyclone/distinfo
@@ -9,6 +9,6 @@ SHA1 (patch-cyclone.scm) = e624dd62369d92b88501f8770d3504e78e311321
 SHA1 (patch-gc.c) = ef28c26e399d3572239895b89375d85f9133fd07
 SHA1 (patch-include_cyclone_types.h) = caf0f87ec67d42aad59d7041c50de12fac20c932
 SHA1 (patch-issue-560) = 8c46b08f5741622de75d26af6920d1f5ba31b39a
-SHA1 (patch-scheme_base.sld) = b9aaeb494572eb4fddecf25d30eae7cafe77163f
+SHA1 (patch-scheme_base.sld) = 27babe03d9f6980f27e6ee3852fb5b86cc4c40a3
 SHA1 (patch-srfi_106.sld) = d8929991450c841fd00330d6b1e705a7290900bb
 SHA1 (patch-tests_macro-hygiene.scm) = 3e640ae4e4f67f0d3e3be7670559748758ac66bc
diff --git a/cyclone/patches/patch-scheme_base.sld b/cyclone/patches/patch-scheme_base.sld
index 79e0b40203..e1e2fcc14e 100644
--- a/cyclone/patches/patch-scheme_base.sld
+++ b/cyclone/patches/patch-scheme_base.sld
@@ -1,12 +1,26 @@
 $NetBSD$
 
+Fix copying of an empty bytevector when start and end arguments
+are omitted.
+
 Make let-values be the same as let*-values, to work around 
 
  https://github.com/justinethier/cyclone/issues/504
 
---- scheme/base.sld.orig	2022-08-25 21:12:33.000000000 +0000
+--- scheme/base.sld.orig	2026-07-27 21:18:39.260568143 +0000
 +++ scheme/base.sld
-@@ -1877,7 +1877,7 @@
+@@ -972,7 +972,9 @@
+       (letrec ((len (bytevector-length bv))
+                (start (if (> (length opts) 0) (car opts) 0))
+                (end (if (> (length opts) 1) (cadr opts) len)))
+-        (Cyc-bytevector-copy bv start end)))
++        (if (and (equal? len 0) (equal? (length opts) 0))
++          (make-bytevector 0)
++          (Cyc-bytevector-copy bv start end))))
+     (define (bytevector-copy! to at from . o)
+       (let* ((start (if (pair? o) (car o) 0))
+              (end (if (and (pair? o) (pair? (cdr o)))
+@@ -1877,7 +1879,7 @@
       (let-values ("step") () () expr () params rest . body))
      ))
  
@@ -15,7 +29,7 @@ Make let-values be the same as let*-values, to work around
    let-values
    (syntax-rules
      ()
-@@ -1945,6 +1945,13 @@
+@@ -1945,6 +1947,13 @@
         (lambda (arg ... . x)
           (let-values "bind" bindings (tmp ... (a x)) body))))))
  


Home | Main Index | Thread Index | Old Index