|
@@ -172,14 +172,8 @@ int clish_shell_link_plugins(clish_shell_t *this)
|
|
|
}
|
|
|
|
|
|
/*----------------------------------------------------------------------- */
|
|
|
-/* Set params of hooks */
|
|
|
-int clish_shell_set_hook(clish_shell_t *this,
|
|
|
- void *func, const char *name, int type)
|
|
|
+/* Get hook sym */
|
|
|
+clish_sym_t *clish_shell_get_hook(const clish_shell_t *this, int type)
|
|
|
{
|
|
|
- if (!name)
|
|
|
- return -1;
|
|
|
- clish_sym__set_name(this->hooks[type], name);
|
|
|
- clish_sym__set_func(this->hooks[type], func);
|
|
|
-
|
|
|
- return 0;
|
|
|
+ return this->hooks[type];
|
|
|
}
|