1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-28 05:46:38 +02:00

api: add argument "bytes" in function string_dyn_concat

This commit is contained in:
Sébastien Helleu
2020-08-23 23:27:57 +02:00
parent b459dab84b
commit cfd221014c
26 changed files with 308 additions and 205 deletions
+4 -6
View File
@@ -258,7 +258,6 @@ int
weechat_lua_output (lua_State *L)
{
const char *msg, *ptr_msg, *ptr_newline;
char *message;
if (lua_gettop (L) < 1)
return 0;
@@ -267,14 +266,13 @@ weechat_lua_output (lua_State *L)
ptr_msg = msg;
while ((ptr_newline = strchr (ptr_msg, '\n')) != NULL)
{
message = weechat_strndup (ptr_msg, ptr_newline - ptr_msg);
weechat_string_dyn_concat (lua_buffer_output, message);
if (message)
free (message);
weechat_string_dyn_concat (lua_buffer_output,
ptr_msg,
ptr_newline - ptr_msg);
weechat_lua_output_flush ();
ptr_msg = ++ptr_newline;
}
weechat_string_dyn_concat (lua_buffer_output, ptr_msg);
weechat_string_dyn_concat (lua_buffer_output, ptr_msg, -1);
return 0;
}