1
0
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:
Sebastien Helleu
2008-01-13 23:29:43 +01:00
parent 05e1e4715c
commit 68f7238887
12 changed files with 3754 additions and 2762 deletions
+6 -6
View File
@@ -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)
+1 -2
View File
@@ -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;