Skip to content

Commit

Permalink
secp256k1-sys: update patchfiles for upcoming update to libsecp
Browse files Browse the repository at this point in the history
  • Loading branch information
apoelstra committed Aug 16, 2023
1 parent 36339f2 commit 1639f25
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 21 deletions.
21 changes: 14 additions & 7 deletions secp256k1-sys/depend/secp256k1.c.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
139,149d138
140,150d139
< secp256k1_context* secp256k1_context_create(unsigned int flags) {
< size_t const prealloc_size = secp256k1_context_preallocated_size(flags);
< secp256k1_context* ctx = (secp256k1_context*)checked_malloc(&default_error_callback, prealloc_size);
Expand All @@ -10,27 +10,34 @@
< return ctx;
< }
<
164,174d152
162,174d150
< secp256k1_context* secp256k1_context_clone(const secp256k1_context* ctx) {
< secp256k1_context* ret;
< size_t prealloc_size;
<
< VERIFY_CHECK(ctx != NULL);
< ARG_CHECK(secp256k1_context_is_proper(ctx));
<
< prealloc_size = secp256k1_context_preallocated_clone_size(ctx);
< ret = (secp256k1_context*)checked_malloc(&ctx->error_callback, prealloc_size);
< ret = secp256k1_context_preallocated_clone(ctx, ret);
< return ret;
< }
<
183,189d160
186,197d161
< void secp256k1_context_destroy(secp256k1_context* ctx) {
< if (ctx != NULL) {
< secp256k1_context_preallocated_destroy(ctx);
< free(ctx);
< ARG_CHECK_VOID(ctx == NULL || secp256k1_context_is_proper(ctx));
<
< /* Defined as noop */
< if (ctx == NULL) {
< return;
< }
<
< secp256k1_context_preallocated_destroy(ctx);
< free(ctx);
< }
<
206,215d176
220,229d183
< }
<
< secp256k1_scratch_space* secp256k1_scratch_space_create(const secp256k1_context* ctx, size_t max_size) {
Expand Down
26 changes: 13 additions & 13 deletions secp256k1-sys/depend/secp256k1.h.patch
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
226,228d225
< SECP256K1_API secp256k1_context* secp256k1_context_create(
279,281d278
< SECP256K1_API secp256k1_context *secp256k1_context_create(
< unsigned int flags
< ) SECP256K1_WARN_UNUSED_RESULT;
231,233d227
< SECP256K1_API secp256k1_context* secp256k1_context_clone(
< const secp256k1_context* ctx
295,297d291
< SECP256K1_API secp256k1_context *secp256k1_context_clone(
< const secp256k1_context *ctx
< ) SECP256K1_ARG_NONNULL(1) SECP256K1_WARN_UNUSED_RESULT;
248,250d241
313,315d306
< SECP256K1_API void secp256k1_context_destroy(
< secp256k1_context* ctx
< secp256k1_context *ctx
< ) SECP256K1_ARG_NONNULL(1);
327,330d317
< SECP256K1_API SECP256K1_WARN_UNUSED_RESULT secp256k1_scratch_space* secp256k1_scratch_space_create(
< const secp256k1_context* ctx,
395,398d385
< SECP256K1_API SECP256K1_WARN_UNUSED_RESULT secp256k1_scratch_space *secp256k1_scratch_space_create(
< const secp256k1_context *ctx,
< size_t size
< ) SECP256K1_ARG_NONNULL(1);
338,341d324
406,409d392
< SECP256K1_API void secp256k1_scratch_space_destroy(
< const secp256k1_context* ctx,
< secp256k1_scratch_space* scratch
< const secp256k1_context *ctx,
< secp256k1_scratch_space *scratch
< ) SECP256K1_ARG_NONNULL(1);
2 changes: 1 addition & 1 deletion secp256k1-sys/depend/util.h.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
71,86d70
134,149d133
< static SECP256K1_INLINE void *checked_malloc(const secp256k1_callback* cb, size_t size) {
< void *ret = malloc(size);
< if (ret == NULL) {
Expand Down

0 comments on commit 1639f25

Please sign in to comment.