[fpc-devel] gtkliststore.inc

Michael Van Canneyt michael at freepascal.org
Tue Jan 22 09:28:28 CET 2008



On Tue, 22 Jan 2008, Paul Ishenin wrote:

> Hello,  FPC developers' list.
> 
> Can someone tell me what for gtk2 package have this strange defines inside
> sources:
> 
> {$IFNDEF KYLIX}
> function gtk_list_store_new(n_columns:gint; args:array of
> const):PGtkListStore; cdecl; overload; external gtklib;
> function gtk_list_store_new(n_columns:gint):PGtkListStore; cdecl; overload;
> varargs; external gtklib;
> {$ELSE}
> function gtk_list_store_new(n_columns:gint):PGtkListStore; varargs; cdecl;
> external gtklib;
> {$ENDIF}
> 
> I am about KYLIX.

the problem is the ...) construct in C; in FPC this used to be translated by 
array of const, but Kylix uses the varargs; modifier.

now, for FPC you should also use varargs, so the correct form is
 function gtk_list_store_new(n_columns:gint):PGtkListStore; varargs; cdecl; external gtklib;
both for FPC and Kylix.

Michael.



More information about the fpc-devel mailing list