Changeset 552da22 for protocols/purple


Ignore:
Timestamp:
2023-04-01T20:29:42Z (21 months ago)
Author:
GitHub <noreply@…>
Branches:
master
Children:
10425b2
Parents:
a4ac9c4
git-author:
David Cantrell <dcantrell@…> (01-04-23 20:29:42)
git-committer:
GitHub <noreply@…> (01-04-23 20:29:42)
Message:

Use g_memdup2() with glib versions >= 2.68.0 (#168)

  • Use g_memdup2() with glib versions >= 2.68.0

g_memdup() was deprecated in glib 2.68.0. The new function is
g_memdup2(). Still support building with older versions of glib via
macros.

Signed-off-by: David Cantrell <dcantrell@…>

  • Fall back to g_memdup when g_memdup2 is not available, rather than defining custom macro

Signed-off-by: David Cantrell <dcantrell@…>
Co-authored-by: Jelmer Vernooij <jelmer@…>

Location:
protocols/purple
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • protocols/purple/ft-direct.c

    ra4ac9c4 r552da22  
    7171        struct prpl_xfer_data *px = ft->data;
    7272
    73         px->buf = g_memdup(buffer, len);
     73        px->buf = g_memdup2(buffer, len);
    7474        px->buf_len = len;
    7575
  • protocols/purple/purple.c

    ra4ac9c4 r552da22  
    19371937                }
    19381938
    1939                 ret = g_memdup(&funcs, sizeof(funcs));
     1939                ret = g_memdup2(&funcs, sizeof(funcs));
    19401940                ret->name = ret->data = prot->info->id;
    19411941                if (strncmp(ret->name, "prpl-", 5) == 0) {
Note: See TracChangeset for help on using the changeset viewer.