Hello All

In the current plugin API, the function register_callback is used to register callback routines (eg PLUGIN_FINISH_UNIT) in which case the callback is expected to be a routine. But this same function register_callback is used also to register some data to plugins, without any call back functions, eg for PLUGIN_PASS_MANAGER_SETUP.

Perhaps we could have two different functions:

1.  register_callback like before for true callbacks

and

2. register_data for registering data, like for PLUGIN_PASS_MANAGER_SETUP or PLUGIN_INFO, declared as
 void register_data (const char *plugin_name,
                  enum plugin_event event,,
                  void* user_data);
?

What do you think?

BTW, tjhe current gcc/doc/plugins.texi don't mention PLUGIN_INFO, unless I am mistaken. And the enum plugin_event
there is not the same as in gcc-plugins.h

Regards.

--
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***

Reply via email to