From: Eli Zaretskii <eliz@gnu.org>
To: Lars Brinkhoff <lars@nocrew.org>
Cc: emacs-devel@gnu.org
Subject: Re: User-defined record types, v2
Date: Sat, 18 Mar 2017 19:35:24 +0200 [thread overview]
Message-ID: <8337eaxzc3.fsf@gnu.org> (raw)
In-Reply-To: <86bmsyts9f.fsf@molnjunk.nocrew.org> (message from Lars Brinkhoff on Sat, 18 Mar 2017 18:21:48 +0100)
> From: Lars Brinkhoff <lars@nocrew.org>
> Date: Sat, 18 Mar 2017 18:21:48 +0100
>
> +static const char *old_struct_prefix = "cl-struct-";
> +static int old_struct_prefix_length;
> +
> +static int
> +vector_struct_p (Lisp_Object object)
> +{
> + if (! old_struct_compat || ASIZE (object) < 1)
> + return false;
> +
> + Lisp_Object type = AREF (object, 0);
> + return SYMBOLP (type)
> + && strncmp (SDATA (SYMBOL_NAME (type)),
> + old_struct_prefix,
> + old_struct_prefix_length) == 0;
Why not make old_struct_prefix be an array, and then use sizeof
instead of computing the length of the string at dump time?
> + DEFVAR_BOOL ("old-struct-compat", old_struct_compat,
> + doc: /* Non-nil means hack for old structs is in effect. */);
This doc string should explain more about the effect of this variable.
Thanks.
next prev parent reply other threads:[~2017-03-18 17:35 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-18 17:04 User-defined record types, v2 Lars Brinkhoff
2017-03-18 17:05 ` Lars Brinkhoff
2017-03-18 17:13 ` Lars Brinkhoff
2017-03-18 17:17 ` Lars Brinkhoff
2017-03-18 17:21 ` Lars Brinkhoff
2017-03-18 17:35 ` Eli Zaretskii [this message]
2017-03-18 19:33 ` Lars Brinkhoff
2017-03-18 22:24 ` Stefan Monnier
2017-03-19 9:17 ` Lars Brinkhoff
2017-03-19 12:50 ` Stefan Monnier
2017-03-19 14:51 ` Eli Zaretskii
2017-03-18 17:29 ` Eli Zaretskii
2017-03-19 10:28 ` Lars Brinkhoff
2017-03-19 12:51 ` Stefan Monnier
2017-03-21 9:55 ` Lars Brinkhoff
2017-03-21 11:53 ` Stefan Monnier
2017-03-22 21:15 ` Stefan Monnier
2017-03-23 6:53 ` Lars Brinkhoff
2017-03-23 7:02 ` Lars Brinkhoff
2017-03-23 7:34 ` Lars Brinkhoff
2017-03-23 19:47 ` Stefan Monnier
2017-03-24 10:15 ` Lars Brinkhoff
2017-03-24 18:17 ` Stefan Monnier
2017-03-24 20:38 ` Lars Brinkhoff
2017-03-29 12:46 ` Lars Brinkhoff
2017-03-30 12:59 ` Stefan Monnier
2017-03-30 14:57 ` Lars Brinkhoff
2017-03-30 15:07 ` Stefan Monnier
2017-03-30 18:10 ` Eli Zaretskii
2017-03-22 7:58 ` Lars Brinkhoff
2017-03-22 8:46 ` Andreas Schwab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8337eaxzc3.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=lars@nocrew.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).