Skip to content

Commit ab59498

Browse files
authored
Merge pull request #199 from elichai/2020-02-external-symbols
Fix typos in the external-symbols feature(bug)
2 parents 12c248d + 2f897d8 commit ab59498

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

secp256k1-sys/build.rs

-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ fn main() {
6363
} else {
6464
base_config.define("ECMULT_WINDOW_SIZE", Some("15")); // This is the default in the configure file (`auto`)
6565
}
66-
#[cfg(not(feature = "dont_replace_c_symbols"))]
6766
base_config.define("USE_EXTERNAL_DEFAULT_CALLBACKS", Some("1"));
6867
#[cfg(feature = "endomorphism")]
6968
base_config.define("USE_ENDOMORPHISM", Some("1"));

secp256k1-sys/src/lib.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ extern "C" {
295295
// Returns: a newly created context object.
296296
// In: flags: which parts of the context to initialize.
297297
#[no_mangle]
298-
#[cfg(all(feature = "std", not(feature = "external_symbols")))]
298+
#[cfg(all(feature = "std", not(feature = "external-symbols")))]
299299
pub unsafe extern "C" fn rustsecp256k1_v0_1_1_context_create(flags: c_uint) -> *mut Context {
300300
use std::mem;
301301
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) -> *
312312
secp256k1_context_preallocated_create(ptr as *mut c_void, flags)
313313
}
314314

315-
#[cfg(all(feature = "std", not(feature = "external_symbols")))]
315+
#[cfg(all(feature = "std", not(feature = "external-symbols")))]
316316
pub unsafe fn secp256k1_context_create(flags: c_uint) -> *mut Context {
317317
rustsecp256k1_v0_1_1_context_create(flags)
318318
}
@@ -324,7 +324,7 @@ pub unsafe fn secp256k1_context_create(flags: c_uint) -> *mut Context {
324324
/// The pointer shouldn't be used after passing to this function, consider it as passing it to `free()`.
325325
///
326326
#[no_mangle]
327-
#[cfg(all(feature = "std", not(feature = "external_symbols")))]
327+
#[cfg(all(feature = "std", not(feature = "external-symbols")))]
328328
pub unsafe extern "C" fn rustsecp256k1_v0_1_1_context_destroy(ctx: *mut Context) {
329329
secp256k1_context_preallocated_destroy(ctx);
330330
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)
335335
let _ = Box::from_raw(slice as *mut [usize]);
336336
}
337337

338-
#[cfg(all(feature = "std", not(feature = "external_symbols")))]
338+
#[cfg(all(feature = "std", not(feature = "external-symbols")))]
339339
pub unsafe fn secp256k1_context_destroy(ctx: *mut Context) {
340340
rustsecp256k1_v0_1_1_context_destroy(ctx)
341341
}
@@ -360,7 +360,7 @@ pub unsafe fn secp256k1_context_destroy(ctx: *mut Context) {
360360
/// See also secp256k1_default_error_callback_fn.
361361
///
362362
#[no_mangle]
363-
#[cfg(not(feature = "external_symbols"))]
363+
#[cfg(not(feature = "external-symbols"))]
364364
pub unsafe extern "C" fn rustsecp256k1_v0_1_1_default_illegal_callback_fn(message: *const c_char, _data: *mut c_void) {
365365
use core::str;
366366
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
383383
/// See also secp256k1_default_illegal_callback_fn.
384384
///
385385
#[no_mangle]
386-
#[cfg(not(feature = "external_symbols"))]
386+
#[cfg(not(feature = "external-symbols"))]
387387
pub unsafe extern "C" fn rustsecp256k1_v0_1_1_default_error_callback_fn(message: *const c_char, _data: *mut c_void) {
388388
use core::str;
389389
let msg_slice = slice::from_raw_parts(message as *const u8, strlen(message));

src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,6 @@ mod tests {
734734

735735

736736
#[test]
737-
#[cfg(not(feature = "dont_replace_c_symbols"))]
738737
fn test_manual_create_destroy() {
739738
let ctx_full = unsafe { ffi::secp256k1_context_create(AllPreallocated::FLAGS) };
740739
let ctx_sign = unsafe { ffi::secp256k1_context_create(SignOnlyPreallocated::FLAGS) };

0 commit comments

Comments
 (0)