GNU bug report logs - #58669
28.2; bindat: str and strz not operating on vectors

Previous Next

Package: emacs;

Reported by: Nacho Barrientos <nacho.barrientos <at> cern.ch>

Date: Thu, 20 Oct 2022 20:11:02 UTC

Severity: normal

Found in version 28.2

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #13 received at 58669-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Nacho Barrientos <nacho.barrientos <at> cern.ch>
Cc: 58669-done <at> debbugs.gnu.org
Subject: Re: bug#58669: 28.2; bindat: str and strz not operating on vectors
Date: Fri, 21 Oct 2022 11:29:45 -0400
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





This bug report was last modified 2 years and 211 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.