1
1
mirror of https://gitlab.gnome.org/GNOME/gimp.git synced 2025-10-06 01:12:40 +02:00

app, libgimp*, pdb, plug-ins: use g_memdup2() instead of g_memdup()

Since it appeared with GLib 2.68.0, we could not change this until we
bumped the dependency which has only become possible a few days ago
(since Debian testing is our baseline for dependency bumps). Cf.
previous commit.

As this is a drop-in replacement (just a guint parameter changed to
gsize to avoid integer overflow), search-and-replace with:

> sed -i 's/g_memdup\>/g_memdup2/g' `grep -rIl 'g_memdup\>' *`

… followed by a few manual alignment tweaks when necessary.

This gets rid of the many deprecation warnings which we had lately when
building with a recent GLib version.
This commit is contained in:
Jehan
2021-08-26 17:18:32 +02:00
parent d707e4cb1a
commit 49e534247a
69 changed files with 141 additions and 141 deletions

View File

@@ -200,7 +200,7 @@ gimp_param_spec_matrix2 (const gchar *name,
static GimpMatrix2 *
matrix2_copy (const GimpMatrix2 *matrix)
{
return (GimpMatrix2 *) g_memdup (matrix, sizeof (GimpMatrix2));
return (GimpMatrix2 *) g_memdup2 (matrix, sizeof (GimpMatrix2));
}
@@ -463,7 +463,7 @@ gimp_param_spec_matrix3 (const gchar *name,
static GimpMatrix3 *
matrix3_copy (const GimpMatrix3 *matrix)
{
return (GimpMatrix3 *) g_memdup (matrix, sizeof (GimpMatrix3));
return (GimpMatrix3 *) g_memdup2 (matrix, sizeof (GimpMatrix3));
}