ThrowTheSwitch / CMock

CMock - Mock/stub generator for C
http://throwtheswitch.org
MIT License
652 stars 269 forks source link

CMOCK_MEM_PTR_AS_INT should be intptr_t #455

Closed informatimago closed 10 months ago

informatimago commented 10 months ago

https://github.com/ThrowTheSwitch/CMock/blob/a3a48e8b1d57b742b1d6d6cf1aea58fe507abe5e/src/cmock_internals.h#L50

Why is it not:

#define CMOCK_MEM_PTR_AS_INT intptr_t 

??? Any other type will obviously break on some systems. (and yes, this requires stdint.h, which may or may not be included thru unity.h depending on user setting... Without stdint.h, we may fallback to some int type, but better use long long int then.

informatimago commented 10 months ago

Ok, it's more complicated. I'll reformulate.