remove *_ll* setters/getters

* they are non standard
* they are incompatible with older compilers
* u64/i64 functions should be used instead
* these functions should be deprecated again in 1.x
This commit is contained in:
Daniel Mendler 2019-11-22 16:04:48 +01:00 committed by Steffen Jaeckel
parent f0ab662ffc
commit b800b7610a
No known key found for this signature in database
GPG Key ID: AF0CB17621EDAD72
8 changed files with 1 additions and 80 deletions

View File

@ -978,30 +978,6 @@ unsigned long mp_get_mag_ul (const mp_int *a);
This will return the least significant bits of the big integer $a$ that fit into the native data
type \texttt{long}.
\subsection{Long Long Constants - platform dependant}
\index{mp\_set\_ll} \index{mp\_set\_ull}
\begin{alltt}
void mp_set_ll (mp_int *a, long long b);
void mp_set_ull (mp_int *a, unsigned long long b);
\end{alltt}
This will assign the value of the platform--dependent sized variable $b$ to the big integer $a$.
To retrieve the value, the following functions can be used.
\index{mp\_get\_ll}
\index{mp\_get\_ull}
\index{mp\_get\_mag\_ull}
\begin{alltt}
long long mp_get_ll (const mp_int *a);
unsigned long long mp_get_ull (const mp_int *a);
unsigned long long mp_get_mag_ull (const mp_int *a);
\end{alltt}
This will return the least significant bits of $a$ that fit into the native data type \texttt{long
long}.
\subsection{Floating Point Constants - platform dependant}
\index{mp\_set\_double}
@ -1023,7 +999,7 @@ double mp_get_double(const mp_int *a);
\subsection{Initialize and Setting Constants}
To both initialize and set small constants the following nine functions are available.
\index{mp\_init\_set} \index{mp\_init\_i32} \index{mp\_init\_i64} \index{mp\_init\_u32} \index{mp\_init\_u64}
\index{mp\_init\_l} \index{mp\_init\_ll} \index{mp\_init\_ul} \index{mp\_init\_ull}
\index{mp\_init\_l} \index{mp\_init\_ul}
\begin{alltt}
mp_err mp_init_set (mp_int *a, mp_digit b);
mp_err mp_init_i32 (mp_int *a, int32_t b);
@ -1032,8 +1008,6 @@ mp_err mp_init_i64 (mp_int *a, int64_t b);
mp_err mp_init_u64 (mp_int *a, uint64_t b);
mp_err mp_init_l (mp_int *a, long b);
mp_err mp_init_ul (mp_int *a, unsigned long b);
mp_err mp_init_ll (mp_int *a, long long b);
mp_err mp_init_ull (mp_int *a, unsigned long long b);
\end{alltt}
Both functions work like the previous counterparts except they first initialize $a$ with the

View File

@ -1,7 +0,0 @@
#include "tommath_private.h"
#ifdef MP_GET_LL_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
MP_GET_SIGNED(mp_get_ll, mp_get_mag_ull, long long, unsigned long long)
#endif

View File

@ -1,7 +0,0 @@
#include "tommath_private.h"
#ifdef MP_GET_MAG_ULL_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
MP_GET_MAG(mp_get_mag_ull, unsigned long long)
#endif

View File

@ -1,7 +0,0 @@
#include "tommath_private.h"
#ifdef MP_INIT_LL_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
MP_INIT_INT(mp_init_ll, mp_set_ll, long long)
#endif

View File

@ -1,7 +0,0 @@
#include "tommath_private.h"
#ifdef MP_INIT_ULL_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
MP_INIT_INT(mp_init_ull, mp_set_ull, unsigned long long)
#endif

View File

@ -1,7 +0,0 @@
#include "tommath_private.h"
#ifdef MP_SET_LL_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
MP_SET_SIGNED(mp_set_ll, mp_set_ull, long long, unsigned long long)
#endif

View File

@ -1,7 +0,0 @@
#include "tommath_private.h"
#ifdef MP_SET_ULL_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */
MP_SET_UNSIGNED(mp_set_ull, unsigned long long)
#endif

View File

@ -242,7 +242,6 @@ mp_err mp_init_u64(mp_int *a, uint64_t b) MP_WUR;
uint32_t mp_get_mag_u32(const mp_int *a) MP_WUR;
uint64_t mp_get_mag_u64(const mp_int *a) MP_WUR;
unsigned long mp_get_mag_ul(const mp_int *a) MP_WUR;
unsigned long long mp_get_mag_ull(const mp_int *a) MP_WUR;
/* get integer, set integer (long) */
long mp_get_l(const mp_int *a) MP_WUR;
@ -254,16 +253,6 @@ mp_err mp_init_l(mp_int *a, long b) MP_WUR;
void mp_set_ul(mp_int *a, unsigned long b);
mp_err mp_init_ul(mp_int *a, unsigned long b) MP_WUR;
/* get integer, set integer (long long) */
long long mp_get_ll(const mp_int *a) MP_WUR;
void mp_set_ll(mp_int *a, long long b);
mp_err mp_init_ll(mp_int *a, long long b) MP_WUR;
/* get integer, set integer (unsigned long long) */
#define mp_get_ull(a) ((unsigned long long)mp_get_ll(a))
void mp_set_ull(mp_int *a, unsigned long long b);
mp_err mp_init_ull(mp_int *a, unsigned long long b) MP_WUR;
/* set to single unsigned digit, up to MP_DIGIT_MAX */
void mp_set(mp_int *a, mp_digit b);
mp_err mp_init_set(mp_int *a, mp_digit b) MP_WUR;