1
0
mirror of https://github.com/irssi/irssi.git synced 2024-06-30 06:45:25 +00:00

compatibility code for old GLib

This commit is contained in:
Ailin Nemui 2022-02-05 23:24:52 +01:00
parent 17f185d833
commit 5cd13d6ea2

View File

@ -84,6 +84,23 @@ static const unichar bp_end[] = { 0x1b, '[', '2', '0', '1', '~' };
#define BRACKETED_PASTE_TIMEOUT (5 * 1000) // ms
#if GLIB_CHECK_VERSION(2, 62, 0)
/* nothing */
#else
/* compatibility code for old GLib */
GArray *g_array_copy(GArray *array)
{
GArray *out;
guint elt_size;
elt_size = g_array_get_element_size(array);
out = g_array_sized_new(FALSE, FALSE, elt_size, array->len);
memcpy(out->data, array->data, array->len * elt_size);
return out;
}
#endif
static void sig_input(void);
void input_listen_init(int handle)