mirror of
https://github.com/weechat/weechat.git
synced 2026-07-06 17:53:13 +02:00
core, plugins: return "0x0" instead of "(nil)" for pointers formatted in strings
This is a partial revert of the commit
965beb37de.
This commit is contained in:
@@ -658,7 +658,8 @@ irc_bar_item_focus_buffer_nicklist (const void *pointer, void *data,
|
||||
ptr_nick = irc_nick_search (ptr_server, ptr_channel, nick);
|
||||
if (ptr_nick)
|
||||
{
|
||||
snprintf (str_value, sizeof (str_value), "%p", ptr_nick);
|
||||
snprintf (str_value, sizeof (str_value),
|
||||
"0x%lx", (unsigned long)ptr_nick);
|
||||
weechat_hashtable_set (info, "irc_nick", str_value);
|
||||
|
||||
if (ptr_nick->host)
|
||||
|
||||
@@ -57,7 +57,7 @@ irc_info_create_string_with_pointer (char **string, void *pointer)
|
||||
*string = malloc (64);
|
||||
if (*string)
|
||||
{
|
||||
snprintf (*string, 64, "%p", pointer);
|
||||
snprintf (*string, 64, "0x%lx", (unsigned long)pointer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,8 +143,8 @@ irc_typing_channel_set_nick (struct t_irc_channel *channel, const char *nick,
|
||||
char signal_data[1024];
|
||||
|
||||
snprintf (signal_data, sizeof (signal_data),
|
||||
"%p;%s;%s",
|
||||
channel->buffer,
|
||||
"0x%lx;%s;%s",
|
||||
(unsigned long)channel->buffer,
|
||||
(state == IRC_CHANNEL_TYPING_STATE_ACTIVE) ? "typing" :
|
||||
((state == IRC_CHANNEL_TYPING_STATE_PAUSED) ? "paused" : "off"),
|
||||
nick);
|
||||
|
||||
Reference in New Issue
Block a user