mirror of
https://github.com/weechat/weechat.git
synced 2026-06-30 14:56:39 +02:00
core: fix style
This commit is contained in:
@@ -261,7 +261,7 @@ fifo_exec (const char *text)
|
||||
|
||||
free (text2);
|
||||
if (command_unescaped)
|
||||
free(command_unescaped);
|
||||
free (command_unescaped);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -60,8 +60,8 @@
|
||||
GUILE_CURRENT_SCRIPT_NAME, \
|
||||
guile_function_name, __string)
|
||||
#define API_SCM_TO_STRING(__str) \
|
||||
weechat_guile_api_scm_to_string(__str, \
|
||||
guile_strings, &guile_num_strings)
|
||||
weechat_guile_api_scm_to_string (__str, \
|
||||
guile_strings, &guile_num_strings)
|
||||
#define API_FREE_STRINGS \
|
||||
if (guile_num_strings > 0) \
|
||||
{ \
|
||||
@@ -76,7 +76,7 @@
|
||||
return scm_from_int (0)
|
||||
#define API_RETURN_EMPTY \
|
||||
API_FREE_STRINGS; \
|
||||
return scm_from_locale_string("")
|
||||
return scm_from_locale_string ("")
|
||||
#define API_RETURN_STRING(__string) \
|
||||
return_value = scm_from_locale_string ((__string) ? __string : ""); \
|
||||
API_FREE_STRINGS; \
|
||||
|
||||
@@ -80,7 +80,7 @@ irc_batch_generate_random_ref (char *string, int size)
|
||||
length_chars = strlen (chars);
|
||||
for (i = 0; i < size; i++)
|
||||
{
|
||||
string[i] = chars[rand() % length_chars];
|
||||
string[i] = chars[rand () % length_chars];
|
||||
}
|
||||
string[size] = '\0';
|
||||
}
|
||||
|
||||
@@ -4075,7 +4075,7 @@ IRC_PROTOCOL_CALLBACK(001)
|
||||
}
|
||||
else
|
||||
{
|
||||
length = 1 + strlen(command3) + 1;
|
||||
length = 1 + strlen (command3) + 1;
|
||||
slash_command = malloc (length);
|
||||
if (slash_command)
|
||||
{
|
||||
|
||||
@@ -366,16 +366,16 @@ weechat_perl_exec (struct t_plugin_script *script,
|
||||
{
|
||||
case 's': /* string or null */
|
||||
if (argv[i])
|
||||
XPUSHs (sv_2mortal(newSVpv((char *)argv[i], 0)));
|
||||
XPUSHs (sv_2mortal (newSVpv((char *)argv[i], 0)));
|
||||
else
|
||||
XPUSHs (sv_2mortal(&PL_sv_undef));
|
||||
XPUSHs (sv_2mortal (&PL_sv_undef));
|
||||
break;
|
||||
case 'i': /* integer */
|
||||
XPUSHs (sv_2mortal(newSViv(*((int *)argv[i]))));
|
||||
XPUSHs (sv_2mortal (newSViv (*((int *)argv[i]))));
|
||||
break;
|
||||
case 'h': /* hash */
|
||||
hash = weechat_perl_hashtable_to_hash (argv[i]);
|
||||
XPUSHs (sv_2mortal(newRV_inc((SV *)hash)));
|
||||
XPUSHs (sv_2mortal (newRV_inc ((SV *)hash)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -708,7 +708,7 @@ weechat_php_load (const char *filename, const char *code)
|
||||
memset (&file_handle, 0, sizeof (file_handle));
|
||||
file_handle.type = ZEND_HANDLE_FILENAME;
|
||||
#if PHP_VERSION_ID >= 80100
|
||||
file_handle.filename = zend_string_init(filename, strlen(filename), 0);
|
||||
file_handle.filename = zend_string_init (filename, strlen(filename), 0);
|
||||
#else
|
||||
file_handle.filename = filename;
|
||||
#endif
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
plugin_script_str2ptr (weechat_python_plugin, \
|
||||
PYTHON_CURRENT_SCRIPT_NAME, \
|
||||
python_function_name, __string)
|
||||
#define API_RETURN_OK return PyLong_FromLong((long)1)
|
||||
#define API_RETURN_OK return PyLong_FromLong ((long)1)
|
||||
#define API_RETURN_ERROR return PyLong_FromLong ((long)0)
|
||||
#define API_RETURN_EMPTY \
|
||||
Py_INCREF (Py_None); \
|
||||
@@ -77,11 +77,11 @@
|
||||
} \
|
||||
return Py_BuildValue ("s", "")
|
||||
#define API_RETURN_INT(__int) \
|
||||
return PyLong_FromLong((long)__int)
|
||||
return PyLong_FromLong ((long)__int)
|
||||
#define API_RETURN_LONG(__long) \
|
||||
return PyLong_FromLong(__long)
|
||||
return PyLong_FromLong (__long)
|
||||
#define API_RETURN_LONGLONG(__longlong) \
|
||||
return PyLong_FromLongLong(__longlong)
|
||||
return PyLong_FromLongLong (__longlong)
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -1504,9 +1504,9 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
|
||||
/* PyEval_InitThreads(); */
|
||||
/* python_mainThreadState = PyThreadState_Swap(NULL); */
|
||||
#if PY_VERSION_HEX >= 0x03070000
|
||||
python_mainThreadState = PyThreadState_Get();
|
||||
python_mainThreadState = PyThreadState_Get ();
|
||||
#else
|
||||
python_mainThreadState = PyEval_SaveThread();
|
||||
python_mainThreadState = PyEval_SaveThread ();
|
||||
#endif
|
||||
/* PyEval_ReleaseLock (); */
|
||||
|
||||
|
||||
@@ -1135,7 +1135,7 @@ relay_weechat_msg_compress_zstd (struct t_relay_client *client,
|
||||
compression_level = (((compression - 1) * 19) / 100) + 1;
|
||||
|
||||
gettimeofday (&tv1, NULL);
|
||||
comp_size = ZSTD_compress(
|
||||
comp_size = ZSTD_compress (
|
||||
dest + 5,
|
||||
dest_size,
|
||||
(void *)(msg->data + 5),
|
||||
|
||||
@@ -274,7 +274,7 @@ weechat_ruby_print_exception (VALUE err)
|
||||
backtrace = rb_protect_funcall (err, rb_intern ("backtrace"),
|
||||
&ruby_error, 0, NULL);
|
||||
|
||||
message = rb_protect_funcall(err, rb_intern ("message"), &ruby_error, 0, NULL);
|
||||
message = rb_protect_funcall (err, rb_intern ("message"), &ruby_error, 0, NULL);
|
||||
err_msg = StringValueCStr (message);
|
||||
|
||||
err_class = NULL;
|
||||
|
||||
Reference in New Issue
Block a user