[fpc-devel] ctypes and RTL

Ivo Steinmann ivo_steinmann at gmx.net
Sun Sep 14 21:04:12 CEST 2008


Hello all

I messed a littlebit around with size_t and ctypes. Now I thought it's 
best to fix all the ctypes stuff in RTL. All that code is quite 
complicated and hard to maintain. To solve this, I created a new branch 
for the RTL

http://svn.freepascal.org/svn/fpc/branches/ctypes/rtl

the branch solves this problems:
* ctypes is seperated from the rest of the RTL now, no mess with include 
files
* ctypes.pp contains all the c-types now (nothing more)
* ctypes.pp may include a platform dependant ctypes.inc (if required!)
* baseunix, unixtype and unix no longer define ctypes (they were 
included of ptypes.inc)
* unixtype is seperated now from baseunix and unix


+ the advantage is, that there's a clear structure
- the disadvantage is, that you have to include ctypes and unixtype into 
several packages (fixed in most cases)

A discussion in #fpc between me, Florian and Marco resultet in the idea 
to define a
csize_t, pcsize_t in ctypes.pp (size_t = csize_t). Since you can define 
a csize_t per platform, this is a good solution.

-Ivo



More information about the fpc-devel mailing list