@@ -152,7 +152,7 @@ extern "C" {
152
152
153
153
// Contexts
154
154
#[ cfg_attr( not( feature = "external-symbols" ) , link_name = "rustsecp256k1_v0_1_1_context_preallocated_size" ) ]
155
- pub fn secp256k1_context_preallocated_size ( flags : c_uint ) -> usize ;
155
+ pub fn secp256k1_context_preallocated_size ( flags : c_uint ) -> size_t ;
156
156
157
157
#[ cfg_attr( not( feature = "external-symbols" ) , link_name = "rustsecp256k1_v0_1_1_context_preallocated_create" ) ]
158
158
pub fn secp256k1_context_preallocated_create ( prealloc : * mut c_void , flags : c_uint ) -> * mut Context ;
@@ -161,7 +161,7 @@ extern "C" {
161
161
pub fn secp256k1_context_preallocated_destroy ( cx : * mut Context ) ;
162
162
163
163
#[ cfg_attr( not( feature = "external-symbols" ) , link_name = "rustsecp256k1_v0_1_1_context_preallocated_clone_size" ) ]
164
- pub fn secp256k1_context_preallocated_clone_size ( cx : * const Context ) -> usize ;
164
+ pub fn secp256k1_context_preallocated_clone_size ( cx : * const Context ) -> size_t ;
165
165
166
166
#[ cfg_attr( not( feature = "external-symbols" ) , link_name = "rustsecp256k1_v0_1_1_context_preallocated_clone" ) ]
167
167
pub fn secp256k1_context_preallocated_clone ( cx : * const Context , prealloc : * mut c_void ) -> * mut Context ;
@@ -174,19 +174,19 @@ extern "C" {
174
174
// Pubkeys
175
175
#[ cfg_attr( not( feature = "external-symbols" ) , link_name = "rustsecp256k1_v0_1_1_ec_pubkey_parse" ) ]
176
176
pub fn secp256k1_ec_pubkey_parse ( cx : * const Context , pk : * mut PublicKey ,
177
- input : * const c_uchar , in_len : usize )
177
+ input : * const c_uchar , in_len : size_t )
178
178
-> c_int ;
179
179
180
180
#[ cfg_attr( not( feature = "external-symbols" ) , link_name = "rustsecp256k1_v0_1_1_ec_pubkey_serialize" ) ]
181
181
pub fn secp256k1_ec_pubkey_serialize ( cx : * const Context , output : * mut c_uchar ,
182
- out_len : * mut usize , pk : * const PublicKey ,
182
+ out_len : * mut size_t , pk : * const PublicKey ,
183
183
compressed : c_uint )
184
184
-> c_int ;
185
185
186
186
// Signatures
187
187
#[ cfg_attr( not( feature = "external-symbols" ) , link_name = "rustsecp256k1_v0_1_1_ecdsa_signature_parse_der" ) ]
188
188
pub fn secp256k1_ecdsa_signature_parse_der ( cx : * const Context , sig : * mut Signature ,
189
- input : * const c_uchar , in_len : usize )
189
+ input : * const c_uchar , in_len : size_t )
190
190
-> c_int ;
191
191
192
192
#[ cfg_attr( not( feature = "external-symbols" ) , link_name = "rustsecp256k1_v0_1_1_ecdsa_signature_parse_compact" ) ]
@@ -196,12 +196,12 @@ extern "C" {
196
196
197
197
#[ cfg_attr( not( feature = "external-symbols" ) , link_name = "rustsecp256k1_v0_1_1_ecdsa_signature_parse_der_lax" ) ]
198
198
pub fn ecdsa_signature_parse_der_lax ( cx : * const Context , sig : * mut Signature ,
199
- input : * const c_uchar , in_len : usize )
199
+ input : * const c_uchar , in_len : size_t )
200
200
-> c_int ;
201
201
202
202
#[ cfg_attr( not( feature = "external-symbols" ) , link_name = "rustsecp256k1_v0_1_1_ecdsa_signature_serialize_der" ) ]
203
203
pub fn secp256k1_ecdsa_signature_serialize_der ( cx : * const Context , output : * mut c_uchar ,
204
- out_len : * mut usize , sig : * const Signature )
204
+ out_len : * mut size_t , sig : * const Signature )
205
205
-> c_int ;
206
206
207
207
#[ cfg_attr( not( feature = "external-symbols" ) , link_name = "rustsecp256k1_v0_1_1_ecdsa_signature_serialize_compact" ) ]
@@ -462,12 +462,12 @@ mod fuzz_dummy {
462
462
}
463
463
464
464
/// Return dummy size of context struct.
465
- pub unsafe fn secp256k1_context_preallocated_size ( _flags : c_uint ) -> usize {
465
+ pub unsafe fn secp256k1_context_preallocated_size ( _flags : c_uint ) -> size_t {
466
466
mem:: size_of :: < Context > ( )
467
467
}
468
468
469
469
/// Return dummy size of context struct.
470
- pub unsafe fn secp256k1_context_preallocated_clone_size ( _cx : * mut Context ) -> usize {
470
+ pub unsafe fn secp256k1_context_preallocated_clone_size ( _cx : * mut Context ) -> size_t {
471
471
mem:: size_of :: < Context > ( )
472
472
}
473
473
@@ -494,7 +494,7 @@ mod fuzz_dummy {
494
494
// Pubkeys
495
495
/// Parse 33/65 byte pubkey into PublicKey, losing compressed information
496
496
pub unsafe fn secp256k1_ec_pubkey_parse ( cx : * const Context , pk : * mut PublicKey ,
497
- input : * const c_uchar , in_len : usize )
497
+ input : * const c_uchar , in_len : size_t )
498
498
-> c_int {
499
499
assert ! ( !cx. is_null( ) && ( * cx) . 0 as u32 & !( SECP256K1_START_NONE | SECP256K1_START_VERIFY | SECP256K1_START_SIGN ) == 0 ) ;
500
500
match in_len {
@@ -521,7 +521,7 @@ mod fuzz_dummy {
521
521
522
522
/// Serialize PublicKey back to 33/65 byte pubkey
523
523
pub unsafe fn secp256k1_ec_pubkey_serialize ( cx : * const Context , output : * mut c_uchar ,
524
- out_len : * mut usize , pk : * const PublicKey ,
524
+ out_len : * mut size_t , pk : * const PublicKey ,
525
525
compressed : c_uint )
526
526
-> c_int {
527
527
assert ! ( !cx. is_null( ) && ( * cx) . 0 as u32 & !( SECP256K1_START_NONE | SECP256K1_START_VERIFY | SECP256K1_START_SIGN ) == 0 ) ;
@@ -546,7 +546,7 @@ mod fuzz_dummy {
546
546
547
547
// Signatures
548
548
pub unsafe fn secp256k1_ecdsa_signature_parse_der ( _cx : * const Context , _sig : * mut Signature ,
549
- _input : * const c_uchar , _in_len : usize )
549
+ _input : * const c_uchar , _in_len : size_t )
550
550
-> c_int {
551
551
unimplemented ! ( ) ;
552
552
}
@@ -562,14 +562,14 @@ mod fuzz_dummy {
562
562
}
563
563
564
564
pub unsafe fn ecdsa_signature_parse_der_lax ( _cx : * const Context , _sig : * mut Signature ,
565
- _input : * const c_uchar , _in_len : usize )
565
+ _input : * const c_uchar , _in_len : size_t )
566
566
-> c_int {
567
567
unimplemented ! ( ) ;
568
568
}
569
569
570
570
/// Copies up to 72 bytes into output from sig
571
571
pub unsafe fn secp256k1_ecdsa_signature_serialize_der ( cx : * const Context , output : * mut c_uchar ,
572
- out_len : * mut usize , sig : * const Signature )
572
+ out_len : * mut size_t , sig : * const Signature )
573
573
-> c_int {
574
574
assert ! ( !cx. is_null( ) && ( * cx) . 0 as u32 & !( SECP256K1_START_NONE | SECP256K1_START_VERIFY | SECP256K1_START_SIGN ) == 0 ) ;
575
575
0 commit comments