[fpc-devel] object as vararg

Vincent Snijders vsnijders at quicknet.nl
Sat Mar 18 16:46:18 CET 2006


Hi,

The gtk2int.pas file of lazarus doesn't compile with fpc 2.1.1 (revision 
2954) anymore.

The error message is:
gtk2int.pas(268,67) Error: Wrong type "TObject" in array constructor

Line 268 looks like this:
     gtk_list_store_set(FGtkListStore, @ListItem, [FColumnIndex+1, 
AnObject, -1]);

The declaration of gtk_list_store_set:
procedure gtk_list_store_set(list_store:PGtkListStore; 
iter:PGtkTreeIter); varargs; cdecl; external gtklib;

I saw in the logs that there were some changes with varargs. Is this a 
bug in the current compiler or should the lazarus code be fixed?

Vincent



More information about the fpc-devel mailing list