From 8410a91786628e018e106f3f62abf9c5e587a332 Mon Sep 17 00:00:00 2001 From: Nazar Mokrynskyi Date: Fri, 23 Aug 2024 23:17:09 +0300 Subject: [PATCH] Add `#[repr(C)]` on a few remaining `blst` types --- blst/src/types/fr.rs | 1 + blst/src/types/g2.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/blst/src/types/fr.rs b/blst/src/types/fr.rs index ab2d63a12..26a938107 100644 --- a/blst/src/types/fr.rs +++ b/blst/src/types/fr.rs @@ -14,6 +14,7 @@ use kzg::eip_4844::BYTES_PER_FIELD_ELEMENT; use kzg::Fr; use kzg::Scalar256; +#[repr(C)] #[derive(Debug, Clone, Copy, Eq, PartialEq, Default)] pub struct FsFr(pub blst_fr); diff --git a/blst/src/types/g2.rs b/blst/src/types/g2.rs index 5a3fa3455..9c6628d68 100644 --- a/blst/src/types/g2.rs +++ b/blst/src/types/g2.rs @@ -17,6 +17,7 @@ use kzg::{G2Mul, G2}; use crate::consts::{G2_GENERATOR, G2_NEGATIVE_GENERATOR}; use crate::types::fr::FsFr; +#[repr(C)] #[derive(Debug, Default, Clone, Copy, Eq, PartialEq)] pub struct FsG2(pub blst_p2);