WIP: Introduce LTC_NO_STRUCT_PADDING. #757
No reviewers
Labels
No labels
bug
duplicate
enhancement
feature
help wanted
improve API
invalid
needs documentation
not-planned
rtfm
stale
support
wishlist
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-libtom/libtomcrypt!757
Loading…
Reference in a new issue
No description provided.
Delete branch "no-struct-padding"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Pulled out from #751
https://github.com/libtom/libtomcrypt/pull/751#issuecomment-4365899260
That's indeed going to become platform-dependent, but struct sizes always are as soon as they contain platform-dependent types like
intor pointer types.paholesays this:The idea was to pad the struct up to an even size, e.g. a multiple of 32 bytes, and currently I only did that for x86_64, so we should
a) decide whether this makes sense or whether we should simply pad with some members of ulong64
and if we want to pad up to a specific size
b) decide what value to pad up to
c) do this for 32bit archs as well
Does that make sense?
You are probably waiting for feedback from me, but frankly, API compatibility is not something I care much about. Fortunately, I do not have to deal with it, so my expertise in this area is limited.
I plan to use
LTC_NO_STRUCT_PADDING, but I do not have a strong opinion on how best to handle structure padding to avoid future API breakage. The approach chosen in this PR is fine with me.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.