[mutter] cleanup: Don't use g_memmove()
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] cleanup: Don't use g_memmove()
- Date: Thu, 18 Jul 2019 09:12:26 +0000 (UTC)
commit 4fdefb5b2ed29d489d54493e7c721b59b973db63
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Jul 17 17:31:40 2019 +0200
cleanup: Don't use g_memmove()
Glib stopped providing any fallback implementations on systems without
memmove() all the way back in 2013. Since then, the symbol is a simple
macro around memmove(); use that function directly now that glib added
a deprecation warning.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/689
clutter/clutter/clutter-text-buffer.c | 4 ++--
src/ui/theme.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/clutter/clutter/clutter-text-buffer.c b/clutter/clutter/clutter-text-buffer.c
index f3a40d6fe..7c3f0840b 100644
--- a/clutter/clutter/clutter-text-buffer.c
+++ b/clutter/clutter/clutter-text-buffer.c
@@ -171,7 +171,7 @@ clutter_text_buffer_normal_insert_text (ClutterTextBuffer *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 */
@@ -201,7 +201,7 @@ clutter_text_buffer_normal_delete_text (ClutterTextBuffer *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);
diff --git a/src/ui/theme.c b/src/ui/theme.c
index 6817b5beb..9b8ddff63 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -566,7 +566,7 @@ meta_frame_layout_calc_geometry (MetaFrameLayout *layout,
}
else
- g_memmove (&(rect->clickable), &(rect->visible), sizeof(rect->clickable));
+ memmove (&(rect->clickable), &(rect->visible), sizeof (rect->clickable));
x = rect->visible.x - layout->button_margin.left * scale;
@@ -613,7 +613,7 @@ meta_frame_layout_calc_geometry (MetaFrameLayout *layout,
rect->clickable.height = button_height + button_y;
}
else
- g_memmove (&(rect->clickable), &(rect->visible), sizeof(rect->clickable));
+ memmove (&(rect->clickable), &(rect->visible), sizeof (rect->clickable));
x = rect->visible.x + rect->visible.width + layout->button_margin.right * scale;
if (i < n_left - 1)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]