[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Weechat-dev] description about hook_process in WeeChat plugin API r
Re: [Weechat-dev] description about hook_process in WeeChat plugin API reference
Sat, 23 Apr 2016 20:56:55 +0200
On Sun, Apr 24, 2016 at 02:29:20AM +0900, AYANOKOUZI, Ryuunosuke wrote:
> Dear all,
> Recently, 'hook_process' API function was updated
> and become possible to hook internal function also.
> I have a question about C and Script (Python) API for 'hook_process'.
> 1. For C API case, If 'const char *command' is set "func:get_status",
> function 'get_status' is NEVER called by both parent and child process.
> 2. For Python API case, If 'command' is set "func:get_status",
> function 'get_status' IS called by child process.
> Is my understanding correct?
> I am awaiting your reply.
> Sincerely yours,
> Ryuunosuke Ayanokouzi
> AYANOKOUZI, Ryuunosuke <address@hidden>
Yes, in C API, the callback (of hook_process) is called in the child process,
and then this callback can do anything with the command received (which is
"func:name"). So the function name is not really used (the callback can use it
The behavior is different in scripting API, the callback is called too, and this
callback runs the function after "func:", so the callback is called only one
time in script, after the call to function in child.
web: weechat.org / flashtux.org
irc: FlashCode @ irc.freenode.net
Description: Digital signature