all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 52440@debbugs.gnu.org, dick.r.chiang@gmail.com
Subject: bug#52440: 28.0.50; [PATCH] Quis custodiet ipsos custodes (sqlite3)
Date: Sun, 12 Dec 2021 09:52:20 +0200	[thread overview]
Message-ID: <83ee6ip8ej.fsf@gnu.org> (raw)
In-Reply-To: <87r1aie4hr.fsf@gnus.org> (message from Lars Ingebrigtsen on Sun,  12 Dec 2021 07:12:16 +0100)

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: 52440@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
> Date: Sun, 12 Dec 2021 07:12:16 +0100
> 
> > --- a/src/lisp.h
> > +++ b/src/lisp.h
> > @@ -2571,17 +2571,6 @@ xmint_pointer (Lisp_Object a)
> >    return XUNTAG (a, Lisp_Vectorlike, struct Lisp_Misc_Ptr)->pointer;
> >  }
> >  
> > -struct Lisp_Sqlite
> > -{
> > -  union vectorlike_header header;
> > -  void *db;
> > -  void *stmt;
> > -  char *name;
> > -  void (*finalizer) (void *);
> > -  bool eof;
> > -  bool is_statement;
> > -} GCALIGNED_STRUCT;
> 
> I thought including this in lisp.h instead of adding a separate .h and
> #ifdeffing all over the place was the most readable, but I have no
> strong opinion on that.  Eli, what do you think?

I don't like including other headers in lisp.h if those headers define
stuff important for the Lisp interpreter.  We did that with thread.h,
and I have a lot of bad memories from that experiment.  The main
problem is recursive dependencies between lisp.h and the included
header (which bite you if you move the place of the inclusion).  The
need to recompile everything when the included header changes (because
lisp.h is included by every source file) is also a nuisance.

However, the proof of the pudding is in eating: we do something like
the above with comp.h, for example (but also have HAVE_NATIVE_COMP
conditionals in lisp.h all over the place), so eventually it depends
on how many hoops we have to jump through to make the separation
happen.  If it's feasible to keep sqlite.h to a bare minimum, like
comp.h did, but without leaving a lot of sqlite stuff in lisp.h,
perhaps it's worthwhile?

OTOH, sqlite has (or should have) a relatively small impact on lisp.h,
as it basically defines a single data type.  The amount of sqlite
stuff in lisp.h is quite small, for that reason.  So I tend to think a
separate header is overkill.





  reply	other threads:[~2021-12-12  7:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-11 21:32 bug#52440: 28.0.50; [PATCH] Quis custodiet ipsos custodes (sqlite3) dick.r.chiang
2021-12-12  6:12 ` Lars Ingebrigtsen
2021-12-12  7:52   ` Eli Zaretskii [this message]
2021-12-12 11:32     ` dick
2021-12-12 12:01       ` Eli Zaretskii
2021-12-12 12:46         ` dick
2021-12-12 13:28           ` Eli Zaretskii
2021-12-12 14:25             ` dick
2021-12-12 14:38               ` Eli Zaretskii
2021-12-12 15:04                 ` dick
2021-12-13  1:55                   ` Phil Sainty
2021-12-12 11:49     ` Lars Ingebrigtsen
2021-12-12 12:04       ` Eli Zaretskii

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83ee6ip8ej.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=52440@debbugs.gnu.org \
    --cc=dick.r.chiang@gmail.com \
    --cc=larsi@gnus.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.