qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: mst@redhat.com
Subject: [Qemu-devel] [PATCH 1/3] Revert "aml-build: fix build for glib < 2.22"
Date: Wed, 27 May 2015 19:55:53 +0200	[thread overview]
Message-ID: <1432749355-4960-2-git-send-email-armbru@redhat.com> (raw)
In-Reply-To: <1432749355-4960-1-git-send-email-armbru@redhat.com>

Since we now require GLib 2.22+ (commit f40685c), we don't have to
work around lack of g_ptr_array_new_with_free_func() anymore.

This reverts commit 2e5feadbf8133b9b108919a2f576943b448a1a06.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 hw/acpi/aml-build.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index 77ce00b..65c9d00 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -301,7 +301,7 @@ static Aml *aml_bundle(uint8_t op, AmlBlockFlags flags)
     return var;
 }
 
-static void aml_free(gpointer data, gpointer user_data)
+static void aml_free(gpointer data)
 {
     Aml *var = data;
     build_free_array(var->buf);
@@ -312,14 +312,13 @@ Aml *init_aml_allocator(void)
     Aml *var;
 
     assert(!alloc_list);
-    alloc_list = g_ptr_array_new();
+    alloc_list = g_ptr_array_new_with_free_func(aml_free);
     var = aml_alloc();
     return var;
 }
 
 void free_aml_allocator(void)
 {
-    g_ptr_array_foreach(alloc_list, aml_free, NULL);
     g_ptr_array_free(alloc_list, true);
     alloc_list = 0;
 }
-- 
1.9.3

  reply	other threads:[~2015-05-27 17:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-27 17:55 [Qemu-devel] [PATCH 0/3] acpi: Clean up some GLib compatibility cruft Markus Armbruster
2015-05-27 17:55 ` Markus Armbruster [this message]
2015-05-27 17:55 ` [Qemu-devel] [PATCH 2/3] acpi: Drop superfluous GLIB_CHECK_VERSION() Markus Armbruster
2015-05-27 17:55 ` [Qemu-devel] [PATCH 3/3] acpi: Simplify printing to dynamic string Markus Armbruster
2015-05-28 18:51 ` [Qemu-devel] [PATCH 0/3] acpi: Clean up some GLib compatibility cruft John Snow
2015-05-29  8:57 ` Igor Mammedov
2015-06-08 11:00 ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1432749355-4960-2-git-send-email-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).