qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Revert "target-arm: Avoid g_hash_table_get_keys()"
@ 2015-05-27 17:51 Markus Armbruster
  2015-06-01 16:48 ` Peter Maydell
  0 siblings, 1 reply; 2+ messages in thread
From: Markus Armbruster @ 2015-05-27 17:51 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell

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

This reverts commit 82a3a11897308b606120f7235001e87809708f85.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 target-arm/helper.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/target-arm/helper.c b/target-arm/helper.c
index 5d0f011..56c764a 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -294,23 +294,15 @@ static gint cpreg_key_compare(gconstpointer a, gconstpointer b)
     return 0;
 }
 
-static void cpreg_make_keylist(gpointer key, gpointer value, gpointer udata)
-{
-    GList **plist = udata;
-
-    *plist = g_list_prepend(*plist, key);
-}
-
 void init_cpreg_list(ARMCPU *cpu)
 {
     /* Initialise the cpreg_tuples[] array based on the cp_regs hash.
      * Note that we require cpreg_tuples[] to be sorted by key ID.
      */
-    GList *keys = NULL;
+    GList *keys;
     int arraylen;
 
-    g_hash_table_foreach(cpu->cp_regs, cpreg_make_keylist, &keys);
-
+    keys = g_hash_table_get_keys(cpu->cp_regs);
     keys = g_list_sort(keys, cpreg_key_compare);
 
     cpu->cpreg_array_len = 0;
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] Revert "target-arm: Avoid g_hash_table_get_keys()"
  2015-05-27 17:51 [Qemu-devel] [PATCH] Revert "target-arm: Avoid g_hash_table_get_keys()" Markus Armbruster
@ 2015-06-01 16:48 ` Peter Maydell
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Maydell @ 2015-06-01 16:48 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: QEMU Developers

On 27 May 2015 at 18:51, Markus Armbruster <armbru@redhat.com> wrote:
> Since we now require GLib 2.22+ (commit f40685c), we don't have to
> work around lack of g_hash_table_get_keys() anymore.
>
> This reverts commit 82a3a11897308b606120f7235001e87809708f85.
>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  target-arm/helper.c | 12 ++----------
>  1 file changed, 2 insertions(+), 10 deletions(-)



Applied to target-arm.next, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-01 16:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-27 17:51 [Qemu-devel] [PATCH] Revert "target-arm: Avoid g_hash_table_get_keys()" Markus Armbruster
2015-06-01 16:48 ` Peter Maydell

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).