Plugin interface: Information and Version

Benedikt Meurer benedikt.meurer at unix-ag.uni-siegen.de
Tue Nov 25 18:32:14 CET 2003


> I wanted to use a struct, allowing all members to be NULL. New info can
> simply be added at the end without breaking old apps:
> 
> typedef struct
> {
>   char *name;
>   char *version;
>   char *maintainer;
>   char *website;
>   char *description; 
> }
> XfcePluginInfo;
> 
> void (*fill_plugin_info)(XfcePluginInfo *info);

Not sure, but maybe its safer to do:

typedef struct {
	char* name;
	char* version;
	char* maintainer;
	char* website;
	char* description;
	char* reserved[10];
} XfcePluginInfo;

That'll reserve space for 10 additional pointers and will work in any 
case I think. I'm not sure if all C compilers allow smooth additions of 
new members to the end of a structure without breaking things. Anyone 
with exact infos on this topic?

> 	Jasper

Benedikt

-- 
NetBSD Operating system:                       http://www.NetBSD.org/
pkgsrc "Work in progress":                  http://pkgsrc-wip.sf.net/
XFce desktop environment:                        http://www.xfce.org/
German Unix-AG Association:                   http://www.unix-ag.org/




More information about the Xfce4-dev mailing list