GNU bug report logs - #55882
[PATCH] bindat: Minor cleanups

Previous Next

Package: emacs;

Reported by: Richard Hansen <rhansen <at> rhansen.org>

Date: Fri, 10 Jun 2022 05:28:02 UTC

Severity: normal

Tags: patch

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 55882 in the body.
You can then email your comments to 55882 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org:
bug#55882; Package emacs. (Fri, 10 Jun 2022 05:28:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Richard Hansen <rhansen <at> rhansen.org>:
New bug report received and forwarded. Copy sent to monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org. (Fri, 10 Jun 2022 05:28:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Richard Hansen <rhansen <at> rhansen.org>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] bindat: Minor cleanups
Date: Fri, 10 Jun 2022 01:27:09 -0400
[Message part 1 (text/plain, inline)]
X-Debbugs-CC: monnier <at> iro.umontreal.ca

Attached are a few patches to fix some minor issues with bindat and its documentation and tests.

Patch 1:

    bindat (strz): Fix documentation for strz with pre-allocated string
    
    * doc/lispref/processes.texi (Bindat Types): Document that a null
    terminator is not written if `bindat-pack' is given a pre-allocated
    string.

Patch 2:

    ; bindat-tests (str, strz): Refine tests
    
    str and strz:
      * Add tests for packing into a pre-allocated string.
    
    strz:
      * Add test cases to probe more boundary conditions.
      * Delete comments that no longer apply.
      * Add tests to ensure that truncated packed strings are rejected.
      * Keep the legacy spec tests in sync with the modern spec tests.

Patch 3:

    ; bindat (strz): Consistent length type check, take two
    
    Commit 30ec4a7347b2944818c6fc469ae871374ce7caa4 is incorrect -- the
    length computation logic uses a simple nilness test, not `numberp'.
    The `numberp' case is just an optimization if `len' is a literal
    number; it does not affect the behavior.
    
    Revert that commit, add some comments to help future readers avoid the
    same mistake, and update the pack logic to use the same optimization
    as the length computation for consistency.

Patch 4:

    ; bindat (bindat--length-group): Fix indentation
[0001-bindat-strz-Fix-documentation-for-strz-with-pre-allo.patch (text/x-patch, attachment)]
[0002-bindat-tests-str-strz-Refine-tests.patch (text/x-patch, attachment)]
[0003-bindat-strz-Consistent-length-type-check-take-two.patch (text/x-patch, attachment)]
[0004-bindat-bindat-length-group-Fix-indentation.patch (text/x-patch, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55882; Package emacs. (Fri, 10 Jun 2022 09:55:02 GMT) Full text and rfc822 format available.

Message #8 received at 55882 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Richard Hansen <rhansen <at> rhansen.org>
Cc: 55882 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#55882: [PATCH] bindat: Minor cleanups
Date: Fri, 10 Jun 2022 11:53:58 +0200
Richard Hansen <rhansen <at> rhansen.org> writes:

> Attached are a few patches to fix some minor issues with bindat and
> its documentation and tests.

Thanks; pushed to Emacs 29.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 29.1, send any further explanations to 55882 <at> debbugs.gnu.org and Richard Hansen <rhansen <at> rhansen.org> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 10 Jun 2022 09:55:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 08 Jul 2022 11:24:14 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 39 days ago.

Previous Next


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