forked from AuroraMiddleware/gtk
Replace uses of g_memmove() by memmove()
g_memmove() is deprecated, it is a simple macro that just calls memmove() with the same parameters. Reviewed by Paolo Borelli on IRC.
This commit is contained in:
parent
e79348eafe
commit
3f4b9d8164
@ -500,8 +500,8 @@ quick_accel_add (GtkAccelGroup *accel_group,
|
||||
|
||||
/* insert at position, ref closure */
|
||||
accel_group->priv->priv_accels = g_renew (GtkAccelGroupEntry, accel_group->priv->priv_accels, accel_group->priv->n_accels);
|
||||
g_memmove (accel_group->priv->priv_accels + pos + 1, accel_group->priv->priv_accels + pos,
|
||||
(i - pos) * sizeof (accel_group->priv->priv_accels[0]));
|
||||
memmove (accel_group->priv->priv_accels + pos + 1, accel_group->priv->priv_accels + pos,
|
||||
(i - pos) * sizeof (accel_group->priv->priv_accels[0]));
|
||||
accel_group->priv->priv_accels[pos].key.accel_key = accel_key;
|
||||
accel_group->priv->priv_accels[pos].key.accel_mods = accel_mods;
|
||||
accel_group->priv->priv_accels[pos].key.accel_flags = accel_flags;
|
||||
@ -564,8 +564,8 @@ quick_accel_remove (GtkAccelGroup *accel_group,
|
||||
|
||||
/* physically remove */
|
||||
accel_group->priv->n_accels -= 1;
|
||||
g_memmove (entry, entry + 1,
|
||||
(accel_group->priv->n_accels - pos) * sizeof (accel_group->priv->priv_accels[0]));
|
||||
memmove (entry, entry + 1,
|
||||
(accel_group->priv->n_accels - pos) * sizeof (accel_group->priv->priv_accels[0]));
|
||||
|
||||
/* and notify */
|
||||
if (accel_quark)
|
||||
|
@ -166,7 +166,7 @@ gtk_entry_buffer_normal_insert_text (GtkEntryBuffer *buffer,
|
||||
|
||||
/* Actual text insertion */
|
||||
at = g_utf8_offset_to_pointer (pv->normal_text, position) - pv->normal_text;
|
||||
g_memmove (pv->normal_text + at + n_bytes, pv->normal_text + at, pv->normal_text_bytes - at);
|
||||
memmove (pv->normal_text + at + n_bytes, pv->normal_text + at, pv->normal_text_bytes - at);
|
||||
memcpy (pv->normal_text + at, chars, n_bytes);
|
||||
|
||||
/* Book keeping */
|
||||
@ -196,7 +196,7 @@ gtk_entry_buffer_normal_delete_text (GtkEntryBuffer *buffer,
|
||||
start = g_utf8_offset_to_pointer (pv->normal_text, position) - pv->normal_text;
|
||||
end = g_utf8_offset_to_pointer (pv->normal_text, position + n_chars) - pv->normal_text;
|
||||
|
||||
g_memmove (pv->normal_text + start, pv->normal_text + end, pv->normal_text_bytes + 1 - end);
|
||||
memmove (pv->normal_text + start, pv->normal_text + end, pv->normal_text_bytes + 1 - end);
|
||||
pv->normal_text_chars -= n_chars;
|
||||
pv->normal_text_bytes -= (end - start);
|
||||
|
||||
|
@ -4410,9 +4410,9 @@ _gtk_text_buffer_get_line_log_attrs (GtkTextBuffer *buffer,
|
||||
|
||||
/* Not in cache; open up the first cache entry */
|
||||
g_free (cache->entries[ATTR_CACHE_SIZE-1].attrs);
|
||||
|
||||
g_memmove (cache->entries + 1, cache->entries,
|
||||
sizeof (CacheEntry) * (ATTR_CACHE_SIZE - 1));
|
||||
|
||||
memmove (cache->entries + 1, cache->entries,
|
||||
sizeof (CacheEntry) * (ATTR_CACHE_SIZE - 1));
|
||||
|
||||
cache->entries[0].line = line;
|
||||
cache->entries[0].attrs = compute_log_attrs (anywhere_in_line,
|
||||
|
@ -5202,7 +5202,7 @@ lines_window_back (LinesWindow *win)
|
||||
}
|
||||
|
||||
/* Move lines to make room for first line. */
|
||||
g_memmove (win->lines + 1, win->lines, win->n_lines * sizeof (gchar*));
|
||||
memmove (win->lines + 1, win->lines, win->n_lines * sizeof (gchar*));
|
||||
|
||||
*win->lines = line_text;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user