1635c02e92
Summary: Since we are reading from a file, we should make sure this struct is packed, just in case we change it down the line and the compiler decides it might want to introduce padding, we're now protected against that. There was also a discussion about the fact that people might use `ptr += sizeof(BundleHeader)` as an idiom in their code, which would currently be incorrect, if padding was introduced at the end of the file. Actually, it remains incorrect to do that now, because a RAM bundle header is a different size to a BC Bundle header. If people are properly testing their code, they should spot this pretty quickly, because it will always be an incorrect thing to do with a RAM bundle, so this isn't as bad as previously thought: where the code only succeeds when the compiler deigns to not pad the struct at the end. This diff also cleans up how headers are initialised. `BundleHeader` has a constructor that explicitly zero-initialises it so we can rely on the default initializer to do the right thing now. Reviewed By: mhorowitz Differential Revision: D4572032 fbshipit-source-id: 7dc50cfa9438dfdfb9f842dc39d8f15334813c63 |
||
---|---|---|
.. | ||
libs | ||
src | ||
.npmignore | ||
DEFS | ||
DevExperience.md | ||
README.md | ||
build.gradle | ||
gradle.properties | ||
release.gradle |
README.md
Building React Native for Android
See the docs on the website.
Running tests
When you submit a pull request CircleCI will automatically run all tests. To run tests locally, see Testing.