From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#52440: 28.0.50; [PATCH] Quis custodiet ipsos custodes (sqlite3) Date: Sun, 12 Dec 2021 07:12:16 +0100 Message-ID: <87r1aie4hr.fsf@gnus.org> References: <87wnkazv3i.fsf@dick> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38722"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 52440@debbugs.gnu.org To: dick.r.chiang@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 12 07:13:15 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mwI6k-0009sL-JB for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Dec 2021 07:13:14 +0100 Original-Received: from localhost ([::1]:35524 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mwI6j-0001GG-Gd for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Dec 2021 01:13:13 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50562) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mwI6Z-0001G8-05 for bug-gnu-emacs@gnu.org; Sun, 12 Dec 2021 01:13:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38968) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mwI6Y-0004Mv-N2 for bug-gnu-emacs@gnu.org; Sun, 12 Dec 2021 01:13:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mwI6Y-00051p-A1 for bug-gnu-emacs@gnu.org; Sun, 12 Dec 2021 01:13:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Dec 2021 06:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52440 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 52440-submit@debbugs.gnu.org id=B52440.163928956119300 (code B ref 52440); Sun, 12 Dec 2021 06:13:02 +0000 Original-Received: (at 52440) by debbugs.gnu.org; 12 Dec 2021 06:12:41 +0000 Original-Received: from localhost ([127.0.0.1]:50514 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwI6C-00051D-SG for submit@debbugs.gnu.org; Sun, 12 Dec 2021 01:12:41 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:45280) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwI5x-00050i-SR for 52440@debbugs.gnu.org; Sun, 12 Dec 2021 01:12:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ks1q0mG7xuuhgXNYG9OC8FqoVrmwfvzamSkZt6ADTfw=; b=I4G/a6e6Hyd4LcJPL9zC6QaOX6 iSPIf68FDKyFe7+ZTzAjsweBckfWuMoxzk73b0bt4WyxAofGKP2NZDbHSgUKh3hcXBzZRfBgD34S9 +Pbk+NUNdH9BGPVpXdOt2PEyoCZphRTL1/njk41poyHDDazsfMM9uju56ejdQT8JgI38=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mwI5o-0002c0-TA; Sun, 12 Dec 2021 07:12:19 +0100 X-Now-Playing: Xeno & Oaklander's _Vi-deo_: "Infinite Sadness" In-Reply-To: <87wnkazv3i.fsf@dick> (dick r. chiang's message of "Sat, 11 Dec 2021 16:32:01 -0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:222175 Archived-At: dick.r.chiang@gmail.com writes: > -OPTION_DEFAULT_ON([sqlite3],[don't compile with sqlite3 support]) > +OPTION_DEFAULT_OFF([sqlite3],[don't compile with sqlite3 support]) No, we're defaulting it to on. > - AC_SUBST(SQLITE3_LIBS) > - LIBS="$SQLITE3_LIBS $LIBS" > + SQLITE3_OBJ=sqlite.o No, we're always building the sqlite.o file. We've tried out different variants of this over the years, but always compiling the files (and if-deffing out almost everything in it) is the least work in the long run. > diff --git a/lisp/sqlite-mode.el b/lisp/sqlite-mode.el > index 9306bd85dcd..823dfeb07d6 100644 > --- a/lisp/sqlite-mode.el > +++ b/lisp/sqlite-mode.el > @@ -25,6 +25,14 @@ > > (require 'cl-lib) > > +(declare-function sqlite-execute "sqlite.c") > +(declare-function sqlite-more-p "sqlite.c") > +(declare-function sqlite-next "sqlite.c") > +(declare-function sqlite-columns "sqlite.c") > +(declare-function sqlite-finalize "sqlite.c") > +(declare-function sqlite-select "sqlite.c") > +(declare-function sqlite-open "sqlite.c") Thanks; applied. > --- 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? > --- a/test/src/sqlite-tests.el > +++ b/test/src/sqlite-tests.el > @@ -25,6 +25,17 @@ > > (require 'ert) > (require 'ert-x) > +(require 'sqlite-mode) I don't think this file is testing anything in sqlite-mode? > +(declare-function sqlite-execute "sqlite.c") > +(declare-function sqlite-close "sqlite.c") > +(declare-function sqlitep "sqlite.c") > +(declare-function sqlite-available-p "sqlite.c") > +(declare-function sqlite-finalize "sqlite.c") > +(declare-function sqlite-next "sqlite.c") > +(declare-function sqlite-more-p "sqlite.c") > +(declare-function sqlite-select "sqlite.c") > +(declare-function sqlite-open "sqlite.c") Thanks; applied. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no