[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/2] Add module functions to convert from and to big integers
From: |
Philipp Stephani |
Subject: |
Re: [PATCH 2/2] Add module functions to convert from and to big integers. |
Date: |
Wed, 24 Apr 2019 19:15:13 +0200 |
Am Mi., 24. Apr. 2019 um 19:11 Uhr schrieb Eli Zaretskii <address@hidden>:
>
> > From: Philipp Stephani <address@hidden>
> > Date: Wed, 24 Apr 2019 18:57:40 +0200
> > Cc: Paul Eggert <address@hidden>, Emacs developers <address@hidden>,
> > Philipp Stephani <address@hidden>
> >
> > 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 <gmp.h>
#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.
- [PATCH 1/2] Add conversions to and from struct timespec to module interface., (continued)
- Message not available
- Re: [PATCH 2/2] Add module functions to convert from and to big integers., Eli Zaretskii, 2019/04/24
- Re: [PATCH 2/2] Add module functions to convert from and to big integers., Philipp Stephani, 2019/04/24
- Re: [PATCH 2/2] Add module functions to convert from and to big integers., Eli Zaretskii, 2019/04/24
- Re: [PATCH 2/2] Add module functions to convert from and to big integers., Philipp Stephani, 2019/04/24
- Re: [PATCH 2/2] Add module functions to convert from and to big integers., Eli Zaretskii, 2019/04/24
- Re: [PATCH 2/2] Add module functions to convert from and to big integers.,
Philipp Stephani <=
- Re: [PATCH 2/2] Add module functions to convert from and to big integers., Eli Zaretskii, 2019/04/24
- Re: [PATCH 2/2] Add module functions to convert from and to big integers., Philipp Stephani, 2019/04/24
- [PATCH] Unbreak build when building without GMP support., Philipp Stephani, 2019/04/24
- Re: [PATCH] Unbreak build when building without GMP support., Eli Zaretskii, 2019/04/24
- Re: [PATCH] Unbreak build when building without GMP support., Philipp Stephani, 2019/04/24
- Re: [PATCH] Unbreak build when building without GMP support., Eli Zaretskii, 2019/04/24
- Re: [PATCH] Unbreak build when building without GMP support., Philipp Stephani, 2019/04/24
- Re: [PATCH] Unbreak build when building without GMP support., Eli Zaretskii, 2019/04/24
- Re: [PATCH] Unbreak build when building without GMP support., Philipp Stephani, 2019/04/24
- Re: [PATCH] Unbreak build when building without GMP support., Eli Zaretskii, 2019/04/25