@@ -233,7 +233,7 @@ unsafe impl<'buf> Context for AllPreallocated<'buf> {
233
233
234
234
impl < ' buf , C : Context + ' buf > Secp256k1 < C > {
235
235
/// 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 > {
237
237
#[ cfg( target_arch = "wasm32" ) ]
238
238
ffi:: types:: sanity_checks_for_wasm ( ) ;
239
239
@@ -254,7 +254,7 @@ impl<'buf, C: Context + 'buf> Secp256k1<C> {
254
254
255
255
impl < ' buf > Secp256k1 < AllPreallocated < ' buf > > {
256
256
/// 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 > {
258
258
Secp256k1 :: preallocated_gen_new ( buf)
259
259
}
260
260
/// 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>> {
284
284
285
285
impl < ' buf > Secp256k1 < SignOnlyPreallocated < ' buf > > {
286
286
/// 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 > {
288
288
Secp256k1 :: preallocated_gen_new ( buf)
289
289
}
290
290
@@ -316,7 +316,7 @@ impl<'buf> Secp256k1<SignOnlyPreallocated<'buf>> {
316
316
317
317
impl < ' buf > Secp256k1 < VerifyOnlyPreallocated < ' buf > > {
318
318
/// 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 > {
320
320
Secp256k1 :: preallocated_gen_new ( buf)
321
321
}
322
322
0 commit comments