Closed sergey-shandar closed 1 year ago
@xoloki I think, we can export static
and inline
functions by defining new functions, for example, instead of replacing
// secp256k1.h
SECP256K1_INLINE static void secp256k1_fe_add(secp256k1_fe *r, const secp256k1_fe *a) {
to
// secp256k1.h
static void secp256k1_fe_add(secp256k1_fe *r, const secp256k1_fe *a) {
we can create a new external (non static) function
// secp256k1_extension.h
#include <secp256k1.h>
SECP256K1 void prefix_secp256k1_fe_add(secp256k1_fe *r, const secp256k1_fe *a);
// secp256k1_extension.c
#include <secp256k1_extension.h>
SECP256K1 void prefix_secp256k1_fe_add(secp256k1_fe *r, const secp256k1_fe *a) {
secp256k1_fe_add(r, a);
}
That should work, and it would be much cleaner.
That should work, and it would be much cleaner.
secp256k1_ge_set_gej