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 2/2] Add module functions to convert from and to big
integers.
Date: Wed, 24 Apr 2019 19:15:13 +0200
Message-ID:
References: <329aec43-8272-f39a-e7ef-e77804103a50@cs.ucla.edu>
<20190423213218.35618-1-phst@google.com>
<20190423213218.35618-2-phst@google.com> <837ebj2xx0.fsf@gnu.org>
<83zhof1g76.fsf@gnu.org>
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="110352"; mail-complaints-to="usenet@blaine.gmane.org"
Cc: Philipp Stephani , Paul Eggert ,
Emacs developers
To: Eli Zaretskii
Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 24 19:30: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.0:RSA_AES_256_CBC_SHA1:256)
(Exim 4.89)
(envelope-from )
id 1hJLim-000SU6-S2
for ged-emacs-devel@m.gmane.org; Wed, 24 Apr 2019 19:30:12 +0200
Original-Received: from localhost ([127.0.0.1]:44928 helo=lists.gnu.org)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from )
id 1hJLil-0001rg-Qc
for ged-emacs-devel@m.gmane.org; Wed, 24 Apr 2019 13:30:11 -0400
Original-Received: from eggs.gnu.org ([209.51.188.92]:56671)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from ) id 1hJLh6-00018K-Sa
for emacs-devel@gnu.org; Wed, 24 Apr 2019 13:28:29 -0400
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from ) id 1hJLUY-0004d2-0d
for emacs-devel@gnu.org; Wed, 24 Apr 2019 13:15:32 -0400
Original-Received: from mail-oi1-x244.google.com ([2607:f8b0:4864:20::244]:45942)
by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
(Exim 4.71) (envelope-from )
id 1hJLUE-0004B1-St; Wed, 24 Apr 2019 13:15:11 -0400
Original-Received: by mail-oi1-x244.google.com with SMTP id y84so14867693oia.12;
Wed, 24 Apr 2019 10:15:09 -0700 (PDT)
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=+bi+D5CmWAgvY60EBDod16DOoLyOS82UPc5BiSpdfRA=;
b=aX1QszcR7XLqkyHmUnXPgM7muozTwJ31lQRFCR9N088+oaxecTq+8R2jrRkyldrgEG
4IlkdT/N07FBFVi4b68s3ipnIwkQYqwZZ1RUC5L11r1W+NU7u5UWMkp+qTydD5D8/uvG
0dgvUY+sfJzX7Tvhvl2DcAQWdNmJ/Ma35suk26DvVPnBBH0jvYRhkMwyx6moqnY/0F6I
hE/dC6bxORZKRssRz2YtQyTDS2YQa1raKrt0tgp+1vm7iCvFuqDanorpUe0ivQnlPbJn
YvUxTFRlLNDEVGZTRXOol4iqkkXIrhtkYz92guf2Pkkhx446gmmr+jzbM0SjRKlXuzw3
YarA==
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=+bi+D5CmWAgvY60EBDod16DOoLyOS82UPc5BiSpdfRA=;
b=bdtFEjIvn3yG0FvMiHeBw0wZ+34OuFrLGpiP3cPyXiAr/w8ZOkwsqdd+6SiWphgUaP
sdqOLqjiDcCFoa+IpSH6Yd8GJ/wRjNHI2Jr5hCZpk/cadKVMDbWWTs3HSrjvRzBcwzWQ
kqUdCuNhtaLs/Gr1m4dKBy68Pjbnwp5c6ECeqk/Q4/mc16bD5hx7udI8ipzYKIOevbOv
Jl42fFxyAkmzVjg0+m5H2GGq1b0rsNHq+DgxrsNsrttkLJqjRP+Ul7rnrokMj/npfgfk
Mv/C/6W79t0FakUpBSzSHCq400Fn/PAdNlFfjvbFj+lYecbHohA7C//NxU3tytI8k4IV
ikWw==
X-Gm-Message-State: APjAAAWf4bZ8ph1D9tzulXrWSSXD51CS8xZvCUntvQPHdXcH1H2jcFqQ
pBQL8R9vCo6jNnuioAc3rs00TilKFVUY3bDU2aVmmQ==
X-Google-Smtp-Source: APXvYqz8wqNNyM/p76iRb+2To1hOZCMR5r2/j6Qbzp0nTnuIYu7xfCMon9V/jIb6KSM1/f5aLowgqUq5Yu0lhnicuuc=
X-Received: by 2002:aca:5784:: with SMTP id l126mr78529oib.170.1556126108565;
Wed, 24 Apr 2019 10:15:08 -0700 (PDT)
In-Reply-To: <83zhof1g76.fsf@gnu.org>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
recognized.
X-Received-From: 2607:f8b0:4864:20::244
X-BeenThere: emacs-devel@gnu.org
X-Mailman-Version: 2.1.21
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:235872
Archived-At:
Am Mi., 24. Apr. 2019 um 19:11 Uhr schrieb Eli Zaretskii :
>
> > From: Philipp Stephani
> > Date: Wed, 24 Apr 2019 18:57:40 +0200
> > Cc: Paul Eggert , Emacs developers ,
> > Philipp Stephani
> >
> > Right now I see 2 options:
> >
> > 1. Don't support these functions at all if GMP isn't available (i.e.
> > signal an error unconditionally)
> > 2. Add another preprocessor macro that would stop emacs-module.h from
> > including gmp.h.
> >
> > (1) seems a bit easier and cleaner, but means that we wouldn't support
> > these functions if Emacs isn't compiled with GMP support.
>
> I don't think I understand (2): how would you declare GMP-related data
> types used in emacs-module.c, if you don't include gmp.h?
It would require the user (or rather, Emacs) to include gmp.h or
mini-gmp.h before including emacs-module.h. I.e.:
#ifndef EMACS_MODULE_DO_NOT_INCLUDE_GMP_H
#include
#endif
>
> And there might be option (3): have emacs-module.h duplicate the
> portion of mini-gmp.h that are needed when gmp.h isn't available.
> It's a bit inelegant, and maintenance burden, but maybe not grave
> enough to decide that wer cannot support bignums without a real GMP.
I don't think we should replicate internal data structures of
third-party libraries. It's really ugly.