Revert "Remove unused scratch space from API"

This reverts commit 712e7f8722.
This commit is contained in:
Jonas Nick
2023-05-12 15:05:57 +00:00
parent 7d4f86d242
commit 3ad1027a40
3 changed files with 38 additions and 4 deletions

View File

@@ -21,8 +21,6 @@ typedef struct secp256k1_scratch_space_struct {
size_t max_size;
} secp256k1_scratch;
typedef struct secp256k1_scratch_space_struct secp256k1_scratch_space;
static secp256k1_scratch* secp256k1_scratch_create(const secp256k1_callback* error_callback, size_t max_size);
static void secp256k1_scratch_destroy(const secp256k1_callback* error_callback, secp256k1_scratch* scratch);

View File

@@ -219,12 +219,12 @@ void secp256k1_context_set_error_callback(secp256k1_context* ctx, void (*fun)(co
ctx->error_callback.data = data;
}
static secp256k1_scratch_space* secp256k1_scratch_space_create(const secp256k1_context* ctx, size_t max_size) {
secp256k1_scratch_space* secp256k1_scratch_space_create(const secp256k1_context* ctx, size_t max_size) {
VERIFY_CHECK(ctx != NULL);
return secp256k1_scratch_create(&ctx->error_callback, max_size);
}
static void secp256k1_scratch_space_destroy(const secp256k1_context *ctx, secp256k1_scratch_space* scratch) {
void secp256k1_scratch_space_destroy(const secp256k1_context *ctx, secp256k1_scratch_space* scratch) {
VERIFY_CHECK(ctx != NULL);
secp256k1_scratch_destroy(&ctx->error_callback, scratch);
}