Sitelet https://github.com/erigontech/silkpre/commit/8b309c94c45c90020fdae29f5ab725c9e763b5fa
Skip to content

Commit 8b309c9

Browse files
committed
enum instead of macros
1 parent dd9fbd0 commit 8b309c9

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎lib/silkpre/blake2b.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
#include <stddef.h>
2222
#include <stdint.h>
2323

24-
#define SILKPRE_BLAKE2B_BLOCKBYTES 128
25-
2624
#if defined(__cplusplus)
2725
extern "C" {
2826
#endif
2927

28+
enum { SILKPRE_BLAKE2B_BLOCKBYTES = 128 };
29+
3030
typedef struct SilkpreBlake2bState__ {
3131
uint64_t h[8];
3232
uint64_t t[2];

‎lib/silkpre/ecdsa.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424
#include <stddef.h>
2525
#include <stdint.h>
2626

27-
#define SILKPRE_SECP256K1_CONTEXT_FLAGS (SECP256K1_CONTEXT_SIGN | SECP256K1_CONTEXT_VERIFY)
28-
2927
#if defined(__cplusplus)
3028
extern "C" {
3129
#endif
3230

31+
enum { SILKPRE_SECP256K1_CONTEXT_FLAGS = (SECP256K1_CONTEXT_SIGN | SECP256K1_CONTEXT_VERIFY) };
32+
3333
//! \brief Tries recover the address used for message signing
3434
//! \param [in] message : the signed message
3535
//! \param [in] signature : the signature

0 commit comments

Comments
 (0)