Fix bad ffi declarations

This commit is contained in:
Elichai Turkel 2019-09-14 21:05:26 +03:00
parent f5c8a005f9
commit 5b10d1b226
No known key found for this signature in database
GPG Key ID: 9383CDE9E8E66A7F
2 changed files with 6 additions and 5 deletions

View File

@ -41,8 +41,9 @@ pub type NonceFn = unsafe extern "C" fn(nonce32: *mut c_uchar,
msg32: *const c_uchar,
key32: *const c_uchar,
algo16: *const c_uchar,
data: *mut c_void,
attempt: c_uint,
data: *const c_void);
);
/// Hash function to use to post-process an ECDH point to get
/// a shared secret.
@ -50,7 +51,7 @@ pub type EcdhHashFn = unsafe extern "C" fn(
output: *mut c_uchar,
x: *const c_uchar,
y: *const c_uchar,
data: *const c_void,
data: *mut c_void,
);
/// A Secp256k1 context, containing various precomputed values and such
@ -186,7 +187,7 @@ extern "C" {
out_len: *mut usize, sig: *const Signature)
-> c_int;
pub fn secp256k1_ecdsa_signature_serialize_compact(cx: *const Context, output64: *const c_uchar,
pub fn secp256k1_ecdsa_signature_serialize_compact(cx: *const Context, output64: *mut c_uchar,
sig: *const Signature)
-> c_int;

View File

@ -45,7 +45,7 @@ extern "C" {
input64: *const c_uchar, recid: c_int)
-> c_int;
pub fn secp256k1_ecdsa_recoverable_signature_serialize_compact(cx: *const Context, output64: *const c_uchar,
pub fn secp256k1_ecdsa_recoverable_signature_serialize_compact(cx: *const Context, output64: *mut c_uchar,
recid: *mut c_int, sig: *const RecoverableSignature)
-> c_int;
@ -82,7 +82,7 @@ mod fuzz_dummy {
unimplemented!();
}
pub unsafe fn secp256k1_ecdsa_recoverable_signature_serialize_compact(_cx: *const Context, _output64: *const c_uchar,
pub unsafe fn secp256k1_ecdsa_recoverable_signature_serialize_compact(_cx: *const Context, _output64: *mut c_uchar,
_recid: *mut c_int, _sig: *const RecoverableSignature)
-> c_int {
unimplemented!();