From 5f93474512e2b7a190a3bc71a33536f4dc384463 Mon Sep 17 00:00:00 2001 From: Elichai Turkel Date: Tue, 28 May 2019 20:48:26 +0300 Subject: [PATCH] Added the preallocated FFI --- src/ffi.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ffi.rs b/src/ffi.rs index dbcfbc4..4a750f1 100644 --- a/src/ffi.rs +++ b/src/ffi.rs @@ -144,6 +144,16 @@ extern "C" { // Contexts pub fn secp256k1_context_create(flags: c_uint) -> *mut Context; + pub fn secp256k1_context_preallocated_size(flags: c_uint) -> usize; + + pub fn secp256k1_context_preallocated_create(prealloc: *mut c_void, flags: c_uint) -> *mut Context; + + pub fn secp256k1_context_preallocated_destroy(cx: *mut Context); + + pub fn secp256k1_context_preallocated_clone_size(cx: *const Context) -> usize; + + pub fn secp256k1_context_preallocated_clone(cx: *const Context, prealloc: *mut c_void) -> *mut Context; + pub fn secp256k1_context_clone(cx: *mut Context) -> *mut Context; pub fn secp256k1_context_destroy(cx: *mut Context);