From unknown Thu Jun 19 14:03:55 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#58669 <58669@debbugs.gnu.org> To: bug#58669 <58669@debbugs.gnu.org> Subject: Status: 28.2; bindat: str and strz not operating on vectors Reply-To: bug#58669 <58669@debbugs.gnu.org> Date: Thu, 19 Jun 2025 21:03:55 +0000 retitle 58669 28.2; bindat: str and strz not operating on vectors reassign 58669 emacs submitter 58669 Nacho Barrientos severity 58669 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 20 16:10:48 2022 Received: (at submit) by debbugs.gnu.org; 20 Oct 2022 20:10:48 +0000 Received: from localhost ([127.0.0.1]:36211 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olbsB-0004bX-Fd for submit@debbugs.gnu.org; Thu, 20 Oct 2022 16:10:48 -0400 Received: from lists.gnu.org ([209.51.188.17]:33576) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olZZN-0007Bn-CJ for submit@debbugs.gnu.org; Thu, 20 Oct 2022 13:43:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olZZM-0001mt-MV for bug-gnu-emacs@gnu.org; Thu, 20 Oct 2022 13:43:01 -0400 Received: from mail-gv0che01on20602.outbound.protection.outlook.com ([2a01:111:f403:4012::602] helo=CHE01-GV0-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olZZI-0005YM-La for bug-gnu-emacs@gnu.org; Thu, 20 Oct 2022 13:43:00 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cuYJe8/Tp/kIIRWolzNWmb1HW6i6m8GzI//PW0zQaWIC7vfVfG9rX9ZSYnJYwvLA6+Nol8QUKWTu00BOfqC2PocDuUPF/yEMeA/K+HmR4NerDqMjnqNUgYUaFuN01b3xKauzT7uF7/1A3EyRqZfKNWtexDtuKBoyMGMw3L4xVwDK5WeJSc6qguYfS1FylgZTQ6fU9+XGBXEoDlqO2QoKAV/eAHg8MbmLYJ0FEY6bhsFU3G7xcls8q3PQlC1EseNJEaXqaTkDCDV5pnvcTs38IVfNCgqABK7dcIjgTi3guJakKRihz01F+LsFdrbO1K9BJcBhMRDjvMO0dbgRNKbD1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kUB3JpVTFU0hluHZlrzHA7fm4+ZxWLIBCIG3dhAXMaY=; b=dqs7NiMB3h/AeE0tgckyRUqgH2Cgl4uoCDP3biCFwmxaCOra6GOpx88HgpCut4ePAmgOMmGfJDB6JepnMfaztabM0bGSLA/2W+BqHNB04fYqnPIt2MXm/xhZ4oLMhKAUjVR22X+ryuL3jHAK/aXAupQu5FJPMYhJhFq3eMbiXtstxLxxL5NU5nvA8XAW6CqNlp2pgrU4rN5EThy3QE6gPR0ATSnspxzOPTiGzygBdW0w+qGhHSBQejq6VVVXm9r7VntkGPMem//7rAinqrgo28vQeFYaHJpZYBeKc+xhJhBvr6SZb0bizDsGqkO9+1ol045txyWcRoXio/OFcz3xeg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cern.ch; dmarc=pass action=none header.from=cern.ch; dkim=pass header.d=cern.ch; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cern.onmicrosoft.com; s=selector2-cern-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kUB3JpVTFU0hluHZlrzHA7fm4+ZxWLIBCIG3dhAXMaY=; b=syCBvd+QJ8M51/U8l9nYXX4UXOsg8en4lCCchp5BEwWTFC+dSGA0PtZX2SEznc4fMX5Y1S1aEk2PnapsOW5UpyAFPdDRu6la9M7i+3VN/F4Hv692x6ye4LtBZWoSx6wmjbl8erEKnXwz52npowJoihtfyj70N0yMFYyW8/nQP4k= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=cern.ch; Received: from ZR0P278MB0457.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:30::14) by GV0P278MB0099.CHEP278.PROD.OUTLOOK.COM (2603:10a6:710:27::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.32; Thu, 20 Oct 2022 17:37:47 +0000 Received: from ZR0P278MB0457.CHEP278.PROD.OUTLOOK.COM ([fe80::a262:8c80:796b:107]) by ZR0P278MB0457.CHEP278.PROD.OUTLOOK.COM ([fe80::a262:8c80:796b:107%8]) with mapi id 15.20.5723.034; Thu, 20 Oct 2022 17:37:47 +0000 User-agent: mu4e 1.8.9; emacs 28.2 From: Nacho Barrientos To: bug-gnu-emacs@gnu.org Subject: 28.2; bindat: str and strz not operating on vectors Date: Thu, 20 Oct 2022 14:18:13 +0200 Message-ID: <87tu3ymm51.fsf@cern.ch> Content-Type: multipart/mixed; boundary="=-=-=" X-ClientProxiedBy: ZR2P278CA0064.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:52::18) To ZR0P278MB0457.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:30::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: ZR0P278MB0457:EE_|GV0P278MB0099:EE_ X-MS-Office365-Filtering-Correlation-Id: 1fa7febc-78c7-4191-1eec-08dab2c1cd90 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wcsehgn7kpc4YfJHRo8nvwQIm8eqVCfFucgGK0S4LLM1yWFMRACeu1/HeaQN1ml2Cd4LmVThUI7EikL+VWlGY1jpgJb9vFxLmgUkwRx5dv4cyEcHEZu6bahrfYMvtdBfkgsEKe0nXBigdh328aFZDLnhp1EuuXpg76u0QkRD2fJgURy7KFbm5j5TdM611Tcxa2EqHxHvR9pDF8jQcso/TglIneSIPI1fi0/T5O+z/whmouf7d+xqghtIgBbaf0i67bE7unN0ujNdo7CUgprkKjlK7D4HX8Z+BtlUdVROQ4h3mMoVt20AzGAaBjBkt23pTkLIy85yIkLpa3OiDDUR7F5znow+MIrdwBPxrAxd6JWVxeY2JM1ln4uzgqcdu301htUQVQ+uDXqwHWLdDGxLn/kjl6J3WmguPbMcQUB0sSQPp0Ta6qLoEV7Sv4qHuHiud49jAvde4gnTuzZq8Y3B5x+9YuVuLvoUuFRKSDEyIMNROVsal1Kpnkjl4Zg9lkUdXPoW2YqZS8bBQImF5AtlI9pTj627ynI2fef1uBWKc4fEXSDys1JnsTGcN5mbVZopXbN1lg61qugsfP2Z2aaeRd/lipKmMEG1mvrvyYmaylAdLvaiMkkA3BWMk3BvktV5f6ByywxaUWWznyG0L8pxCJknV0TDmjMIjVBYj1NQ2Tah7fDgTeLpK/YE3XLc0JEgyrU3WVAhZ+z/YY5kjaCXZXYzTrKi4GEMonx+EMhZLFc= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:ZR0P278MB0457.CHEP278.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230022)(4636009)(376002)(136003)(346002)(39860400002)(396003)(366004)(451199015)(478600001)(6666004)(41300700001)(66556008)(316002)(786003)(5660300002)(66946007)(235185007)(66476007)(44832011)(966005)(8676002)(30864003)(6486002)(2906002)(6512007)(6506007)(36756003)(86362001)(2616005)(186003)(41320700001)(8936002)(66899015)(6916009)(38100700002)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?f19pflnxkmsnova72idHD1UbaZg1YAZQKEeUN9oQnanvuva1A2rXp9J3FKt2?= =?us-ascii?Q?Gl55PN2/E8/crQGn2ULandNIHJwQv3bT3Y/uAS5CPVQP3UV4HUYpgkVx1wZl?= =?us-ascii?Q?jlHWEVzhoN1bzl1s7DUlWIaRF9F+18l1li3Bn9G6DvKcGh0JqyJzGVykJsCj?= =?us-ascii?Q?7GAAh1MVA5LeuOmkFYvOWvAkRqP/rzYCEdpjIyMOzAwN/h2RAiE1JYHMf+/R?= =?us-ascii?Q?Dwh4pY8m0cc45U1VWQZAVmAlvb2cxobGdVedMOHo1O5UBCRr/EwQgtUuakSb?= =?us-ascii?Q?77Q64JJA6FJeVHXgn+Y06bSxA/lUEoLG8EL7giQvAKdajjcLSrH0R/mBl7Oq?= =?us-ascii?Q?nYjxcf5X3/LwgMi1XhHGX9iytHwETUwyKLsyzIS3osd6ad5dYqdGr4DCtJGh?= =?us-ascii?Q?/iEjE6qsQArGLXRYyt8MRuOZb1OCPHD4OZ8xEnsoo3Jl87nLJg/6/y0/moz7?= =?us-ascii?Q?EYfasjg/Z6afPhA48ijNmTdBshMFuqpVgtKk8PBLO20XPGngu73bZsIzmx6q?= =?us-ascii?Q?5Mr1148TOlw7pzvKMi6Z/6lpbKnx/W4EfHyxgrSZ6otJtv4WnbHs635ZPyw1?= =?us-ascii?Q?z5VcxMomv5FdAtz9w8uMKFArOfMsabUIdvLyi8X9aYTsHD3rO07nDVFrvvDp?= =?us-ascii?Q?SfoHZR52hQ9joVHY5wiXh9ENFWqDVWm5gNcOHufcp6LEkitA2ciN0pMKIipu?= =?us-ascii?Q?p3dLGw73SqVqyuDUZIzZ0hVzGaj0Lg8AFnAl4VNxi0SiFakRf9Xukj0vBs2W?= =?us-ascii?Q?tZA6xKYM33+AhwEu2WV+36LqoPkLKC3CWLMpQd7Rvxyq+ydiXDGtoGtEHnHz?= =?us-ascii?Q?oW7XjA4BC3wnCrsaV1/wKXKGsnNmaOcGYluicPvGmOazqh4Cxsjl0bwRPT5j?= =?us-ascii?Q?bjIqS1c3pQnmIVnkQ1fI6B4JuHl1lzC5PitzPCswdXNerJcxej0hfaHlOOpA?= =?us-ascii?Q?qXNoEqLD636DOI901uENgycULyygEFj7r7I63+wHaEq16Pd2sOKy673VXScb?= =?us-ascii?Q?zesjqeomfz7AbCneZ1vJT4d6F/Zs9Qv7OkVBofjNb0Fm301LOZ0jj1P32c43?= =?us-ascii?Q?W2K6RchoY7wMihOtE1YtOI8sgEGTkEi94AGeX+awhuiLeGojpUZJgrLSIpHJ?= =?us-ascii?Q?ZHg5ndKoX3qRsxAf6MesqtZKPA8Zurd5CfL1O2xDLSqnlM3sIRy2AuZOkEHn?= =?us-ascii?Q?ivJIlMOqZWQfSFkvsGmny/qlB0mvAvHHtslm9+EmPdcMYyYax7INJ/3E3Qmw?= =?us-ascii?Q?4dzR+lhzLOkCQpmyLre14xnsRkW3z7cgo3zn4XT+AkfVekbPc0388wyKbVPd?= =?us-ascii?Q?llednofL1oSghWYkePhrM54yv5JAfJ3Jy/iAkLY01cjw/FeXd5VpwIly6Dzx?= =?us-ascii?Q?2Sw5RKD6HSjHR95EGDAXhcFMUvHaEAXx4u5tPxo7FKNW+3dDAM8n0NnFgDtj?= =?us-ascii?Q?Tehc1ERUz6x4bYRi9T7IZn7jGdjb72Zz8JVMnxZ/uf7myViRaeVyUI9tRB95?= =?us-ascii?Q?5ID9KYJgah213bkaQTbJuh8091AH2nA9i/rYrOCOMmA4RAiSt+0hXeH6CexO?= =?us-ascii?Q?HuI7L2bwLoWuhQcxQ432vRPN7EYpglaLyYS9egMHqLX3WYH3a5t1GqjFnIjH?= =?us-ascii?Q?Yg=3D=3D?= X-OriginatorOrg: cern.ch X-MS-Exchange-CrossTenant-Network-Message-Id: 1fa7febc-78c7-4191-1eec-08dab2c1cd90 X-MS-Exchange-CrossTenant-AuthSource: ZR0P278MB0457.CHEP278.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2022 17:37:47.4646 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: c80d3499-4a40-4a8c-986e-abce017d6b19 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9CG+BQA55powYexnY1YtaoVRmwFFakY+NJZ0/k0rZeISwuVOmpoykV4T4Bh4nn+lPaNjzOKguqmV+R4Ev6l6cs+UyfHxA1omHA/F3pUrCw8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV0P278MB0099 Received-SPF: pass client-ip=2a01:111:f403:4012::602; envelope-from=nacho.barrientos@cern.ch; helo=CHE01-GV0-obe.outbound.protection.outlook.com X-Spam_score_int: -2 X-Spam_score: -0.3 X-Spam_bar: / X-Spam_report: (-0.3 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_03_06=1.592, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 20 Oct 2022 16:10:33 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) --=-=-= Content-Type: text/plain Hi, These two snippets: (let* ((type (bindat-type (data strz))) (data [#x4e #x6f #x6e #x65 #x00]) (unpacked (bindat-unpack type data))) (bindat-get-field unpacked 'data)) (let* ((type (bindat-type (data str 4))) (data [#x4e #x6f #x6e #x65]) (unpacked (bindat-unpack type data))) (bindat-get-field unpacked 'data)) Both fail similarly: Debugger entered--Lisp error: (wrong-type-argument listp [78 111 110 101]) apply(unibyte-string [78 111 110 101]) (if (stringp s) s (apply #'unibyte-string s)) (let ((i 0) s) (while (and (if len (< i len) t) (/= (aref bindat-raw (+ bindat-idx i)) 0)) (setq i (1+ i))) (setq s (substring bindat-raw bindat-idx (+ bindat-idx i))) (setq bindat-idx (+ bindat-idx (or len (1+ i)))) (if (stringp s) s (apply #'unibyte-string s))) bindat--unpack-strz(nil) [...] Debugger entered--Lisp error: (wrong-type-argument listp [78 111 110 101]) apply(unibyte-string [78 111 110 101]) (if (stringp s) s (apply #'unibyte-string s)) (let ((s (substring bindat-raw bindat-idx (+ bindat-idx len)))) (setq bindat-idx (+ bindat-idx len)) (if (stringp s) s (apply #'unibyte-string s))) bindat--unpack-str(4) [...] With the attached patch both return the string "None" as expected (well, as I'd expect, *grins*). The diff also adds some extra tests. I'm running 28.2 but I've declared both functions as they're in the current master and the patch is on top of the current master, too. It's the first time that I look into this package so I'm not sure this is the way it's meant to work but similar operations work fine on vectors of bytes, for instance: (let* ((type (bindat-type (first uint 16) (second uint 16))) (data [#x00 #xff #xff #x00]) (unpacked (bindat-unpack type data))) (list (bindat-get-field unpacked 'first) (bindat-get-field unpacked 'second) (bindat-length type unpacked))) (which returns (255 65280 4) as expected) Please simply ignore this if I'm talking rubbish :) Hope this helps. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-bindat-src-strz-operate-on-vectors-too.patch >From a8831aadf57f39862560b37d507be2a3bcb99aa2 Mon Sep 17 00:00:00 2001 From: Nacho Barrientos Date: Thu, 20 Oct 2022 14:16:43 +0200 Subject: [PATCH] bindat (src, strz): operate on vectors too --- lisp/emacs-lisp/bindat.el | 4 ++-- test/lisp/emacs-lisp/bindat-tests.el | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/lisp/emacs-lisp/bindat.el b/lisp/emacs-lisp/bindat.el index 0ecac3d52a..83188b369e 100644 --- a/lisp/emacs-lisp/bindat.el +++ b/lisp/emacs-lisp/bindat.el @@ -163,7 +163,7 @@ bindat--unpack-str (let ((s (substring bindat-raw bindat-idx (+ bindat-idx len)))) (setq bindat-idx (+ bindat-idx len)) (if (stringp s) s - (apply #'unibyte-string s)))) + (apply #'unibyte-string (append s nil))))) (defun bindat--unpack-strz (&optional len) (let ((i 0) s) @@ -172,7 +172,7 @@ bindat--unpack-strz (setq s (substring bindat-raw bindat-idx (+ bindat-idx i))) (setq bindat-idx (+ bindat-idx (or len (1+ i)))) (if (stringp s) s - (apply #'unibyte-string s)))) + (apply #'unibyte-string (append s nil))))) (defun bindat--unpack-bits (len) (let ((bits nil) (bnum (1- (* 8 len))) j m) diff --git a/test/lisp/emacs-lisp/bindat-tests.el b/test/lisp/emacs-lisp/bindat-tests.el index 0c03c51e2e..2abf714852 100644 --- a/test/lisp/emacs-lisp/bindat-tests.el +++ b/test/lisp/emacs-lisp/bindat-tests.el @@ -252,7 +252,24 @@ bindat-test--str-strz-multibyte (should (equal (bindat-unpack spec "abc\0") "abc")) ;; Missing null terminator. (should-error (bindat-unpack spec "")) - (should-error (bindat-unpack spec "a")))) + (should-error (bindat-unpack spec "a"))) + + (ert-deftest bindat-test--strz-array-unpack () + (should (equal (bindat-unpack spec [#x61 #x62 #x63 #x00]) "abc")))) + +(let ((spec (bindat-type str 3))) + (ert-deftest bindat-test--str-simple-array-unpack () + (should (equal (bindat-unpack spec [#x61 #x62 #x63]) "abc")))) + +(let ((spec (bindat-type + (first u8) + (string str 3) + (last uint 16)))) + (ert-deftest bindat-test--str-combined-array-unpack () + (let ((unpacked (bindat-unpack spec [#xff #x63 #x62 #x61 #xff #xff]))) + (should (equal (bindat-get-field unpacked 'string) "cba")) + (should (equal (bindat-get-field unpacked 'first) (- (expt 2 8) 1))) + (should (equal (bindat-get-field unpacked 'last) (- (expt 2 16) 1)))))) (let ((spec '((x strz 2)))) (ert-deftest bindat-test--strz-legacy-fixedlen-len () -- 2.38.0 --=-=-= Content-Type: text/plain In GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.17.6) of 2022-09-12 built on frederik Windowing system distributor 'The X.Org Foundation', version 11.0.12101004 System Description: Arch Linux Configured using: 'configure --with-x-toolkit=gtk3 --with-native-compilation --sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib --localstatedir=/var --with-cairo --with-harfbuzz --with-libsystemd --with-modules 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/emacs/src=/usr/src/debug -flto=auto' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto'' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: ELisp/l Minor modes in effect: erc-list-mode: t erc-menu-mode: t erc-ring-mode: t erc-pcomplete-mode: t erc-netsplit-mode: t global-undo-tree-mode: t undo-tree-mode: t bug-reference-prog-mode: t recentf-mode: t goto-address-prog-mode: t erc-services-mode: t erc-autojoin-mode: t erc-networks-mode: t erc-track-mode: t erc-track-minor-mode: t erc-match-mode: t erc-spelling-mode: t erc-hl-nicks-mode: t erc-button-mode: t erc-fill-mode: t erc-stamp-mode: t erc-irccontrols-mode: t erc-noncommands-mode: t erc-move-to-prompt-mode: t erc-readonly-mode: t flyspell-mode: t display-time-mode: t engine-mode: t mu4e-column-faces-mode: t beginend-global-mode: t beginend-prog-mode: t outline-minor-mode: t global-git-commit-mode: t magit-auto-revert-mode: t auto-revert-mode: t editorconfig-mode: t hexl-follow-ascii: t csv-field-index-mode: t doom-modeline-mode: t yas-global-mode: t yas-minor-mode: t all-the-icons-ivy-rich-mode: t ivy-rich-project-root-cache-mode: t ivy-rich-mode: t ivy-posframe-mode: t ivy-mode: t shell-dirtrack-mode: t whole-line-or-region-global-mode: t whole-line-or-region-local-mode: t delete-selection-mode: t global-whitespace-mode: t override-global-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t window-divider-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t auto-fill-function: yas--auto-fill transient-mark-mode: t hs-minor-mode: t Load-path shadows: /home/nacho/.emacs.d/elpa/transient-20220918.2101/transient hides /usr/share/emacs/28.2/lisp/transient Features: (shadow emacsbug tramp-archive tramp-gvfs zeroconf ox-org calc-misc calculator locate dired-subtree dired-hacks-utils view gnus-icalendar icalendar pcmpl-unix erc-list erc-menu erc-ring erc-pcomplete erc-netsplit puppet-mode align org-archive dictionary dictionary-connection inf-ruby calc-alg calc-ext misearch multi-isearch two-column goto-chg undo-tree queue expand-region yaml-mode-expansions subword-mode-expansions text-mode-expansions cc-mode-expansions the-org-mode-expansions ruby-mode-expansions python-mode-expansions js-mode-expansions web-mode-expansions er-basic-expansions expand-region-core expand-region-custom cl-print display-line-numbers magit-patch magit-subtree magit-gitignore magit-ediff ediff ediff-merg ediff-mult ediff-wind ediff-diff ediff-help ediff-init ediff-util forge-list forge-commands forge-semi forge-bitbucket buck forge-gogs gogs forge-gitea gtea forge-gitlab glab forge-github ghub-graphql treepy gsexp ghub forge-notify forge-revnote forge-pullreq forge-issue forge-topic yaml forge-post markdown-mode forge-repo forge forge-core forge-db closql emacsql-sqlite emacsql emacsql-compiler dired-aux mailalias descr-text projectile rg pcase rg-info-hack rg-menu rg-ibuffer rg-result wgrep-rg wgrep rg-history rg-header ibuf-ext ibuffer ibuffer-loaddefs grep cus-edit cus-start calc-menu calc calc-loaddefs rect calc-macs crux gnutls network-stream url-http url-gw nsm url-auth url-cache secrets qp man nroff-mode shr-color smiley gnus-cite mm-archive mail-extr bug-reference avy magit-extras org-duration cal-iso tabify mwim elfeed-link timezone cal-persia cal-french cal-move tramp-cache recentf tree-widget info-colors counsel swiper em-unix em-term term ehelp em-script em-prompt em-hist em-pred em-glob em-cmpl em-basic em-banner em-alias goto-addr erc-services erc-join erc-networks erc-track erc-match erc-spelling erc-hl-nicks erc-button erc-fill erc-stamp erc-goodies erc erc-backend erc-loaddefs cern-ldap cap-words superword subword ldap net-utils quail flyspell ispell ol-eww ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-search eieio-opt speedbar ezimage dframe ol-docview doc-view jka-compr image-mode exif ol-bibtex ol-bbdb ol-w3m ol-doi org-link-doi appt diary-lib diary-loaddefs notifications ox-gfm ox-md ox-odt rng-loc rng-uri rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util ox-latex ox-icalendar org-agenda ox-html table ox-ascii ox-publish ox org-element org-tree-slide org-timer org-clock org-capture org-refile org-protocol ielm bluetooth desktop-environment time exwm-systemtray xcb-systemtray xcb-xembed exwm exwm-input xcb-keysyms xcb-xkb exwm-manage exwm-floating xcb-cursor xcb-render exwm-layout exwm-workspace exwm-core xcb-ewmh xcb-icccm xcb xcb-xproto xcb-types xcb-debug engine-mode eww xdg mm-url pipewire pipewire-lib pipewire-cli pipewire-access eradio elfeed-show elfeed-search vc-mtn vc-hg vc-git vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs vc vc-dispatcher editorconfig-core editorconfig-core-handle editorconfig-fnmatch elfeed-csv elfeed elfeed-curl elfeed-log elfeed-db elfeed-lib avl-tree url-queue xml-query mu4e-column-faces inline mu4e mu4e-org mu4e-main mu4e-view gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum gnus-group gnus-undo gnus-start gnus-dbus dbus gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range gnus-win gnus nnheader wid-edit mu4e-headers mu4e-compose mu4e-draft mu4e-actions smtpmail sendmail mu4e-search mu4e-lists mu4e-bookmarks mu4e-mark mu4e-message shr kinsoku svg xml flow-fill mule-util hl-line mu4e-contacts mu4e-update mu4e-folders mu4e-server mu4e-context mu4e-vars mu4e-helpers mu4e-config ido helpful cc-langs trace edebug help-fns radix-tree elisp-refs beginend git-modes gitignore-mode gitconfig-mode gitattributes-mode git-link orgit org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete org-list org-faces org-entities outline-minor-faces noutline outline org-version ob-emacs-lisp ob-core ob-eval org-table oc-basic bibtex ol org-keys oc org-compat org-macs cal-menu calendar cal-loaddefs magit-bookmark magit-submodule magit-obsolete magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log magit-diff smerge-mode diff diff-mode git-commit log-edit message rmc puny rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mailabbrev gmm-utils pcvs-util add-log magit-core magit-autorevert magit-margin magit-transient magit-process with-editor magit-mode transient magit-git magit-base magit-section crm compat-27 compat-26 eshell-prompt-extras em-dirs esh-var esh-mode em-ls eshell-bookmark bookmark eshell powerthesaurus request mailheader autorevert filenotify mail-utils dom virtualenvwrapper gitignore-templates editorconfig nhexl-mode hexl sqlformat reformatter jq-mode csv-mode sort web-mode disp-table sh-script executable systemd conf-mode archive-rpm bindat archive-cpio arc-mode archive-mode rpm-spec-mode yaml-mode json-mode json-snatcher js cc-mode cc-fonts cc-guess cc-menus cc-styles cc-align go-dlv gud go-mode find-file ffap etags fileloop generator xref rspec-mode python-mode info-look advice org-loaddefs which-func hideshow hippie-exp flymake-proc flymake project thingatpt ert pp ewoc debug backtrace compile cc-cmds cc-engine cc-vars cc-defs ruby-mode smie flycheck-package package-lint let-alist imenu finder lisp-mnt mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr flycheck find-func rainbow-mode xterm-color doom-modeline doom-modeline-segments doom-modeline-env doom-modeline-core shrink-path f f-shortdoc shortdoc text-property-search dash compat compat-macs doom-themes-ext-visual-bell face-remap doom-tokyo-night-theme doom-themes doom-themes-base yasnippet-snippets yasnippet amx comp comp-cstr warnings s all-the-icons-ivy-rich ivy-rich ivy-posframe posframe all-the-icons-ivy ivy ivy-faces ivy-overlay colir color all-the-icons all-the-icons-faces data-material data-weathericons data-octicons data-fileicons data-faicons data-alltheicons disk-usage dired dired-loaddefs pinentry tramp-cmds em-tramp esh-cmd esh-ext esh-opt esh-module esh-groups esh-proc esh-io esh-arg esh-util tramp-sh tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat shell pcomplete comint ansi-color ring parse-time iso8601 time-date ls-lisp format-spec whole-line-or-region delsel cus-load whitespace cl-extra help-mode use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key easy-mmode use-package-core finder-inf edmacro kmacro avoid server rx info package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 2785060 340167) (symbols 48 120088 102) (strings 32 626461 40628) (string-bytes 1 22822154) (vectors 16 228385) (vector-slots 8 5214189 734689) (floats 8 6603 3963) (intervals 56 145534 13846) (buffers 992 195)) -- bye Nacho http://cern.ch/nacho --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 20 16:57:55 2022 Received: (at 58669) by debbugs.gnu.org; 20 Oct 2022 20:57:55 +0000 Received: from localhost ([127.0.0.1]:36257 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olcby-0005o0-T1 for submit@debbugs.gnu.org; Thu, 20 Oct 2022 16:57:55 -0400 Received: from mail-ot1-f49.google.com ([209.85.210.49]:35718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olcbx-0005no-23 for 58669@debbugs.gnu.org; Thu, 20 Oct 2022 16:57:53 -0400 Received: by mail-ot1-f49.google.com with SMTP id cy15-20020a056830698f00b0065c530585afso643717otb.2 for <58669@debbugs.gnu.org>; Thu, 20 Oct 2022 13:57:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:from:to:cc:subject:date :message-id:reply-to; bh=ob+qa8r/hvIK0eEIinNmplvoCSwZiMuA7wATIqzRvxA=; b=WuwMrzubdXejDX174gIk3za5SbwVvP3OLgs77cWJReXqfTKyY7mP68db07cyvbEQu2 YUq8dkQsNX9aL+TcUomgrVFieiSVJSfwnOhTg7EY/in/cpYLI5YWZJndlO/yE9ifVdrh U3WTeqM7lszT58RqrHyjSy851pPkz+ihYDC1WxW9rbTNh3x9AkxAOM+4pe8jFCZvADpu VqWF5Q9KlLq/LcgQxY+8lNzdEwhxGNUVBTYSKcz7ZWxt05UHSgTARtkmkNkXltkzm70v Nj2csFGUBhopDg1r/Q6XoJ1HHm8nq+jM0FYtaSE5ankhrj8I/KLhDCv9RcnKwUd2bkPM r+pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=ob+qa8r/hvIK0eEIinNmplvoCSwZiMuA7wATIqzRvxA=; b=dXjVvhIRwtnWrCEFOiCEAgvX3ynsSYJlC6CVOFZ54xKhUZa9nOrEpAC5p38G5v/V07 D8m/8qJ0Psc/KTiiIzmDz7UhETZQaIqpiFxL5ry5qfHhZL+7nb3j+R1UbG3lFqWCM7If aaM3aXKYw6TLJMA4mVYG+nINrPo83hh2M2ecdo1RWQZOUNLE0ekEZ4y4nt1wcP7hpchv 65qEW5Y7bgf4S0w+MdX458AtEsko1sPLYZ/c3LpZrewgTszNi61Oa3U5CdfFHSb68eVT yISk6GRshuaz+ewimkAp7raVY6KRQ6pZTITtCdmhoCZqw+E5Zh8ppVxpunfcw5XVlaGU B4zQ== X-Gm-Message-State: ACrzQf2eIJHouK5bnEZWxPqJoUi+leX6S8Cw9dbCPGpj+3te1cZaD0Qs KgjtFVv3321xkVMgfNkA6uSYvYrp1/0fZvXaTMw= X-Google-Smtp-Source: AMsMyM63WE4HGukaYB2phq0xEWwJ53d7GDmxErP/GVyChMybtXqGV6sHZghEiye2l+prFLcNP+feSvA+rbHi9PoTGuY= X-Received: by 2002:a05:6830:3c1:b0:637:28be:7920 with SMTP id p1-20020a05683003c100b0063728be7920mr7815491otc.105.1666299467207; Thu, 20 Oct 2022 13:57:47 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 20 Oct 2022 13:57:46 -0700 From: Stefan Kangas In-Reply-To: <87tu3ymm51.fsf@cern.ch> References: <87tu3ymm51.fsf@cern.ch> X-Hashcash: 1:20:221020:monnier@iro.umontreal.ca::1IVnaspq0PJLuLYb:0F/E MIME-Version: 1.0 Date: Thu, 20 Oct 2022 13:57:46 -0700 Message-ID: Subject: Re: bug#58669: 28.2; bindat: str and strz not operating on vectors To: Nacho Barrientos , 58669@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58669 Cc: Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Nacho Barrientos writes: > These two snippets: > > (let* ((type (bindat-type > (data strz))) > (data [#x4e #x6f #x6e #x65 #x00]) > (unpacked (bindat-unpack type data))) > (bindat-get-field unpacked 'data)) > > (let* ((type (bindat-type > (data str 4))) > (data [#x4e #x6f #x6e #x65]) > (unpacked (bindat-unpack type data))) > (bindat-get-field unpacked 'data)) > > Both fail similarly: Copying in Stefan Monnier, in case he has any comments. > Debugger entered--Lisp error: (wrong-type-argument listp [78 111 110 101]= ) > apply(unibyte-string [78 111 110 101]) > (if (stringp s) s (apply #'unibyte-string s)) > (let ((i 0) s) (while (and (if len (< i len) t) (/=3D (aref bindat-raw = (+ bindat-idx i)) 0)) (setq i (1+ i))) (setq s (substring bindat-raw bindat= -idx (+ bindat-idx i))) (setq bindat-idx (+ bindat-idx (or len (1+ i)))) (i= f (stringp s) s (apply #'unibyte-string s))) > bindat--unpack-strz(nil) > [...] > > Debugger entered--Lisp error: (wrong-type-argument listp [78 111 110 101]= ) > apply(unibyte-string [78 111 110 101]) > (if (stringp s) s (apply #'unibyte-string s)) > (let ((s (substring bindat-raw bindat-idx (+ bindat-idx len)))) (setq b= indat-idx (+ bindat-idx len)) (if (stringp s) s (apply #'unibyte-string s))= ) > bindat--unpack-str(4) > [...] > > With the attached patch both return the string "None" as expected (well, > as I'd expect, *grins*). The diff also adds some extra tests. > > I'm running 28.2 but I've declared both functions as they're in the > current master and the patch is on top of the current master, too. > > It's the first time that I look into this package so I'm not sure this > is the way it's meant to work but similar operations work fine on > vectors of bytes, for instance: > > (let* ((type (bindat-type > (first uint 16) > (second uint 16))) > (data [#x00 #xff #xff #x00]) > (unpacked (bindat-unpack type data))) > (list (bindat-get-field unpacked 'first) > (bindat-get-field unpacked 'second) > (bindat-length type unpacked))) > > (which returns (255 65280 4) as expected) > > Please simply ignore this if I'm talking rubbish :) > > Hope this helps. > > From a8831aadf57f39862560b37d507be2a3bcb99aa2 Mon Sep 17 00:00:00 2001 > From: Nacho Barrientos > Date: Thu, 20 Oct 2022 14:16:43 +0200 > Subject: [PATCH] bindat (src, strz): operate on vectors too > > --- > lisp/emacs-lisp/bindat.el | 4 ++-- > test/lisp/emacs-lisp/bindat-tests.el | 19 ++++++++++++++++++- > 2 files changed, 20 insertions(+), 3 deletions(-) > > diff --git a/lisp/emacs-lisp/bindat.el b/lisp/emacs-lisp/bindat.el > index 0ecac3d52a..83188b369e 100644 > --- a/lisp/emacs-lisp/bindat.el > +++ b/lisp/emacs-lisp/bindat.el > @@ -163,7 +163,7 @@ bindat--unpack-str > (let ((s (substring bindat-raw bindat-idx (+ bindat-idx len)))) > (setq bindat-idx (+ bindat-idx len)) > (if (stringp s) s > - (apply #'unibyte-string s)))) > + (apply #'unibyte-string (append s nil))))) > > (defun bindat--unpack-strz (&optional len) > (let ((i 0) s) > @@ -172,7 +172,7 @@ bindat--unpack-strz > (setq s (substring bindat-raw bindat-idx (+ bindat-idx i))) > (setq bindat-idx (+ bindat-idx (or len (1+ i)))) > (if (stringp s) s > - (apply #'unibyte-string s)))) > + (apply #'unibyte-string (append s nil))))) > > (defun bindat--unpack-bits (len) > (let ((bits nil) (bnum (1- (* 8 len))) j m) > diff --git a/test/lisp/emacs-lisp/bindat-tests.el b/test/lisp/emacs-lisp/= bindat-tests.el > index 0c03c51e2e..2abf714852 100644 > --- a/test/lisp/emacs-lisp/bindat-tests.el > +++ b/test/lisp/emacs-lisp/bindat-tests.el > @@ -252,7 +252,24 @@ bindat-test--str-strz-multibyte > (should (equal (bindat-unpack spec "abc\0") "abc")) > ;; Missing null terminator. > (should-error (bindat-unpack spec "")) > - (should-error (bindat-unpack spec "a")))) > + (should-error (bindat-unpack spec "a"))) > + > + (ert-deftest bindat-test--strz-array-unpack () > + (should (equal (bindat-unpack spec [#x61 #x62 #x63 #x00]) "abc")))) > + > +(let ((spec (bindat-type str 3))) > + (ert-deftest bindat-test--str-simple-array-unpack () > + (should (equal (bindat-unpack spec [#x61 #x62 #x63]) "abc")))) > + > +(let ((spec (bindat-type > + (first u8) > + (string str 3) > + (last uint 16)))) > + (ert-deftest bindat-test--str-combined-array-unpack () > + (let ((unpacked (bindat-unpack spec [#xff #x63 #x62 #x61 #xff #xff])= )) > + (should (equal (bindat-get-field unpacked 'string) "cba")) > + (should (equal (bindat-get-field unpacked 'first) (- (expt 2 8) 1)= )) > + (should (equal (bindat-get-field unpacked 'last) (- (expt 2 16) 1)= ))))) > > (let ((spec '((x strz 2)))) > (ert-deftest bindat-test--strz-legacy-fixedlen-len () > -- > 2.38.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 21 11:29:58 2022 Received: (at 58669-done) by debbugs.gnu.org; 21 Oct 2022 15:29:58 +0000 Received: from localhost ([127.0.0.1]:38724 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olty9-0006Se-NY for submit@debbugs.gnu.org; Fri, 21 Oct 2022 11:29:57 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:28196) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olty7-0006SK-SU for 58669-done@debbugs.gnu.org; Fri, 21 Oct 2022 11:29:57 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id E9319441655; Fri, 21 Oct 2022 11:29:49 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 2C646441669; Fri, 21 Oct 2022 11:29:48 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1666366188; bh=eipIxLnqY8Bc28xFOLGoihTlzeCwyNN51rZIuP0HRbU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=RUVeJrD8RwkBP0DIeYLESpAfcGjbmg57eQLYPczAvIJeehLJ3wGI3TiHAqcObj1Cc rEhLbSpAxrI3KPPml8AgaZk9Xc3SoEHJHPRG+MHXubrbXwog+A1r82/nYu3zLidf/h iJO7QfMX4FhaDLScHIoZ65ttjm24jZ8YL+rDaenOTcEZcYgnO7y6RKa3+XVU35+H8E hzN5M+n45jxZh68Czy/YT4JKWJ7+g0FZNeN42y4RNh3nee9gnKUOuZn7+9iXn6FxC2 umcCqT/dFPCUqHpDeQXx6GgHZm/+BiAQ1Y7OhVkdEZGF5CT+DwJmHTDMPBF5E+hhm+ gCXyWd3LPsbmg== Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 1D144120AAA; Fri, 21 Oct 2022 11:29:48 -0400 (EDT) From: Stefan Monnier To: Nacho Barrientos Subject: Re: bug#58669: 28.2; bindat: str and strz not operating on vectors In-Reply-To: <87tu3ymm51.fsf@cern.ch> (Nacho Barrientos's message of "Thu, 20 Oct 2022 14:18:13 +0200") Message-ID: References: <87tu3ymm51.fsf@cern.ch> Date: Fri, 21 Oct 2022 11:29:45 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.015 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58669-done Cc: 58669-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hola Nacho, Nacho Barrientos [2022-10-20 14:18:13] wrote: > Debugger entered--Lisp error: (wrong-type-argument listp [78 111 110 101]) > apply(unibyte-string [78 111 110 101]) Duh, yes the code was clearly wrong. > With the attached patch both return the string "None" as expected (well, > as I'd expect, *grins*). The diff also adds some extra tests. Thanks, pushed to `master`. > It's the first time that I look into this package so I'm not sure this > is the way it's meant to work but similar operations work fine on > vectors of bytes, for instance: Yes, I'm actually surprised I left this code in there as-is because I remember wondering how to make a unibyte string from a vector of bytes in an efficient way (and concluding that there's currently no good way to do that :-( ). Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 21 12:02:45 2022 Received: (at 58669) by debbugs.gnu.org; 21 Oct 2022 16:02:45 +0000 Received: from localhost ([127.0.0.1]:38768 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oluTp-0007L6-4e for submit@debbugs.gnu.org; Fri, 21 Oct 2022 12:02:44 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oluTj-0007Ko-SB for 58669@debbugs.gnu.org; Fri, 21 Oct 2022 12:02:40 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oluTc-0005ll-Fc; Fri, 21 Oct 2022 12:02:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=6Nu4NPPZIHEJo5ThDX21XyyoPvPA/7C+UfC3jqPCUPM=; b=GN0UMdbygQG8 NcBsmcvvPdjvptHvMWpmDFbyRfK0F7jWnRhrzqwARSMW4huojpeZfeu3OpkkNccvA7i66olWDKIcz hR45xlpRKZsqBCcQPNXa/6/j0DG+U0XkyduH1/QTSyPB9xjC8ATg2ZMmAQ6YHfyDjoZJ0n98DMQLW etPmT7w+7g/CZXg2rGYN5BUQuNLBzxPyddgsvTACAjKF+B3dGA/t2l/FwkKxZDGChHVdTIHBCvb0M 0ahQKZ7aZ99YcEpurM4r7AXLof0j+OJdQdtdfqox93M17GcXYG2mcjRBsuGeLawjcmyCb2GRj3wGi nSOdbDyrTOVjmZejpb8AvQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oluTb-0003IZ-CK; Fri, 21 Oct 2022 12:02:28 -0400 Date: Fri, 21 Oct 2022 19:02:26 +0300 Message-Id: <83y1t9upv1.fsf@gnu.org> From: Eli Zaretskii To: Stefan Monnier In-Reply-To: (bug-gnu-emacs@gnu.org) Subject: Re: bug#58669: 28.2; bindat: str and strz not operating on vectors References: <87tu3ymm51.fsf@cern.ch> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58669 Cc: 58669@debbugs.gnu.org, nacho.barrientos@cern.ch X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Resent-To: bug-gnu-emacs@gnu.org > Cc: 58669-done@debbugs.gnu.org > Date: Fri, 21 Oct 2022 11:29:45 -0400 > From: Stefan Monnier via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > > It's the first time that I look into this package so I'm not sure this > > is the way it's meant to work but similar operations work fine on > > vectors of bytes, for instance: > > Yes, I'm actually surprised I left this code in there as-is because > I remember wondering how to make a unibyte string from a vector of bytes > in an efficient way (and concluding that there's currently no good way > to do that :-( ). Maybe I'm missing something, but what's wrong with (apply 'string (append VECTOR nil)) From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 21 12:47:49 2022 Received: (at 58669) by debbugs.gnu.org; 21 Oct 2022 16:47:49 +0000 Received: from localhost ([127.0.0.1]:38891 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olvBV-0008Vq-0m for submit@debbugs.gnu.org; Fri, 21 Oct 2022 12:47:49 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:32408) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olvBS-0008VH-QW for 58669@debbugs.gnu.org; Fri, 21 Oct 2022 12:47:47 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 2F86744169B; Fri, 21 Oct 2022 12:47:40 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id ADE96441697; Fri, 21 Oct 2022 12:47:38 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1666370858; bh=dAQXBzJWYevuMUVBEj1Z1Dh1poMHHniwr0l2u6d8PqE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=CO89MhyzBn4bCj5sSrxRSu7ijD0dpzgCTE3wY7K4UB3GU+G80D28ajUIcrUt1J/XJ /cmrQdv1ItBCd3tz1ewo8IIHaPOz1Gyy2AAzArW1oJyff/YwkDuuHISxTRAcxovxU7 6/RGXpAQET8ugILomouHmB2Z7uNI2Mey/EcH+FUjN9CKFeHLhDF4GXgfu7dt0p6Aax 2b4brXNgwwB362WQkTCSec8Rv3C0zHbiscyD78HI9NUA1BEoh6F1SxaAtncKX6Ycfj mVHm8qETBBL8l7khuACwRgSjJJjsc0w3RV+k3ekbwt/styqoPQTsFhRt0Bt6WTA4TO wABmDMwAPTFDw== Received: from alfajor (alfajor.sf.umontreal.ca [10.33.232.38]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 57981120388; Fri, 21 Oct 2022 12:47:38 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#58669: 28.2; bindat: str and strz not operating on vectors In-Reply-To: <83y1t9upv1.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 21 Oct 2022 19:02:26 +0300") Message-ID: References: <87tu3ymm51.fsf@cern.ch> <83y1t9upv1.fsf@gnu.org> Date: Fri, 21 Oct 2022 12:47:37 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58669 Cc: 58669@debbugs.gnu.org, nacho.barrientos@cern.ch X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> Yes, I'm actually surprised I left this code in there as-is because >> I remember wondering how to make a unibyte string from a vector of bytes >> in an efficient way (and concluding that there's currently no good way >> to do that :-( ). > > Maybe I'm missing something, but what's wrong with > > (apply 'string (append VECTOR nil)) `append` takes the vector, turns it into a list (thus allocating N cons cells), then `apply` turns the list back into an on-stack "vector", and all of that just to create a 4x or 8x smaller string. It's silly. Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 21 13:16:52 2022 Received: (at 58669) by debbugs.gnu.org; 21 Oct 2022 17:16:52 +0000 Received: from localhost ([127.0.0.1]:38955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olvdc-0000qG-1n for submit@debbugs.gnu.org; Fri, 21 Oct 2022 13:16:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46566) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olvda-0000q2-LX for 58669@debbugs.gnu.org; Fri, 21 Oct 2022 13:16:51 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olvdT-0005nc-Kf; Fri, 21 Oct 2022 13:16:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=z6WnTGLzxMlxyUiTvQzbJ8hZHG7l+iyZT9NxABTUmGM=; b=V6flvOu/GspH IsJy543WS/ftMFPIEhaCDc85Opac4adgNrwJQ/RUhdnSIM6qYibkmqGbRD/syddhm9d+BzkkYapJk x5dr2IPOcknbIkHurFBcmNxoIU6zg+aFjMruH9gTFej79G3aN27C/O9YMC+PRlJtdi7HSGvvmr1F8 Ig1HPegFdAWnZenBXeQ7WUIhCcL9y5rdI4jnFSrPjj7tAWwlzsXwimdYUkxfNVwlVWISoXix6DVj6 QYRKKINKgbijXN/db2wF02bZqxSvQm/oNtxtvInC2jnVejTfu4oysbwamleCPtGcZAE3ROsVKYJ/J okVosScIV3Cd/VZ30QSXlA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olvdA-000841-P5; Fri, 21 Oct 2022 13:16:39 -0400 Date: Fri, 21 Oct 2022 20:16:24 +0300 Message-Id: <83sfjhumfr.fsf@gnu.org> From: Eli Zaretskii To: Stefan Monnier In-Reply-To: (message from Stefan Monnier on Fri, 21 Oct 2022 12:47:37 -0400) Subject: Re: bug#58669: 28.2; bindat: str and strz not operating on vectors References: <87tu3ymm51.fsf@cern.ch> <83y1t9upv1.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58669 Cc: 58669@debbugs.gnu.org, nacho.barrientos@cern.ch X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Monnier > Cc: 58669@debbugs.gnu.org, nacho.barrientos@cern.ch > Date: Fri, 21 Oct 2022 12:47:37 -0400 > > >> Yes, I'm actually surprised I left this code in there as-is because > >> I remember wondering how to make a unibyte string from a vector of bytes > >> in an efficient way (and concluding that there's currently no good way > >> to do that :-( ). > > > > Maybe I'm missing something, but what's wrong with > > > > (apply 'string (append VECTOR nil)) > > `append` takes the vector, turns it into a list (thus allocating N cons > cells), then `apply` turns the list back into an on-stack "vector", and > all of that just to create a 4x or 8x smaller string. It's silly. It gets the job done, doesn't it? From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 21 14:34:35 2022 Received: (at 58669) by debbugs.gnu.org; 21 Oct 2022 18:34:35 +0000 Received: from localhost ([127.0.0.1]:39028 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olwqp-0002p8-0u for submit@debbugs.gnu.org; Fri, 21 Oct 2022 14:34:35 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:60584) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olwqm-0002or-53 for 58669@debbugs.gnu.org; Fri, 21 Oct 2022 14:34:32 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 8C50780496; Fri, 21 Oct 2022 14:34:25 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 94B5F80068; Fri, 21 Oct 2022 14:34:23 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1666377263; bh=ifsDEpnt7G/7cwzb+WvStvKnUgZKUVE/RLXl58ZFDn8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=P1vuhorwAfULthOYo91QCbhbcoiKO2blkpIf6qTsH6Wqz6xc4FGh5bUf5p6jsaBD8 eG70mcnmJbDjwqXE2QIUmX/d//QznjTLvIkmO0Lc7VB7Yc3lzjJELSUsAAF3qMwfp9 k+s7mYgOX9t3S8fJWSOcRj/YBph6CpTOIgNBgMu3bSOv+++Ovem8GMf8Q5hzEIMtx2 YilXEwbG7PzXeRd1tsg+yyXOwhk5g1X+9q+geHhBt4yJxXPLHnEZ60NThpyXcBdPP8 EKEZzVg0FQqL9s70tGTWinvc3MLDoQ+UqDQa7jtRkjMwzXpEhl238Glm9xdXuVZWud FGVZxEV3MEwwA== Received: from alfajor (alfajor.sf.umontreal.ca [10.33.232.38]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 77955120F3B; Fri, 21 Oct 2022 14:34:23 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#58669: 28.2; bindat: str and strz not operating on vectors In-Reply-To: <83sfjhumfr.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 21 Oct 2022 20:16:24 +0300") Message-ID: References: <87tu3ymm51.fsf@cern.ch> <83y1t9upv1.fsf@gnu.org> <83sfjhumfr.fsf@gnu.org> Date: Fri, 21 Oct 2022 14:34:23 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58669 Cc: 58669@debbugs.gnu.org, nacho.barrientos@cern.ch X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> `append` takes the vector, turns it into a list (thus allocating N cons >> cells), then `apply` turns the list back into an on-stack "vector", and >> all of that just to create a 4x or 8x smaller string. It's silly. > > It gets the job done, doesn't it? Indeed, there's a way, but there isn't a *good* way, Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 23 04:19:10 2022 Received: (at 58669) by debbugs.gnu.org; 23 Oct 2022 08:19:11 +0000 Received: from localhost ([127.0.0.1]:42816 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omWCM-0000JP-M8 for submit@debbugs.gnu.org; Sun, 23 Oct 2022 04:19:10 -0400 Received: from mail-gv0che01on2072.outbound.protection.outlook.com ([40.107.23.72]:39456 helo=CHE01-GV0-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1omWCI-0000Is-Fg for 58669@debbugs.gnu.org; Sun, 23 Oct 2022 04:19:09 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JXsg36RL7RayeSJZiDKCCJg4CdrUEvbNT4r1Cw2PQ1BKIvt1sujgw9kcCfGKZhHAL+VdsaZwcd4rwQ1Q1k82Gv5rmmd74BFyamk6MkyPG57tHt439r72YDMKc9I2ezUH5DwyIUlIxw4nX0eZV9WaAHJSKt9DqJiLzsmUC75CB3PjrCd+vQoTN0mV33R0EGiBnC2yDzf/XYYKEWocv5ddIIdtqztZPnqULImnwWrpd1yQZPRg+gcjGodeNFT9Yv0UxukE3t6kWe5RTQw34sXr14hesBy+p8xWl+TifpHW69q1EbdxZN7SG6AAaXVOdG/8huUQvWvl/nfGb+HeyqYowA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rm4OC+k82g7aABcANH6Ksgdw0hxhDwBP3li6N+ohaDk=; b=dlHoEciuGYJeGCIWIdZDlzkvaziD3Hyp5BP4IIQ5d3sIBaeTJUEO9TdLGy3b2h0Hr+AED+Pt9yyK8RPJ+miCWw2z8e9jPy21A/4whJVSVsbW4CeIB9IHHY5CTJvWjLqDsuiP9aDGb6Q2KJ9WD4YC1pxA++b7RmU+BjWqM2pjDVQnEH9EALFrSqJHEI4c0U0y03wKKRXyclvJqm7vJ62kFiCdyZ7EYOViyVB5lArPErJQArZVsCij2uAFMKXYZf7MdRnbrXdHhjrNa3Dl5uDCXjk0VpgOUCL6XRdbH0WprGdYL8FKX6P8Dk1n5FAB5Q9oo2UnLKECslg3yZHFP6IU9A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cern.ch; dmarc=pass action=none header.from=cern.ch; dkim=pass header.d=cern.ch; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cern.onmicrosoft.com; s=selector2-cern-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rm4OC+k82g7aABcANH6Ksgdw0hxhDwBP3li6N+ohaDk=; b=jQenejv56EX8c0OpiDH9VFVzUnoalg8I8NSW/YnMYYlnTW7oxBjfN5WFU6t5diKaweKaKZu8XWs/A5cx5xgNwOwqxmvbEvMpW9SF7ARRuLTYl8xdkchH0t9w32XtzXBm9nmJG6UyauR7yfhvEdfEzf0UxfoDmBJOHQ4NqodBXP4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=cern.ch; Received: from ZR0P278MB0457.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:30::14) by GVAP278MB0811.CHEP278.PROD.OUTLOOK.COM (2603:10a6:710:56::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Sun, 23 Oct 2022 08:18:59 +0000 Received: from ZR0P278MB0457.CHEP278.PROD.OUTLOOK.COM ([fe80::a262:8c80:796b:107]) by ZR0P278MB0457.CHEP278.PROD.OUTLOOK.COM ([fe80::a262:8c80:796b:107%8]) with mapi id 15.20.5746.021; Sun, 23 Oct 2022 08:18:59 +0000 References: <87tu3ymm51.fsf@cern.ch> User-agent: mu4e 1.8.9; emacs 28.2 From: Nacho Barrientos To: Stefan Monnier Subject: Re: bug#58669: 28.2; bindat: str and strz not operating on vectors Date: Sun, 23 Oct 2022 10:18:13 +0200 In-reply-to: Message-ID: <874jvvdkb1.fsf@cern.ch> Content-Type: text/plain X-ClientProxiedBy: ZR0P278CA0130.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:40::9) To ZR0P278MB0457.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:30::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: ZR0P278MB0457:EE_|GVAP278MB0811:EE_ X-MS-Office365-Filtering-Correlation-Id: d50598a2-ea8a-432d-1dbf-08dab4cf3c91 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: t6S/4UN2QoxC+8/5SO1/Q1p3KkEMxC/2jlwvrWHBn82L6lW7m3sXef+Qr86bcQyTPnP/cXKhqw284QsXUUu1ASHlqWyOqnRPFqwRsh+drEADQk9Is+XtvcizQIPGWd0F81Ojl6VV1MEL3MyKluJR6UY1r4B75JdDfMkWfWvXaJ2U+HpMnWq1w05b7lW5gng7n5Z1uUklH5lJiVC4aqTkYwOcMG+QmOlBXuRedtLltckKN5ADTklX7hWw8w8719TILP8WaMehG+5WK8DiVZB65VSlXHpFQGNLsQOwfRLiSfkdAuHMDiPXCI8MKwJRNzkQ9L6gWTCRAbqU60aflqMP56SP9gYuJYlxWDTr+xKc4aD7+txkFbsRi2Stwwnu5x3v4QFYQUrFYjwk6PVhX4YV7kYdYBqbvTLAReJcX/iNobL7zFgGFwUcnoNHU4e4GuASlGhUyvcdXn445TQuLOJtMWCslH6kpJRTFPrGq0M+1g3qJFapdcdqFsxYxQvBGVAaozx5OHEtdYwKyNKmmE4qrIx83ii19pbSqD0+fJq8TuCNc5KNYfMmY4KST6sARP36UY54I30OA1qwzn754XvwhVGkN15Kz7LtbUGI6w3MqR8PXTY/2+uAl2G5zltZIdiLErX6KsRgijaRqFUaV/G6bW8w6uLxe8Lp1hCBXfwiDgOzD8BS/3skQCuuZ2JHQFwoPuk5TvhbFHdrrXsF+dff2w== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:ZR0P278MB0457.CHEP278.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230022)(4636009)(396003)(39860400002)(366004)(376002)(346002)(136003)(451199015)(6512007)(6486002)(478600001)(6666004)(186003)(966005)(2906002)(6506007)(41320700001)(44832011)(8676002)(2616005)(4326008)(786003)(296002)(6916009)(8936002)(5660300002)(66946007)(66556008)(66476007)(41300700001)(316002)(86362001)(558084003)(36756003)(38100700002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?8iFHbmGtMpzZTtOLOE2rpRRPjku3DSTU7khy8H9BrgMLfAS89wj3q3SsDknm?= =?us-ascii?Q?a0ey7pKBfiaByxdddPfmZ5t1GRXtBjHeEW5h36QHuD3b11oeriBg6tB2C/0B?= =?us-ascii?Q?DJSnCJj5TTzeEpjaQ3gE3kSW9Jq1Xm/zGAiZfozMuHJ+P7PSZ0zirMpTVKEj?= =?us-ascii?Q?rtnzbsutaEQvlBdqPC72rHkTr7wiv3ViGMshnjwcL93i8ihSkZ4BFW81nDJS?= =?us-ascii?Q?wzV1OoR2kGCqZTKN9cR0ZjSaIT1mFGjE+0HLxr/2qj+Tb3oORP/SWFahszmO?= =?us-ascii?Q?JLCJXpDIfxMw4rt3U2R4StiBwyaY/aO73pqoLpB7B3qYw9VUGtn7mlhb2211?= =?us-ascii?Q?H03IPnPtrlXzcTm10PTB9ULYBxox1l8QKAceQ2J0T2M/GyoVtrBOuGvKvNVN?= =?us-ascii?Q?1bvCezGP587T+fig65rn2067f8xTG9Fiw8HHuY1Lep6mFDsmrsGDpRTIPkIv?= =?us-ascii?Q?46RzRoEjm94TNe3DSrFYs0PQodq0llJUUGblhg10j4WpN7M8VD4VcuXUi3/K?= =?us-ascii?Q?qO/xbZSOzlbHPFyLpDIMjWZOO9WuJopnZ94LgZKgQyW0TsRanR6WuIR/Z2R6?= =?us-ascii?Q?mW+zppMJfOUYl9ga2RWsu6rMymjjfTEqz9A3Gpq54RqiJ+gQ6VlOGFSLrP64?= =?us-ascii?Q?ju+BXDs6PpqZ4NCAS3L/5bfDn32nt9c9Ad2DTuSVkIPDCqS93vPoIwylHGxR?= =?us-ascii?Q?CpaaLPDlFVCxiQ8whaYwdtVu01KNp1dXaMdFivI8zADcl2LsrsM5Prbjfqhi?= =?us-ascii?Q?lx6eQFUCB8r92N9F3ejcGOXCAago6K6P/YO54aVzTLcN9J7LWio9QgFYJQlw?= =?us-ascii?Q?n+JMiEBj1DZbBOTd7SL45k42kYrSyU8431YHtoDOd6UEqahvRo8gweVOaEc8?= =?us-ascii?Q?FWl50i0R+yqdd/5hYOcL2GGk79OBApy2HN8Edc73EoSM/vQjSvvrF8Ke5uQs?= =?us-ascii?Q?+uNyz00NuKuqEIn4joMmh2KtkzGuFrgzY8MCgDZX4uTfW57WrXaPPUbB1iB6?= =?us-ascii?Q?+wwfpgcWsUCQSHuHXokJZzdKvbDFFK0/98eSrVG9mcp8saZ54VH2ef1qCJ/d?= =?us-ascii?Q?TnJmoHa2SOzhZ/OqEikgkXmJ99RQEWJ79rCS9UhNu4sPItIWfyI6WJWd4RSe?= =?us-ascii?Q?YBQTKF/kAxoZKFJxjdH/i24klE86Q9xfmhRLhzaAgXoPuZQLr9KVfcwuJ7Fn?= =?us-ascii?Q?eQBeOZlg3d1bNPzQq2AADiuwrAisZh81LjagnQkKw9/9TsKauy1Nnn78SqNp?= =?us-ascii?Q?3ZOD/lybgoc7gPuivfWntBzNc/UI8xZ23gE3dVnkY8umcAPyV5CoK+ubfI0Z?= =?us-ascii?Q?933+PyVGGFM6ZKQWLLBavFh98Ik5lkpVbzhbjqOcES29i6OQMqUVH767pk0Z?= =?us-ascii?Q?fljTzcF+nEQ8qtCw6gtWjmO/fVNyMt9x8p0rguuY9spCv916AWB1ipH5yf/Z?= =?us-ascii?Q?RH67ZVstmUbHHLAiu0CQUs2Y9svIf7ho2Ju0iOj1K+YT3JNsqkXKfZXFD77r?= =?us-ascii?Q?j8rZ2K6W7P5OwuuihLbR70Dw+K40aYpMGwkZ1bkDXkcT2LDxkdcyMgKjQ0uf?= =?us-ascii?Q?jMTKtCT/SDfM06MJpG3mA3JzB7FO+/BLwDaHS83jQ8B8/PSCPsxPwR3Fv+v1?= =?us-ascii?Q?Cw=3D=3D?= X-OriginatorOrg: cern.ch X-MS-Exchange-CrossTenant-Network-Message-Id: d50598a2-ea8a-432d-1dbf-08dab4cf3c91 X-MS-Exchange-CrossTenant-AuthSource: ZR0P278MB0457.CHEP278.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Oct 2022 08:18:59.4813 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: c80d3499-4a40-4a8c-986e-abce017d6b19 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 41hxgLQTxBHyrC/F8apscoyqN8MFU9zIo9ZzWudeDRqAO/HD2cJOAKaY8oSuzdHmSE8ds483WFVPRJZoWNHOopohEa55Y+F7N5TnDnu+1mA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVAP278MB0811 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 58669 Cc: 58669@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 21/10/22, Stefan Monnier said: > Hola Nacho, Hola, > Thanks, pushed to `master`. Great, thanks a lot! -- bye Nacho http://cern.ch/nacho From unknown Thu Jun 19 14:03:55 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 20 Nov 2022 12:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator