Re: [fpc-pascal] function alias

2007-10-06 Thread Mattias Gaertner
On Thu, 4 Oct 2007 20:17:36 +0200 (CEST) Daniël Mantione [EMAIL PROTECTED] wrote: Op Thu, 4 Oct 2007, schreef Mattias Gaertner: Yes, but I hoped to declare it in situ - without adding another type. ;) The reason is that I'm auto translating some C headers that contains aliases for

Re: [fpc-pascal] function alias

2007-10-06 Thread Daniël Mantione
Op Sat, 6 Oct 2007, schreef Mattias Gaertner: On Thu, 4 Oct 2007 20:17:36 +0200 (CEST) Daniël Mantione [EMAIL PROTECTED] wrote: Op Thu, 4 Oct 2007, schreef Mattias Gaertner: Yes, but I hoped to declare it in situ - without adding another type. ;) The reason is that I'm auto

Re: [fpc-pascal] function alias

2007-10-06 Thread ik
On 10/6/07, Mattias Gaertner [EMAIL PROTECTED] wrote: On Thu, 4 Oct 2007 20:17:36 +0200 (CEST) Daniël Mantione [EMAIL PROTECTED] wrote: Op Thu, 4 Oct 2007, schreef Mattias Gaertner: Yes, but I hoped to declare it in situ - without adding another type. ;) The reason is that I'm

Re: [fpc-pascal] function alias

2007-10-06 Thread Mattias Gaertner
On Sat, 6 Oct 2007 21:43:30 +0200 ik [EMAIL PROTECTED] wrote: On 10/6/07, Mattias Gaertner [EMAIL PROTECTED] wrote: On Thu, 4 Oct 2007 20:17:36 +0200 (CEST) Daniël Mantione [EMAIL PROTECTED] wrote: Op Thu, 4 Oct 2007, schreef Mattias Gaertner: Yes, but I hoped to declare it

Re: [fpc-pascal] function alias

2007-10-06 Thread Johann Glaser
Hi! procedure OriginalProc(..).. {$IFDEF USEINLINE_ALIAS}inline;{$ENDIF} begin end; ... procedure AliasProc(...); begin {$DEFINE USEINLINE_ALIAS} OriginalProc(...); {$UNDEF USEINLINE_ALIAS} end; Are you sure this works? AFAIK the preprocessor doesn't follow function calls but

[fpc-pascal] function alias

2007-10-04 Thread Mattias Gaertner
How can I create an alias for a function? For example: procedure DoSomething(...params...); cdecl; external 'useful'; const DoAliasSomething = DoSomething; fpc does not allow this. So how can it be done? Mattias ___ fpc-pascal maillist -

Re: [fpc-pascal] function alias

2007-10-04 Thread Michael Van Canneyt
On Thu, 4 Oct 2007, Mattias Gaertner wrote: How can I create an alias for a function? For example: procedure DoSomething(...params...); cdecl; external 'useful'; const DoAliasSomething = DoSomething; fpc does not allow this. So how can it be done? program test; procedure

Re: [fpc-pascal] function alias

2007-10-04 Thread Mattias Gaertner
On Thu, 4 Oct 2007 19:58:08 +0200 (CEST) Michael Van Canneyt [EMAIL PROTECTED] wrote: On Thu, 4 Oct 2007, Mattias Gaertner wrote: How can I create an alias for a function? For example: procedure DoSomething(...params...); cdecl; external 'useful'; const DoAliasSomething =

Re: [fpc-pascal] function alias

2007-10-04 Thread Daniël Mantione
Op Thu, 4 Oct 2007, schreef Mattias Gaertner: Yes, but I hoped to declare it in situ - without adding another type. ;) The reason is that I'm auto translating some C headers that contains aliases for functions. procedure DoAliasSomething(...params...); cdecl; external 'useful'; ... is