Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix mqtt5 code using wrong letter to pass int types (#417)
**Issue:** Mysterious crashes due to using the wrong letter when passing variables between C and Python. **Background:** Python's c-api uses [misc letters](https://docs.python.org/3/c-api/arg.html) to indicate various integer types. This way of passing args slips through C's type-checking mechanisms and it's easy to get things wrong, the compiler won't warn you. Also, the Python docs refer to old-school C type names like `unsigned short`. Our AWS C code usually uses the less-confusing fixed-width sizes like `uint16_t`. But it gets confusing when you need to cross-reference against the python docs. **Description of changes:** - Fix (hopefully) everywhere we got an int type wrong - Cast integers to the type we expect, so the compiler warns us if we accidentally have a "narrowing" error - Move the type comments to the start of line, instead of end, so they're easier to read
- Loading branch information