From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: sqlite3 Date: Sat, 11 Dec 2021 12:06:55 +0200 Message-ID: <83ilvvqwu8.fsf@gnu.org> References: <87tufmjyai.fsf@gnus.org> <87sfv5ljxn.fsf@gnus.org> <8735n5leza.fsf@gnus.org> <837dch1qox.fsf@gnu.org> <87ee6odu65.fsf@gnus.org> <83h7bjye0b.fsf@gnu.org> <87sfv360np.fsf@gnus.org> <83lf0vw6sg.fsf@gnu.org> <87k0gd1cl3.fsf@gnus.org> <83zgp8svkw.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25210"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: larsi@gnus.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 11 11:08:00 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mvzIO-0006Ox-DL for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Dec 2021 11:08:00 +0100 Original-Received: from localhost ([::1]:55886 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvzIN-0001eH-8D for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Dec 2021 05:07:59 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:33408) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvzHX-0000zl-E3 for emacs-devel@gnu.org; Sat, 11 Dec 2021 05:07:07 -0500 Original-Received: from [2001:470:142:3::e] (port=55998 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvzHX-000687-3n; Sat, 11 Dec 2021 05:07:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=AISmcw94nqkSlLxYXdtsV6Y462I65Med/zXw7NSvV9c=; b=hgWyPtmjrXpw nHop2vLu76T50bStQjMsySS2mcIUz7EkTT0cVuSCAmWntjqk/7hik2uqrxp/mRGT8Gs1Cez0TuE2v WgYSV+rchxkvpeC7YP6WF5lWoGfi25Z8d6uihGYIGwQiZ0py8L24sknlQuwKSjxYuSA6YBrkmRymH RycFQnxDqe+JuvZi1J0wAw9dqbq8+Q+/6E8yndb2ww7B7hxmm/BxGSOYsQ5z62Of2dIEkA0b9O5L3 EHD5kiJNN4mXqLUiHVNu3RUV0YZGI6XOtR54AOHCpCqf3a9Xn0B2It5hIuq6HJlmFHhpBmQstbnMq aKZMIbO6GKsEFcrpjeAIjQ==; Original-Received: from [87.69.77.57] (port=1070 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvzHV-0004Jh-M8; Sat, 11 Dec 2021 05:07:07 -0500 In-Reply-To: <83zgp8svkw.fsf@gnu.org> (message from Eli Zaretskii on Fri, 10 Dec 2021 10:38:55 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:281668 Archived-At: > Date: Fri, 10 Dec 2021 10:38:55 +0200 > From: Eli Zaretskii > Cc: emacs-devel@gnu.org > > > Thanks; with those two changes, the sqlite branch now seems to work fine > > dynamically loaded under mingw, but you should probably have a look at > > this, as this is the very first time I've done this stuff. > > Will do, when the code lands on master. Now done. A couple of issues that caught my eye while reading the code: . Should we invoke encode_string_utf_8 with 2 last arguments Qnil, and signal an error if the result is nil? That would make sure we were passed a valid UTF-8 string. We could also use non-zero 3rd argument, for speed. . sqlite-load-extension expects a file name with an extension, but that would leas to Lisp code conditioning on system-type to use the correct extension. Should we instead append the extension inside the function? Also, are SQLite extension modules usually installed in some known directory, or using some PATH-style list of directories? If they are, we could perhaps use 'load-'-style path variable?