From: Mark Wooding Date: Mon, 27 May 2013 21:28:12 +0000 (+0100) Subject: Merge branch 'master' of git.distorted.org.uk:~mdw/publish/public-git/catacomb X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/commitdiff_plain/6ec3a4cf4aaa7cd375e1aa18f85861986259b8e5?hp=09e500b22fc6250ba458d26a9dd7e6571d2c79d8 Merge branch 'master' of git.distorted.org.uk:~mdw/publish/public-git/catacomb * 'master' of git.distorted.org.uk:~mdw/publish/public-git/catacomb: mpmul.[ch]: Move internal `HWM' and `LWM' constants to implementation. group.h: Fix the struct tag for `group'. --- diff --git a/group.h b/group.h index a144706..4886985 100644 --- a/group.h +++ b/group.h @@ -64,7 +64,7 @@ typedef struct ge ge; /* Group element (abstract type) */ #endif -typedef struct group_ { +typedef struct group { const struct group_ops *ops; /* Operations table */ size_t nbits; /* Size of an element in bits */ size_t noctets; /* Size of raw element in octets */ diff --git a/mpmul.c b/mpmul.c index 0b597f4..1f932b0 100644 --- a/mpmul.c +++ b/mpmul.c @@ -61,6 +61,9 @@ void mpmul_init(mpmul *b) * context; this sort of rules out @mp_build@ integers. */ +#define HWM (MPMUL_DEPTH - 20) +#define LWM (MPMUL_DEPTH / 2) + void mpmul_add(mpmul *b, mp *x) { size_t i = b->i; diff --git a/mpmul.h b/mpmul.h index ecd7b3a..bd1f156 100644 --- a/mpmul.h +++ b/mpmul.h @@ -74,9 +74,6 @@ #define MPMUL_DEPTH (2 * (CHAR_BIT * sizeof(size_t) + 10)) -#define HWM (MPMUL_DEPTH - 20) -#define LWM (MPMUL_DEPTH / 2) - /*----- Data structures ---------------------------------------------------*/ typedef struct mpmul {