Improve docs on rustsecp256k1_v0_4_1_context_create

In preparation for [someone] adding a `# Safety` section to this
function, clean up the docs.
This commit is contained in:
Tobin C. Harding 2022-04-27 10:22:08 +10:00
parent ad153d82f7
commit dc1e377d4e
1 changed files with 7 additions and 5 deletions

View File

@ -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)))))]