On 1 okt '12, dhkblas...@zeelandnet.nl wrote:
> I need to
translate this: #define mymalloc(x,y) (x*)malloc((y)* sizeof(x))
>
>
Is it possible using macro's in FPC or do I need to convert it to a
procedure? How would I cast the pointer in the latter case (without
having to change the sourcec
In our previous episode, dhkblas...@zeelandnet.nl said:
A bit late, but:
> I need to translate this: #define mymalloc(x,y) (x*)malloc((y)*
> sizeof(x))
Impossible.
1. FPC macros can't be parameterized
2. less problematic, but macros don't import over unit borders,
you'd have to put the macr
Those macros are simply to reduce typing, better use true debugger. Even if
RTTI can (which I believe not), it would be an abuse of the feature.
Macros in FPC aren't as flexible as in C for a purpose IMHO: it's often
abused as the way you show.
--
View this message in context:
http://free-pasc
In our previous episode, Marco van de Voort said:
> 3. There is no way to pass something typeless to a function and then get
>the size of it. This make emulating it with functions hard.
Btw, Modula2 allows to pass any type of defined size to an ARRAY OF BYTE
open array (and thus such functions
Hi list,
For a fpcunit database test listener I'm implementing multi-connector
support using TSQLConnector. This seems to work nicely.
If the Firebird connector is chosen and the hostname is empty, I assume
Firebird embedded is used and if not present, a database needs to be
created using .Create