mirror of
https://github.com/weechat/weechat.git
synced 2026-06-30 06:46:38 +02:00
Update developer guide (add 50% of new C API functions)
This commit is contained in:
@@ -1886,7 +1886,8 @@ static int
|
||||
weechat_lua_api_config_color (lua_State *L)
|
||||
{
|
||||
const char *option;
|
||||
int n, value;
|
||||
char *result;
|
||||
int n;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) L;
|
||||
@@ -1909,9 +1910,9 @@ weechat_lua_api_config_color (lua_State *L)
|
||||
|
||||
option = lua_tostring (lua_current_interpreter, -1);
|
||||
|
||||
value = weechat_config_color (script_str2ptr (option));
|
||||
result = weechat_config_color (script_str2ptr (option));
|
||||
|
||||
LUA_RETURN_INT(value);
|
||||
LUA_RETURN_STRING(result);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1583,7 +1583,7 @@ static XS (XS_weechat_api_config_string)
|
||||
|
||||
static XS (XS_weechat_api_config_color)
|
||||
{
|
||||
int value;
|
||||
char *result;
|
||||
dXSARGS;
|
||||
|
||||
/* make C compiler happy */
|
||||
@@ -1601,9 +1601,9 @@ static XS (XS_weechat_api_config_color)
|
||||
PERL_RETURN_INT(0);
|
||||
}
|
||||
|
||||
value = weechat_config_color (script_str2ptr (SvPV (ST (0), PL_na))); /* option */
|
||||
result = weechat_config_color (script_str2ptr (SvPV (ST (0), PL_na))); /* option */
|
||||
|
||||
PERL_RETURN_INT(value);
|
||||
PERL_RETURN_STRING(result);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1672,8 +1672,7 @@ weechat_python_api_config_string (PyObject *self, PyObject *args)
|
||||
static PyObject *
|
||||
weechat_python_api_config_color (PyObject *self, PyObject *args)
|
||||
{
|
||||
char *option;
|
||||
int value;
|
||||
char *option, *result;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) self;
|
||||
@@ -1692,9 +1691,9 @@ weechat_python_api_config_color (PyObject *self, PyObject *args)
|
||||
PYTHON_RETURN_INT(0);
|
||||
}
|
||||
|
||||
value = weechat_config_color (script_str2ptr (option));
|
||||
result = weechat_config_color (script_str2ptr (option));
|
||||
|
||||
PYTHON_RETURN_INT(value);
|
||||
PYTHON_RETURN_STRING(result);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1924,8 +1924,7 @@ weechat_ruby_api_config_string (VALUE class, VALUE option)
|
||||
static VALUE
|
||||
weechat_ruby_api_config_color (VALUE class, VALUE option)
|
||||
{
|
||||
char *c_option;
|
||||
int value;
|
||||
char *c_option, *result;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) class;
|
||||
@@ -1948,9 +1947,9 @@ weechat_ruby_api_config_color (VALUE class, VALUE option)
|
||||
|
||||
c_option = STR2CSTR (option);
|
||||
|
||||
value = weechat_config_color (script_str2ptr (c_option));
|
||||
result = weechat_config_color (script_str2ptr (c_option));
|
||||
|
||||
RUBY_RETURN_INT(value);
|
||||
RUBY_RETURN_STRING(result);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1855,7 +1855,8 @@ weechat_tcl_api_config_color (ClientData clientData, Tcl_Interp *interp,
|
||||
int objc, Tcl_Obj *CONST objv[])
|
||||
{
|
||||
Tcl_Obj *objp;
|
||||
int result, i;
|
||||
char *result;
|
||||
int i;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) clientData;
|
||||
@@ -1874,7 +1875,7 @@ weechat_tcl_api_config_color (ClientData clientData, Tcl_Interp *interp,
|
||||
|
||||
result = weechat_config_color (script_str2ptr (Tcl_GetStringFromObj (objv[1], &i))); /* option */
|
||||
|
||||
TCL_RETURN_INT(result);
|
||||
TCL_RETURN_STRING(result);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user