[fpc-devel] gtkliststore.inc
Paul Ishenin
ip at kmiac.ru
Tue Jan 22 10:25:39 CET 2008
Michael Van Canneyt wrote:
>
> 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.
How can I use varargs if in fpc svn functions are declared with array of
cont?
Btw, returning to gtk2 package. Sources of that package are very old -
they used only gtk 2.0 functions, structures and constants. 2.2, 2.4,
2.6, 2.8, 2.10 and 2.12 versions were already released. Ofcource I
understand that most of users still not using gtk 2.12, but at least gtk
2.4 can be taken as minimal requirement.
Best regards,
Paul Ishenin.
More information about the fpc-devel
mailing list