1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-25 20:36:38 +02:00

core: fix crash with hdata_update on shared strings, add hdata type "shared_string" (bug #41104)

This commit is contained in:
Sebastien Helleu
2014-01-05 14:37:27 +01:00
parent 7dfaca9ef3
commit 846dde00aa
10 changed files with 37 additions and 9 deletions
@@ -433,6 +433,7 @@ relay_weechat_msg_add_hdata_path (struct t_relay_weechat_msg *msg,
relay_weechat_msg_add_type (msg, RELAY_WEECHAT_MSG_OBJ_LONG);
break;
case WEECHAT_HDATA_STRING:
case WEECHAT_HDATA_SHARED_STRING:
relay_weechat_msg_add_type (msg, RELAY_WEECHAT_MSG_OBJ_STRING);
break;
case WEECHAT_HDATA_POINTER:
@@ -476,6 +477,7 @@ relay_weechat_msg_add_hdata_path (struct t_relay_weechat_msg *msg,
name));
break;
case WEECHAT_HDATA_STRING:
case WEECHAT_HDATA_SHARED_STRING:
relay_weechat_msg_add_string (msg,
weechat_hdata_string (hdata,
pointer,
@@ -664,6 +666,7 @@ relay_weechat_msg_add_hdata (struct t_relay_weechat_msg *msg,
strcat (keys_types, RELAY_WEECHAT_MSG_OBJ_LONG);
break;
case WEECHAT_HDATA_STRING:
case WEECHAT_HDATA_SHARED_STRING:
strcat (keys_types, RELAY_WEECHAT_MSG_OBJ_STRING);
break;
case WEECHAT_HDATA_POINTER:
+2 -1
View File
@@ -56,7 +56,7 @@ struct timeval;
* please change the date with current one; for a second change at same
* date, increment the 01, otherwise please keep 01.
*/
#define WEECHAT_PLUGIN_API_VERSION "20130819-01"
#define WEECHAT_PLUGIN_API_VERSION "20140105-01"
/* macros for defining plugin infos */
#define WEECHAT_PLUGIN_NAME(__name) \
@@ -122,6 +122,7 @@ struct timeval;
#define WEECHAT_HDATA_POINTER 5
#define WEECHAT_HDATA_TIME 6
#define WEECHAT_HDATA_HASHTABLE 7
#define WEECHAT_HDATA_SHARED_STRING 8
/* buffer hotlist */
#define WEECHAT_HOTLIST_LOW "0"