55extern "C" {
66# endif
77
8+ #include <stddef.h>
9+
810/* These rules specify the order of arguments in API calls:
911 *
1012 * 1. Context pointers go first, followed by output arguments, combined
@@ -228,7 +230,7 @@ SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_parse(
228230 const secp256k1_context_t * ctx ,
229231 secp256k1_pubkey_t * pubkey ,
230232 const unsigned char * input ,
231- int inputlen
233+ size_t inputlen
232234) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 );
233235
234236/** Serialize a pubkey object into a serialized byte sequence.
@@ -246,7 +248,7 @@ SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_parse(
246248int secp256k1_ec_pubkey_serialize (
247249 const secp256k1_context_t * ctx ,
248250 unsigned char * output ,
249- int * outputlen ,
251+ size_t * outputlen ,
250252 const secp256k1_pubkey_t * pubkey ,
251253 int compressed
252254) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 ) SECP256K1_ARG_NONNULL (4 );
@@ -265,7 +267,7 @@ int secp256k1_ecdsa_signature_parse_der(
265267 const secp256k1_context_t * ctx ,
266268 secp256k1_ecdsa_signature_t * sig ,
267269 const unsigned char * input ,
268- int inputlen
270+ size_t inputlen
269271) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 );
270272
271273/** Serialize an ECDSA signature in DER format.
@@ -282,7 +284,7 @@ int secp256k1_ecdsa_signature_parse_der(
282284int secp256k1_ecdsa_signature_serialize_der (
283285 const secp256k1_context_t * ctx ,
284286 unsigned char * output ,
285- int * outputlen ,
287+ size_t * outputlen ,
286288 const secp256k1_ecdsa_signature_t * sig
287289) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 ) SECP256K1_ARG_NONNULL (4 );
288290
@@ -406,7 +408,7 @@ SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_create(
406408SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_export (
407409 const secp256k1_context_t * ctx ,
408410 unsigned char * privkey ,
409- int * privkeylen ,
411+ size_t * privkeylen ,
410412 const unsigned char * seckey ,
411413 int compressed
412414) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 ) SECP256K1_ARG_NONNULL (4 );
@@ -429,7 +431,7 @@ SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_import(
429431 const secp256k1_context_t * ctx ,
430432 unsigned char * seckey ,
431433 const unsigned char * privkey ,
432- int privkeylen
434+ size_t privkeylen
433435) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 );
434436
435437/** Tweak a private key by adding tweak to it.
0 commit comments