Skip to content

Commit 8e142ca

Browse files
committed
Move SECP256K1_INLINE macro definition out from include/secp256k1.h
1 parent 7744589 commit 8e142ca

14 files changed

+28
-12
lines changed

include/secp256k1.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -122,18 +122,6 @@ typedef int (*secp256k1_nonce_function)(
122122
# endif
123123
# endif
124124

125-
# if (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) )
126-
# if SECP256K1_GNUC_PREREQ(2,7)
127-
# define SECP256K1_INLINE __inline__
128-
# elif (defined(_MSC_VER))
129-
# define SECP256K1_INLINE __inline
130-
# else
131-
# define SECP256K1_INLINE
132-
# endif
133-
# else
134-
# define SECP256K1_INLINE inline
135-
# endif
136-
137125
/* When this header is used at build-time the SECP256K1_BUILD define needs to be set
138126
* to correctly setup export attributes and nullness checks. This is normally done
139127
* by secp256k1.c but to guard against this header being included before secp256k1.c

src/field_5x52_asm_impl.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
#ifndef SECP256K1_FIELD_INNER5X52_IMPL_H
1515
#define SECP256K1_FIELD_INNER5X52_IMPL_H
1616

17+
#include "util.h"
18+
1719
SECP256K1_INLINE static void secp256k1_fe_mul_inner(uint64_t *r, const uint64_t *a, const uint64_t * SECP256K1_RESTRICT b) {
1820
/**
1921
* Registers: rdx:rax = multiplication accumulator

src/field_5x52_int128_impl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <stdint.h>
1111

1212
#include "int128.h"
13+
#include "util.h"
1314

1415
#ifdef VERIFY
1516
#define VERIFY_BITS(x, n) VERIFY_CHECK(((x) >> (n)) == 0)

src/group_impl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#include "field.h"
1111
#include "group.h"
12+
#include "util.h"
1213

1314
/* Begin of section generated by sage/gen_exhaustive_groups.sage. */
1415
#define SECP256K1_G_ORDER_7 SECP256K1_GE_CONST(\

src/int128_native_impl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#define SECP256K1_INT128_NATIVE_IMPL_H
33

44
#include "int128.h"
5+
#include "util.h"
56

67
static SECP256K1_INLINE void secp256k1_u128_load(secp256k1_uint128 *r, uint64_t hi, uint64_t lo) {
78
*r = (((uint128_t)hi) << 64) + lo;

src/int128_struct_impl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#define SECP256K1_INT128_STRUCT_IMPL_H
33

44
#include "int128.h"
5+
#include "util.h"
56

67
#if defined(_MSC_VER) && (defined(_M_X64) || defined(_M_ARM64)) /* MSVC */
78
# include <intrin.h>

src/modules/extrakeys/main_impl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#include "../../../include/secp256k1.h"
1111
#include "../../../include/secp256k1_extrakeys.h"
12+
#include "../../util.h"
1213

1314
static SECP256K1_INLINE int secp256k1_xonly_pubkey_load(const secp256k1_context* ctx, secp256k1_ge *ge, const secp256k1_xonly_pubkey *pubkey) {
1415
return secp256k1_pubkey_load(ctx, ge, (const secp256k1_pubkey *) pubkey);

src/scalar_4x64_impl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include "checkmem.h"
1111
#include "int128.h"
1212
#include "modinv64_impl.h"
13+
#include "util.h"
1314

1415
/* Limbs of the secp256k1 order. */
1516
#define SECP256K1_N_0 ((uint64_t)0xBFD25E8CD0364141ULL)

src/scalar_8x32_impl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#include "checkmem.h"
1111
#include "modinv32_impl.h"
12+
#include "util.h"
1213

1314
/* Limbs of the secp256k1 order. */
1415
#define SECP256K1_N_0 ((uint32_t)0xD0364141UL)

src/scalar_low_impl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#include "checkmem.h"
1111
#include "scalar.h"
12+
#include "util.h"
1213

1314
#include <string.h>
1415

0 commit comments

Comments
 (0)