Skip to content

Conversation

danmar
Copy link

@danmar danmar commented May 17, 2018

This makes the code more portable. you can use the same code both on a pc and on a embedded system.

if you do not like to use uint8_t and uint32_t for some reason then I would suggest that we use preprocessor to select proper types. Something like:

#if sizeof(int) == 4
typedef unsigned int WORD;
elif sizeof(long) == 4
typedef unsigned long WORD;
#else
#error WORD type not configured properly
#endif

@DeflateAwning
Copy link

Please merge this PR. This is a good change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants