Skip to content

Commit 3e4b1e7

Browse files
committed
Added the preallocated FFI
1 parent 9f7236c commit 3e4b1e7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/ffi.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,16 @@ extern "C" {
137137
// Contexts
138138
pub fn secp256k1_context_create(flags: c_uint) -> *mut Context;
139139

140+
pub fn secp256k1_context_preallocated_size(flags: c_uint) -> usize;
141+
142+
pub fn secp256k1_context_preallocated_create(prealloc: *mut c_void, flags: c_uint) -> *mut Context;
143+
140144
pub fn secp256k1_context_clone(cx: *mut Context) -> *mut Context;
141145

142146
pub fn secp256k1_context_destroy(cx: *mut Context);
143147

148+
pub fn secp256k1_context_preallocated_destroy(cx: *mut Context);
149+
144150
pub fn secp256k1_context_randomize(cx: *mut Context,
145151
seed32: *const c_uchar)
146152
-> c_int;

0 commit comments

Comments
 (0)