Use ctypes unit for c-type definitions if FPC is used for compilation#29
Conversation
- use unit ctypes if FPC is used - else (Delphi) use our own type definitions
|
Looks good, though I wonder if we should add a definition for Alternatively, if we don't mind doing some larger changes to the code, we could use a different approach:
|
Good idea and totally agree!
I like the idea. Otherwise this would mean to convert all files to the new type names in one large go. |
Compare issue #26 for discussion and details about this PR.
Main features:
Necessity
As a Pascal developer you need to know the exact C variable type of every parameter of the parameter list of a function, instead of what we believe the C function is asking for. E.g. prior to this update C's int was often translated to SInt32, which will work well most often, but as a Pascal developer it is hidden to you, that the platform dependent int is actually expected. This may raise bugs when developing for a system where int does not correspond to SInt32.