[gdk-pixbuf/master-next: 2/2] Remove uses of g_memmove()
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdk-pixbuf/master-next: 2/2] Remove uses of g_memmove()
- Date: Sat, 29 Jun 2019 14:47:41 +0000 (UTC)
commit 36b5927e83fe73105fccd4f656f5e60eb04d3961
Author: Emmanuele Bassi <ebassi gnome org>
Date: Sat Jun 29 15:37:10 2019 +0100
Remove uses of g_memmove()
There's no reason to use g_memmove() instead of memmove().
The `g_memmove()` wrapper was a symbol internal to GLib between 2004 and
2013, when it was exposed as a plain C pre-processor symbol around C90's
memmove(). Starting from GLib 2.61, using g_memmove() is going to raise
a deprecation warning from the compiler.
gdk-pixbuf/io-tga.c | 2 +-
tests/pixbuf-randomly-modified.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gdk-pixbuf/io-tga.c b/gdk-pixbuf/io-tga.c
index c007ce583..2f752f602 100644
--- a/gdk-pixbuf/io-tga.c
+++ b/gdk-pixbuf/io-tga.c
@@ -581,7 +581,7 @@ tga_load_header (TGAContext *ctx,
_("Cannot allocate TGA header memory"));
return FALSE;
}
- g_memmove(ctx->hdr, g_bytes_get_data (bytes, NULL), sizeof(TGAHeader));
+ memmove(ctx->hdr, g_bytes_get_data (bytes, NULL), sizeof(TGAHeader));
g_bytes_unref (bytes);
#ifdef DEBUG_TGA
g_print ("infolen %d "
diff --git a/tests/pixbuf-randomly-modified.c b/tests/pixbuf-randomly-modified.c
index 8b380a097..932e53cbc 100644
--- a/tests/pixbuf-randomly-modified.c
+++ b/tests/pixbuf-randomly-modified.c
@@ -41,7 +41,7 @@ randomly_modify (const gchar *image, guint size)
int i, n;
guchar *img_copy = g_malloc (size);
- g_memmove (img_copy, image, size);
+ memmove (img_copy, image, size);
n = MIN (100, size / 4);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]