Fix wrong feature name external-symbols
This commit is contained in:
parent
8c517e0afa
commit
889e9a8740
|
@ -295,7 +295,7 @@ extern "C" {
|
||||||
// Returns: a newly created context object.
|
// Returns: a newly created context object.
|
||||||
// In: flags: which parts of the context to initialize.
|
// In: flags: which parts of the context to initialize.
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
#[cfg(all(feature = "std", not(feature = "external_symbols")))]
|
#[cfg(all(feature = "std", not(feature = "external-symbols")))]
|
||||||
pub unsafe extern "C" fn rustsecp256k1_v0_1_1_context_create(flags: c_uint) -> *mut Context {
|
pub unsafe extern "C" fn rustsecp256k1_v0_1_1_context_create(flags: c_uint) -> *mut Context {
|
||||||
use std::mem;
|
use std::mem;
|
||||||
assert!(mem::align_of::<usize>() >= mem::align_of::<u8>());
|
assert!(mem::align_of::<usize>() >= mem::align_of::<u8>());
|
||||||
|
@ -312,7 +312,7 @@ pub unsafe extern "C" fn rustsecp256k1_v0_1_1_context_create(flags: c_uint) -> *
|
||||||
secp256k1_context_preallocated_create(ptr as *mut c_void, flags)
|
secp256k1_context_preallocated_create(ptr as *mut c_void, flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(all(feature = "std", not(feature = "external_symbols")))]
|
#[cfg(all(feature = "std", not(feature = "external-symbols")))]
|
||||||
pub unsafe fn secp256k1_context_create(flags: c_uint) -> *mut Context {
|
pub unsafe fn secp256k1_context_create(flags: c_uint) -> *mut Context {
|
||||||
rustsecp256k1_v0_1_1_context_create(flags)
|
rustsecp256k1_v0_1_1_context_create(flags)
|
||||||
}
|
}
|
||||||
|
@ -324,7 +324,7 @@ pub unsafe fn secp256k1_context_create(flags: c_uint) -> *mut Context {
|
||||||
/// The pointer shouldn't be used after passing to this function, consider it as passing it to `free()`.
|
/// The pointer shouldn't be used after passing to this function, consider it as passing it to `free()`.
|
||||||
///
|
///
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
#[cfg(all(feature = "std", not(feature = "external_symbols")))]
|
#[cfg(all(feature = "std", not(feature = "external-symbols")))]
|
||||||
pub unsafe extern "C" fn rustsecp256k1_v0_1_1_context_destroy(ctx: *mut Context) {
|
pub unsafe extern "C" fn rustsecp256k1_v0_1_1_context_destroy(ctx: *mut Context) {
|
||||||
secp256k1_context_preallocated_destroy(ctx);
|
secp256k1_context_preallocated_destroy(ctx);
|
||||||
let ctx: *mut usize = ctx as *mut usize;
|
let ctx: *mut usize = ctx as *mut usize;
|
||||||
|
@ -335,7 +335,7 @@ pub unsafe extern "C" fn rustsecp256k1_v0_1_1_context_destroy(ctx: *mut Context)
|
||||||
let _ = Box::from_raw(slice as *mut [usize]);
|
let _ = Box::from_raw(slice as *mut [usize]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(all(feature = "std", not(feature = "external_symbols")))]
|
#[cfg(all(feature = "std", not(feature = "external-symbols")))]
|
||||||
pub unsafe fn secp256k1_context_destroy(ctx: *mut Context) {
|
pub unsafe fn secp256k1_context_destroy(ctx: *mut Context) {
|
||||||
rustsecp256k1_v0_1_1_context_destroy(ctx)
|
rustsecp256k1_v0_1_1_context_destroy(ctx)
|
||||||
}
|
}
|
||||||
|
@ -360,7 +360,7 @@ pub unsafe fn secp256k1_context_destroy(ctx: *mut Context) {
|
||||||
/// See also secp256k1_default_error_callback_fn.
|
/// See also secp256k1_default_error_callback_fn.
|
||||||
///
|
///
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
#[cfg(not(feature = "external_symbols"))]
|
#[cfg(not(feature = "external-symbols"))]
|
||||||
pub unsafe extern "C" fn rustsecp256k1_v0_1_1_default_illegal_callback_fn(message: *const c_char, _data: *mut c_void) {
|
pub unsafe extern "C" fn rustsecp256k1_v0_1_1_default_illegal_callback_fn(message: *const c_char, _data: *mut c_void) {
|
||||||
use core::str;
|
use core::str;
|
||||||
let msg_slice = slice::from_raw_parts(message as *const u8, strlen(message));
|
let msg_slice = slice::from_raw_parts(message as *const u8, strlen(message));
|
||||||
|
@ -383,7 +383,7 @@ pub unsafe extern "C" fn rustsecp256k1_v0_1_1_default_illegal_callback_fn(messag
|
||||||
/// See also secp256k1_default_illegal_callback_fn.
|
/// See also secp256k1_default_illegal_callback_fn.
|
||||||
///
|
///
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
#[cfg(not(feature = "external_symbols"))]
|
#[cfg(not(feature = "external-symbols"))]
|
||||||
pub unsafe extern "C" fn rustsecp256k1_v0_1_1_default_error_callback_fn(message: *const c_char, _data: *mut c_void) {
|
pub unsafe extern "C" fn rustsecp256k1_v0_1_1_default_error_callback_fn(message: *const c_char, _data: *mut c_void) {
|
||||||
use core::str;
|
use core::str;
|
||||||
let msg_slice = slice::from_raw_parts(message as *const u8, strlen(message));
|
let msg_slice = slice::from_raw_parts(message as *const u8, strlen(message));
|
||||||
|
|
Loading…
Reference in New Issue