summaryrefslogtreecommitdiff
path: root/src/plugins/scripts/ruby
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2008-01-13 23:29:43 +0100
committerSebastien Helleu <flashcode@flashtux.org>2008-01-13 23:29:43 +0100
commit68f723888798a792480f4113663cc4e33a4b2d64 (patch)
treef4e61691a67b60dd94d84df119263dd181a76c97 /src/plugins/scripts/ruby
parent05e1e4715c81e05de4997c4acf15d65b3839bb14 (diff)
downloadweechat-68f723888798a792480f4113663cc4e33a4b2d64.zip
Migration of Lua plugin to new API
Diffstat (limited to 'src/plugins/scripts/ruby')
-rw-r--r--src/plugins/scripts/ruby/weechat-ruby-api.c20
-rw-r--r--src/plugins/scripts/ruby/weechat-ruby.c3
2 files changed, 12 insertions, 11 deletions
diff --git a/src/plugins/scripts/ruby/weechat-ruby-api.c b/src/plugins/scripts/ruby/weechat-ruby-api.c
index 1f244f59e..03bd324a5 100644
--- a/src/plugins/scripts/ruby/weechat-ruby-api.c
+++ b/src/plugins/scripts/ruby/weechat-ruby-api.c
@@ -45,7 +45,7 @@
#define RUBY_RETURN_STRING(__string) \
if (__string) \
return rb_str_new2 (__string); \
- return rb_str_new2 ("");
+ return rb_str_new2 ("")
#define RUBY_RETURN_STRING_FREE(__string) \
if (__string) \
{ \
@@ -53,7 +53,7 @@
free (__string); \
return return_value; \
} \
- return rb_str_new2 ("");
+ return rb_str_new2 ("")
/*
@@ -402,7 +402,7 @@ weechat_ruby_api_color (VALUE class, VALUE color)
}
/*
- * weechat_ruby_api_print: print message into a buffer (current or specified one)
+ * weechat_ruby_api_print: print message in a buffer
*/
static VALUE
@@ -1043,7 +1043,7 @@ weechat_ruby_api_hook_signal_send (VALUE class, VALUE signal, VALUE type_data,
VALUE signal_data)
{
char *c_signal, *c_type_data, *c_signal_data;
- int int_value;
+ int number;
/* make C compiler happy */
(void) class;
@@ -1080,8 +1080,8 @@ weechat_ruby_api_hook_signal_send (VALUE class, VALUE signal, VALUE type_data,
else if (strcmp (c_type_data, WEECHAT_HOOK_SIGNAL_INT) == 0)
{
Check_Type (signal_data, T_STRING);
- int_value = FIX2INT (signal_data);
- weechat_hook_signal_send (c_signal, c_type_data, &int_value);
+ number = FIX2INT (signal_data);
+ weechat_hook_signal_send (c_signal, c_type_data, &number);
RUBY_RETURN_OK;
}
else if (strcmp (c_type_data, WEECHAT_HOOK_SIGNAL_POINTER) == 0)
@@ -1101,7 +1101,8 @@ weechat_ruby_api_hook_signal_send (VALUE class, VALUE signal, VALUE type_data,
*/
int
-weechat_ruby_api_hook_config_cb (void *data, char *type, char *option, char *value)
+weechat_ruby_api_hook_config_cb (void *data, char *type, char *option,
+ char *value)
{
struct t_script_callback *script_callback;
char *ruby_argv[4];
@@ -1184,7 +1185,8 @@ weechat_ruby_api_hook_config (VALUE class, VALUE type, VALUE option, VALUE funct
*/
int
-weechat_ruby_api_hook_completion_cb (void *data, char *completion, struct t_gui_buffer *buffer,
+weechat_ruby_api_hook_completion_cb (void *data, char *completion,
+ struct t_gui_buffer *buffer,
struct t_weelist *list)
{
struct t_script_callback *script_callback;
@@ -1734,7 +1736,7 @@ weechat_ruby_api_nicklist_add_nick (VALUE class, VALUE buffer, VALUE group,
script_string_to_pointer (c_group),
c_name,
c_color,
- prefix,
+ char_prefix,
c_prefix_color,
c_visible);
diff --git a/src/plugins/scripts/ruby/weechat-ruby.c b/src/plugins/scripts/ruby/weechat-ruby.c
index 6e307e7b6..167cc4091 100644
--- a/src/plugins/scripts/ruby/weechat-ruby.c
+++ b/src/plugins/scripts/ruby/weechat-ruby.c
@@ -821,8 +821,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin)
weechat_hook_signal ("dump_data", &weechat_ruby_dump_data_cb, NULL);
script_init (weechat_ruby_plugin);
- script_auto_load (weechat_ruby_plugin,
- "ruby", &weechat_ruby_load_cb);
+ script_auto_load (weechat_ruby_plugin, "ruby", &weechat_ruby_load_cb);
/* init ok */
return WEECHAT_RC_OK;