Index: plugin/actions.html =================================================================== --- plugin/actions.html (revision 27952) +++ plugin/actions.html (revision 27953) @@ -49,7 +49,6 @@ {"Action1", pcb_act_Action1, pcb_acth_Action1, pcb_acts_Action1}, {"Action2", pcb_act_Action2, pcb_acth_Action2, pcb_acts_Action2} }; -PCB_REGISTER_ACTIONS(pluginname_action_list, pluginname_cookie)
The action name in the first column must be unique. If an action has @@ -65,24 +64,16 @@ The table should be placed after the last action to avoid action function/help/syntax forward declarations. Most often the table is placed right above the check_ver callback. -
-The PCB_REGISTER_ACTIONS() macro invocation is right after the table; it -requires the standard plugin cookie.
-Place #include "dolists.h" right above the plugins standard init -callback function. This include will change some global states so -that PCB_REGISTER_ACTIONS will work differently, so its place is significant. -
Invoke macro PCB_REGISTER_ACTIONS(pluginname_action_list, pluginname_cookie) -again, from the init callback. +again, from the init callback. It requires the +standard plugin cookie.
In practice, the plugin init will look like this:
-#include "dolists.h" - int pplg_init_expfeat(void) { PCB_API_CHK_VER; Index: plugin/template_pup/ext_foo.c =================================================================== --- plugin/template_pup/ext_foo.c (revision 27952) +++ plugin/template_pup/ext_foo.c (revision 27953) @@ -44,9 +44,7 @@ static const pcb_action_t ext_foo_action_list[] = { {"ExtFoo", pcb_act_ExtFoo, pcb_acth_ExtFoo, pcb_acts_ExtFoo} }; -PCB_REGISTER_ACTIONS(ext_foo_action_list, ext_foo_cookie) - int pplg_check_ver_ext_foo(int ver_needed) { return 0; } void pplg_uninit_ext_foo(void) @@ -55,7 +53,6 @@ pcb_remove_actions_by_cookie(ext_foo_cookie); } -#include "src/dolists.h" int pplg_init_ext_foo(void) {