Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Change Encoding parameter sizes #11

Merged
merged 2 commits into from
Aug 31, 2021
Merged

Change Encoding parameter sizes #11

merged 2 commits into from
Aug 31, 2021

Conversation

madsmtm
Copy link
Owner

@madsmtm madsmtm commented Aug 31, 2021

  • Decrease Encoding::BitField size from u32 to u8
    • A bitfield can only be created from integral types, whose maximum size is 64 (which can easily fit inside a u8)
  • Increase Encoding::Array length from u32 to usize
    • @encode can output an array size up to 2^61 - 1 elements:
    NSLog(@"Encoding: %s", @encode(char [((unsigned long long)(2) << 60) - 1]));

These are breaking changes.

Replaces SSheldon/rust-objc-encode#4.

madsmtm added 2 commits June 1, 2021 14:47
@encode can output an array size up to 2^61 - 1 elements.
A bitfield can only be created from integral types, whose maximum size is 64 (which can easily fit inside a u8)
@madsmtm madsmtm added bug Something isn't working enhancement New feature or request labels Aug 31, 2021
@madsmtm madsmtm merged commit b697ca5 into master Aug 31, 2021
@madsmtm madsmtm deleted the encoding-parameter-size branch August 31, 2021 22:18
@madsmtm madsmtm mentioned this pull request Sep 5, 2021
80 tasks
@madsmtm madsmtm added this to the objc2 v0.3 milestone Apr 2, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant