HomePhabricator

[secp256k1] Allow to use external default callbacks

Description

[secp256k1] Allow to use external default callbacks

Summary:

  • Replace CHECKs for no_precomp ctx by ARG_CHECKs without a return
  • Allow usage of external default callbacks
  • Include stdio.h and stdlib.h explicitly in secp256k1.c
  • Add secp256k1_ prefix to default callback functions
  • Add missing #(un)defines to base-config.h
  • cmake build

This is a backport of libsecp256k1 PR595

Test Plan:
Ran unit tests, it doesn't break anythign at least.

cmake -GNinja .. -DSECP256K1_ENABLE_EXTERNAL_DEFAULT_CALLBACKS=ON
ninja check-secp256k1

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D5308

Details

Provenance
Tim Ruffing <crypto@timruffing.de>Authored on Mar 4 2019, 12:09
deadalnixCommitted on Feb 23 2020, 23:45
FabienPushed on Feb 24 2020, 10:25
Reviewer
Restricted Project
Differential Revision
D5308: [secp256k1] Allow to use external default callbacks
Parents
rSTAGINGb27bc243bc48: [secp256k1] Remove a warning in multiset test
Branches
Unknown
Tags
Unknown
References
tag: phabricator/base/16472