@@ -785,7 +785,7 @@ int secp256k1_xonly_pubkey_serialize(const secp256k1_context* ctx, unsigned char
785785 ARG_CHECK (pubkey != NULL );
786786 ARG_CHECK (output32 != NULL );
787787
788- if (!secp256k1_ec_pubkey_serialize (ctx , buf , & outputlen , (secp256k1_pubkey * ) pubkey , SECP256K1_EC_COMPRESSED )) {
788+ if (!secp256k1_ec_pubkey_serialize (ctx , buf , & outputlen , (const secp256k1_pubkey * ) pubkey , SECP256K1_EC_COMPRESSED )) {
789789 return 0 ;
790790 }
791791 memcpy (output32 , & buf [1 ], 32 );
@@ -797,7 +797,7 @@ int secp256k1_xonly_pubkey_from_pubkey(const secp256k1_context* ctx, secp256k1_x
797797 ARG_CHECK (xonly_pubkey != NULL );
798798 ARG_CHECK (pubkey != NULL );
799799
800- * xonly_pubkey = * (secp256k1_xonly_pubkey * ) pubkey ;
800+ * xonly_pubkey = * (const secp256k1_xonly_pubkey * ) pubkey ;
801801
802802 secp256k1_ec_pubkey_absolute (ctx , (secp256k1_pubkey * ) xonly_pubkey , sign );
803803 return 1 ;
@@ -808,7 +808,7 @@ int secp256k1_xonly_pubkey_to_pubkey(const secp256k1_context* ctx, secp256k1_pub
808808 ARG_CHECK (pubkey != NULL );
809809 ARG_CHECK (xonly_pubkey != NULL );
810810
811- * pubkey = * (secp256k1_pubkey * ) xonly_pubkey ;
811+ * pubkey = * (const secp256k1_pubkey * ) xonly_pubkey ;
812812 if (sign ) {
813813 return secp256k1_ec_pubkey_negate (ctx , pubkey );
814814 }
@@ -842,7 +842,7 @@ int secp256k1_xonly_pubkey_tweak_add(const secp256k1_context* ctx, secp256k1_pub
842842 ARG_CHECK (output_pubkey != NULL );
843843 ARG_CHECK (tweak32 != NULL );
844844
845- * output_pubkey = * (secp256k1_pubkey * )internal_pubkey ;
845+ * output_pubkey = * (const secp256k1_pubkey * )internal_pubkey ;
846846 return secp256k1_ec_pubkey_tweak_add (ctx , output_pubkey , tweak32 );
847847}
848848
0 commit comments