From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Change module interface to no longer use GMP objects directly. Date: Sat, 23 Nov 2019 21:08:50 +0100 Message-ID: References: <20191117183828.82379-1-phst@google.com> <089f3d06-e227-27da-c8fe-afcbbbbc934a@cs.ucla.edu> <10cefdff-38ce-438b-881d-15d2fe816a8b@cs.ucla.edu> <3d727645-911e-fc71-1f86-364aa82d06ba@cs.ucla.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="135927"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Philipp Stephani , Stefan Monnier , Emacs developers To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 23 21:09:13 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iYbiS-000ZEZ-BP for ged-emacs-devel@m.gmane.org; Sat, 23 Nov 2019 21:09:12 +0100 Original-Received: from localhost ([::1]:60834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iYbiQ-0002Rr-Gh for ged-emacs-devel@m.gmane.org; Sat, 23 Nov 2019 15:09:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50737) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iYbiK-0002RY-Ej for emacs-devel@gnu.org; Sat, 23 Nov 2019 15:09:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iYbiI-0002Bn-Rq for emacs-devel@gnu.org; Sat, 23 Nov 2019 15:09:04 -0500 Original-Received: from mail-ot1-x344.google.com ([2607:f8b0:4864:20::344]:40649) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iYbiI-0002Bb-NX for emacs-devel@gnu.org; Sat, 23 Nov 2019 15:09:02 -0500 Original-Received: by mail-ot1-x344.google.com with SMTP id m15so9210666otq.7 for ; Sat, 23 Nov 2019 12:09:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FjfKhZxF2v/Z/HhWdYJ2R4vy/ApD4HArVc70h4UlmYs=; b=QHS8kgB1entRcWCEb93sRbhueqojLKyvJeMMt9OCDqyQZkQtf9cj0A8L2mFZ6JMhrk uYlcP61pu+Pvt0L/UIKXg004vf/Gw2gcUKuDWK5pcbxI8gKKsKLfpjuPWwzoHUfRFGZV 0yC4eXyhtaR4zcoABlNUI2aaWh79PhWDp6Pq8cB9ROlSKm12s7Ej8iorhPhfO5dqkhMl FK7gIWQwrVRAOIZrWE7wn4MPpc7wjnS2XoQwxiMm9a5hx/UT1k5JWW+zyh0leB3LCRSA JEonsGcw93PwhpSsygoZXx8njlLrqaGAXnqOhrbU8gIHgn+X4IsluLFj5CLljP0yxsbt d67g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FjfKhZxF2v/Z/HhWdYJ2R4vy/ApD4HArVc70h4UlmYs=; b=EZxLuSfBjUnd3RhzBe0df72xWI+tFfvNeumiXPE2PK/osgm1J6efbj6exg0sD6zUTo bMECdHu3wOJAXsD6bBTKELmPp+/5kom3Fux7yvFZ5AsSoNHjlsguVjczYTTYovK6OG4F WBfJp+ktQ2urRQrACjgeWGeIxo/gMwTGxzIGjw8O8Xcf1uHsKD1GdQGeDMLaQvEBoH9Q mILKwUy6Ieo4U+LstQNuplpqHgXSm8JaPaIXr4Fa7zzaAEIVu1f8EDill8kXgNk5R38B 1vJwFD6ctgb7rFbGjzzfL2EZtC0FQxvofyxq3NTijYHG/+k1mngGFiUQMiQtRPylQMtw xsHA== X-Gm-Message-State: APjAAAVLsiCRLd9mpzu5/ERmfMe4gL4/WiTmw9EkQxTDoOt3+k2r9uh8 dqy115mVMw7yDdoHUcB+IZNjSA4rj2atby1FU/w= X-Google-Smtp-Source: APXvYqxqrM7vJ8wj+PubJM7Tzuk8g5YuOuis4I9LFYJH5Z91jMHex8m2DFohb3a7qDmqezn7gvqRc7h2hBTVc3O/VI4= X-Received: by 2002:a9d:2073:: with SMTP id n106mr4627854ota.145.1574539741651; Sat, 23 Nov 2019 12:09:01 -0800 (PST) In-Reply-To: <3d727645-911e-fc71-1f86-364aa82d06ba@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::344 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:242660 Archived-At: Am Sa., 23. Nov. 2019 um 03:13 Uhr schrieb Paul Eggert : > > On 11/21/19 12:31 PM, Philipp Stephani wrote: > > It's crucial that there's a single canonical emacs-module.h. > > I don't see why it's crucial. Certainly emacs-module.h will differ for > different Emacs versions, But only in very specific backwards-compatible ways. > and people will deal with any mismatches as > usual. And developers do not expect /usr/include/stdio.h to be the same > on all platforms; why would they expect /usr/include/emacs-module.h to > be the same? Because stdio.h is part of the C implementation, but emacs-module.h is not. > After all, modules themselves will not be portable among > platforms, even if the module's sources and include files are > byte-for-byte identical. Yes, but we still at least need the header to remain the same across time and across configuration options within each platform. Having the header depend on configure makes it almost impossible to guarantee that. In the interest of not blocking the Emacs 27 release on this, and unless Eli objects, I'll push my original patch to master within the next few days, with the following minor modifications: - Documenting the restriction on the number of magnitude array elements. - Using a typedef emacs_limb_t for the magnitude array elements, with the guarantee that's is a stable unsigned integer type. I will make emacs_limb_t an alias of unsigned long long if ULONG_MAX <= 0xFFFFFFFF, and an alias of unsigned long otherwise. - Fixing the example code.