@@ -233,7 +233,7 @@ unsafe impl<'buf> Context for AllPreallocated<'buf> {
233233
234234impl < ' buf , C : Context + ' buf > Secp256k1 < C > {
235235 /// Lets you create a context with preallocated buffer in a generic manner(sign/verify/all)
236- pub fn preallocated_gen_new ( buf : & ' buf mut [ u8 ] ) -> Result < Secp256k1 < C > , Error > {
236+ pub fn preallocated_gen_new ( buf : & ' buf mut [ AlignedType ] ) -> Result < Secp256k1 < C > , Error > {
237237 #[ cfg( target_arch = "wasm32" ) ]
238238 ffi:: types:: sanity_checks_for_wasm ( ) ;
239239
@@ -254,7 +254,7 @@ impl<'buf, C: Context + 'buf> Secp256k1<C> {
254254
255255impl < ' buf > Secp256k1 < AllPreallocated < ' buf > > {
256256 /// Creates a new Secp256k1 context with all capabilities
257- pub fn preallocated_new ( buf : & ' buf mut [ u8 ] ) -> Result < Secp256k1 < AllPreallocated < ' buf > > , Error > {
257+ pub fn preallocated_new ( buf : & ' buf mut [ AlignedType ] ) -> Result < Secp256k1 < AllPreallocated < ' buf > > , Error > {
258258 Secp256k1 :: preallocated_gen_new ( buf)
259259 }
260260 /// Uses the ffi `secp256k1_context_preallocated_size` to check the memory size needed for a context
@@ -284,7 +284,7 @@ impl<'buf> Secp256k1<AllPreallocated<'buf>> {
284284
285285impl < ' buf > Secp256k1 < SignOnlyPreallocated < ' buf > > {
286286 /// Creates a new Secp256k1 context that can only be used for signing
287- pub fn preallocated_signing_only ( buf : & ' buf mut [ u8 ] ) -> Result < Secp256k1 < SignOnlyPreallocated < ' buf > > , Error > {
287+ pub fn preallocated_signing_only ( buf : & ' buf mut [ AlignedType ] ) -> Result < Secp256k1 < SignOnlyPreallocated < ' buf > > , Error > {
288288 Secp256k1 :: preallocated_gen_new ( buf)
289289 }
290290
@@ -316,7 +316,7 @@ impl<'buf> Secp256k1<SignOnlyPreallocated<'buf>> {
316316
317317impl < ' buf > Secp256k1 < VerifyOnlyPreallocated < ' buf > > {
318318 /// Creates a new Secp256k1 context that can only be used for verification
319- pub fn preallocated_verification_only ( buf : & ' buf mut [ u8 ] ) -> Result < Secp256k1 < VerifyOnlyPreallocated < ' buf > > , Error > {
319+ pub fn preallocated_verification_only ( buf : & ' buf mut [ AlignedType ] ) -> Result < Secp256k1 < VerifyOnlyPreallocated < ' buf > > , Error > {
320320 Secp256k1 :: preallocated_gen_new ( buf)
321321 }
322322
0 commit comments