Skip to content

Commit 7211419

Browse files
api: Rename static context
1 parent ddc1c36 commit 7211419

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

doc/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Each change falls into one of the following categories: Added, Changed, Deprecat
88

99
### Deprecated
1010
- Deprecated context flags `SECP256K1_CONTEXT_VERIFY` and `SECP256K1_CONTEXT_NONE`. Use `SECP256K1_CONTEXT_SIGN` instead.
11+
- Renamed `secp256k1_context_no_precomp` to `secp256k1_context_static`.
1112

1213
## [MAJOR.MINOR.PATCH] - YYYY-MM-DD
1314

include/secp256k1.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,11 @@ typedef int (*secp256k1_nonce_function)(
221221
* generation. See secp256k1_context_create if you need a context object initialized
222222
* for signing.
223223
*/
224-
SECP256K1_API extern const secp256k1_context *secp256k1_context_no_precomp;
224+
SECP256K1_API extern const secp256k1_context *secp256k1_context_static;
225+
226+
/** Deprecated alias for secp256k1_context_no_precomp. */
227+
SECP256K1_API extern const secp256k1_context *secp256k1_context_no_precomp
228+
SECP256K1_DEPRECATED("Use secp256k1_context_static instead");
225229

226230
/** Create a secp256k1 context object (in dynamically allocated memory).
227231
*

src/secp256k1.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,14 @@ struct secp256k1_context_struct {
6262
int declassify;
6363
};
6464

65-
static const secp256k1_context secp256k1_context_no_precomp_ = {
65+
static const secp256k1_context secp256k1_context_static_ = {
6666
{ 0 },
6767
{ secp256k1_default_illegal_callback_fn, 0 },
6868
{ secp256k1_default_error_callback_fn, 0 },
6969
0
7070
};
71-
const secp256k1_context *secp256k1_context_no_precomp = &secp256k1_context_no_precomp_;
71+
const secp256k1_context *secp256k1_context_static = &secp256k1_context_static_;
72+
const secp256k1_context *secp256k1_context_no_precomp = &secp256k1_context_static_;
7273

7374
size_t secp256k1_context_preallocated_size(unsigned int flags) {
7475
size_t ret = sizeof(secp256k1_context);

0 commit comments

Comments
 (0)