Skip to content

Commit

Permalink
Improve docs on rustsecp256k1_v0_4_1_context_create
Browse files Browse the repository at this point in the history
In preparation for [someone] adding a `# Safety` section to this
function, clean up the docs.
  • Loading branch information
tcharding committed Apr 27, 2022
1 parent ad153d8 commit dc1e377
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions secp256k1-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -535,12 +535,14 @@ extern "C" {

/// A reimplementation of the C function `secp256k1_context_create` in rust.
///
/// This function allocates memory, the pointer should be deallocated using `secp256k1_context_destroy`
/// A failure to do so will result in a memory leak.
/// This function allocates memory, the pointer should be deallocated using
/// `secp256k1_context_destroy`. Failure to do so will result in a memory leak.
///
/// This will create a secp256k1 raw context.
// Returns: a newly created context object.
// In: flags: which parts of the context to initialize.
/// Input `flags` control which parts of the context to initialize.
///
/// # Returns
///
/// The newly created secp256k1 raw context.
#[no_mangle]
#[cfg(all(feature = "std", not(rust_secp_no_symbol_renaming)))]
#[cfg_attr(docsrs, doc(cfg(all(feature = "std", not(rust_secp_no_symbol_renaming)))))]
Expand Down

0 comments on commit dc1e377

Please sign in to comment.