Skip to content

Commit

Permalink
lang: #[repr(C)] for zero_copy accounts (#1106)
Browse files Browse the repository at this point in the history
  • Loading branch information
y2kappa committed Dec 23, 2021
1 parent 9005dd7 commit fa3d190
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -13,6 +13,7 @@ incremented for features.


### Fixes

* ts: Change commitment message `recent` to `processed` and `max` to `finalized` ([#1128](https://github.com/project-serum/anchor/pull/1128))
* ts: fix `translateAddress` which currently leads to failing browser code. Now uses `PublicKey` constructor instead of prototype chain constructor name checking which doesn't work in the presence of code minifying/mangling([1138](https://github.com/project-serum/anchor/pull/1138))

Expand All @@ -27,6 +28,7 @@ incremented for features.

* client: Client::new and Client::new_with_options now accept `Rc<dyn Signer>` instead of `Keypair` ([#975](https://github.com/project-serum/anchor/pull/975)).
* lang, ts: Change error enum name and message for 'wrong program ownership' account validation ([#1154](https://github.com/project-serum/anchor/pull/1154)).
lang: Change from `#[repr(packed)]` to `#[repr(C)]` for zero copy accounts ([#1106](https://github.com/project-serum/anchor/pull/1106)).

## [0.19.0] - 2021-12-08

Expand Down
2 changes: 1 addition & 1 deletion lang/attribute/account/src/lib.rs
Expand Up @@ -289,7 +289,7 @@ pub fn zero_copy(

proc_macro::TokenStream::from(quote! {
#[derive(anchor_lang::__private::ZeroCopyAccessor, Copy, Clone)]
#[repr(packed)]
#[repr(C)]
#account_strct
})
}
Expand Down

0 comments on commit fa3d190

Please sign in to comment.