bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#69749: (bindat-type sint 32 t) -> unbound variable bitlen


From: Eli Zaretskii
Subject: bug#69749: (bindat-type sint 32 t) -> unbound variable bitlen
Date: Sat, 16 Mar 2024 13:16:17 +0200

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Eli Zaretskii <eliz@gnu.org>,  69749@debbugs.gnu.org
> Date: Fri, 15 Mar 2024 12:51:36 -0400
> 
> >> Your code ends up (via the `sint` of `bindat-type`) relying on the
> >> `lexical-binding` dialect of ELisp, which is enabled by default in
> >> `ielm` but not in your file.
> > Indeed, thanks for the fix.
> > Perhaps it would be useful for the bindat-type macro to emit a warning when
> > it is running in the dynamic-binding dialect (at least for the types that
> > require lexical binding)?
> 
> Agreed.  I just pushed a corresponding patch to `master`.
> It impacts only `sint` (among the predefined types).
> 
> > This would have no runtime cost when byte-compiled or native-compiled,
> > I assume.
> 
> The patch I installed indeed doesn't impact the performance of the code.
> The underlying detail which requires `lexical-binding` to be active does
> cause the code for `sint` to be significantly less efficient than that
> for `uint`, tho, so if performance is important, you may prefer to use
> `uint` and do the conversion to a signed integer manually elsewhere. 🙁

Thanks, should we now close this bug?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]