|
@ -137,7 +137,7 @@ void secp256k1_context_set_error_callback(secp256k1_context* ctx, void (*fun)(co |
|
|
ctx->error_callback.data = data; |
|
|
ctx->error_callback.data = data; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static int secp256k1_pubkey_load(const secp256k1_context* ctx, secp256k1_ge* ge, const secp256k1_pubkey* pubkey) { |
|
|
int secp256k1_pubkey_load(const secp256k1_context* ctx, secp256k1_ge* ge, const secp256k1_pubkey* pubkey) { |
|
|
if (sizeof(secp256k1_ge_storage) == 64) { |
|
|
if (sizeof(secp256k1_ge_storage) == 64) { |
|
|
/* When the secp256k1_ge_storage type is exactly 64 byte, use its
|
|
|
/* When the secp256k1_ge_storage type is exactly 64 byte, use its
|
|
|
* representation inside secp256k1_pubkey, as conversion is very fast. |
|
|
* representation inside secp256k1_pubkey, as conversion is very fast. |
|
@ -156,7 +156,7 @@ static int secp256k1_pubkey_load(const secp256k1_context* ctx, secp256k1_ge* ge, |
|
|
return 1; |
|
|
return 1; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static void secp256k1_pubkey_save(secp256k1_pubkey* pubkey, secp256k1_ge* ge) { |
|
|
void secp256k1_pubkey_save(secp256k1_pubkey* pubkey, secp256k1_ge* ge) { |
|
|
if (sizeof(secp256k1_ge_storage) == 64) { |
|
|
if (sizeof(secp256k1_ge_storage) == 64) { |
|
|
secp256k1_ge_storage s; |
|
|
secp256k1_ge_storage s; |
|
|
secp256k1_ge_to_storage(&s, ge); |
|
|
secp256k1_ge_to_storage(&s, ge); |
|
|