[Geany] [PATCH] plugin api request filetypes_get_from_uid()

Nick Treleaven nick.treleaven at xxxxx
Wed Mar 12 14:13:55 UTC 2008


On Wed, 12 Mar 2008 15:14:16 +0200
"Yura Siamashka" <yurand2 at gmail.com> wrote:

> 2008/3/12, Yura Siamashka <yurand2 at gmail.com>:
> > > You can use GeanyData::filetypes, which is an array of filetype
> > > pointers, to loop through each filetype.
> > Good, but how can I get it's size? I think I can't trust
> > GEANY_MAX_FILE_TYPES since it can be different for geany and plugin.
> I think I can check if filetype is GEANY_FILETYPES_ALL and assume it
> is last. Sorry no need to add anything to geany. ;-)

GEANY_FILETYPES_ALL is always one before GEANY_MAX_FILE_TYPES. This is
the best you can do for now. I guess because of this we need to always
increment the ABI when adding filetypes. (I'm planning on making the
filetypes array dynamic in future, so then it would be something like
filetypes->len.)

Regards,
Nick



More information about the Users mailing list