Also replace integer with bool in Ghost API when only used as boolean, and replace uint8* with char* in Ghost API when variable is a string.
Details
Diff Detail
- Repository
- rB Blender
- Branch
- fixed_width_integers (branched from master)
- Build Status
Buildable 15235 Build 15235: arc lint + arc unit
Event Timeline
Some things that should be audited:
ints that should be boolsdoneint8_t* or uint8_t* which should be char*done
Buildbot to ensure this compiles for Linux/OSX.
I have to admit, ghost was written long long before my time, and I have honestly no idea why all those custom types were in there in the first place, so from a standards perspective replacing custom types with standard conformant types +1 from me, but i can't help wondering if i'm missing something crucial here
@Sergey Sharybin (sergey) / @Brecht Van Lommel (brecht) either of you available for a history lesson here?
Once upon a time...
I think the reason for the ghost-specific fixed types was mainly caused by compilers from back in the days not having stdint.h. It wasn't very pleasant experience to ensure fixed-width types for all compilers. Especially before rather recent (in Blender history scope) MSVC release.
Nowadays I'd say use stdint and standard fixed-width types. I don't see reason to re-define those in GHOST.
- Replace Ghost integral types with standard fixed width integers.
- Replace uint8* with char* in Ghost API when variable is a string.
- Replace integer with bool in Ghost API when only used as boolean.
Any review should prioritize the second commit "Replace uint8* with char* in Ghost API when variable is a string." as it's the only bit that wasn't a direct find/replace.
- Replace Ghost integral types with standard fixed width integers.
- Replace uint8* with char* in Ghost API when variable is a string.
- Replace integer with bool in Ghost API when only used as boolean.
- Fixup: linux types.
I love everything about this, but this is for someone from the core module to accept, they are tagged so they should see this.
Remaining build issues for Linux are resolved and clang formatting is applied; this is ready for review.