unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: scratch/comp-static-data 82226254c86: Use ephemeral and staticvec vectors to refer to allocated objects.
       [not found] ` <20230308132710.49F02C13A84@vcs2.savannah.gnu.org>
@ 2023-03-09  1:26   ` Po Lu
  0 siblings, 0 replies; only message in thread
From: Po Lu @ 2023-03-09  1:26 UTC (permalink / raw)
  To: emacs-devel; +Cc: Vibhav Pant

Vibhav Pant <vibhavp@gmail.com> writes:

> +static void
> +alloc_class_check (Lisp_Object alloc_class)
> +{
> +  bool valid = EQ (alloc_class, Qd_default) ||
> +    EQ (alloc_class, Qd_impure) ||
> +    EQ (alloc_class, Qd_ephemeral);
> +  if (!valid)
> +    {
> +      xsignal2 (Qnative_ice,
> +		build_string ("invalid lisp data allocation class"),
> +		alloc_class);
> +      assume (false);
> +    }
> +}

You wrote this wrong again; it should be:

  bool valid = (EQ (alloc_class, Qd_default)
  		|| EQ (alloc_class, Qd_impure)
                || EQ (alloc_class, Qd_epemeral))

the `eassume (false)' is redundant, as xsignal2 is noreturn.  And
perhaps it would be better to move valid into the if condition entirely.

Thanks.



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-09  1:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <167828202998.20769.14455677610021114493@vcs2.savannah.gnu.org>
     [not found] ` <20230308132710.49F02C13A84@vcs2.savannah.gnu.org>
2023-03-09  1:26   ` scratch/comp-static-data 82226254c86: Use ephemeral and staticvec vectors to refer to allocated objects Po Lu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).