mirror of
https://github.com/weechat/weechat.git
synced 2026-06-30 06:46:38 +02:00
Migration of Lua plugin to new API
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
XSRETURN (1); \
|
||||
} \
|
||||
XST_mPV (0, ""); \
|
||||
XSRETURN (1);
|
||||
XSRETURN (1)
|
||||
#define PERL_RETURN_STRING_FREE(__string) \
|
||||
if (__string) \
|
||||
{ \
|
||||
@@ -54,7 +54,7 @@
|
||||
XSRETURN (1); \
|
||||
} \
|
||||
XST_mPV (0, ""); \
|
||||
XSRETURN (1);
|
||||
XSRETURN (1)
|
||||
|
||||
extern void boot_DynaLoader (pTHX_ CV* cv);
|
||||
|
||||
@@ -328,7 +328,7 @@ static XS (XS_weechat_color)
|
||||
}
|
||||
|
||||
/*
|
||||
* weechat::print: print message into a buffer (current or specified one)
|
||||
* weechat::print: print message in a buffer
|
||||
*/
|
||||
|
||||
static XS (XS_weechat_print)
|
||||
@@ -828,7 +828,7 @@ static XS (XS_weechat_hook_signal)
|
||||
static XS (XS_weechat_hook_signal_send)
|
||||
{
|
||||
char *type_data;
|
||||
int int_value;
|
||||
int number;
|
||||
dXSARGS;
|
||||
|
||||
/* make C compiler happy */
|
||||
@@ -856,10 +856,10 @@ static XS (XS_weechat_hook_signal_send)
|
||||
}
|
||||
else if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_INT) == 0)
|
||||
{
|
||||
int_value = SvIV(ST (2));
|
||||
number = SvIV(ST (2));
|
||||
weechat_hook_signal_send (SvPV (ST (0), PL_na), /* signal */
|
||||
type_data,
|
||||
&int_value); /* signal_data */
|
||||
&number); /* signal_data */
|
||||
PERL_RETURN_OK;
|
||||
}
|
||||
else if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_POINTER) == 0)
|
||||
|
||||
@@ -730,8 +730,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin)
|
||||
weechat_hook_signal ("dump_data", &weechat_perl_dump_data_cb, NULL);
|
||||
|
||||
script_init (weechat_perl_plugin);
|
||||
script_auto_load (weechat_perl_plugin,
|
||||
"perl", &weechat_perl_load_cb);
|
||||
script_auto_load (weechat_perl_plugin, "perl", &weechat_perl_load_cb);
|
||||
|
||||
/* init ok */
|
||||
return WEECHAT_RC_OK;
|
||||
|
||||
Reference in New Issue
Block a user