|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] [PATCH 10/30] qdev: don't access name through info |
Date: | Tue, 03 Jan 2012 07:39:01 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110922 Lightning/1.0b2 Thunderbird/3.1.15 |
On 01/03/2012 03:06 AM, Paolo Bonzini wrote:
On 01/03/2012 01:51 AM, Anthony Liguori wrote:d->nic = qemu_new_nic(&net_e1000_info,&d->conf, - qdev_get_info(&d->dev.qdev)->name, d->dev.qdev.id, d); + object_get_typename(OBJECT(d)), d->dev.qdev.id, d);It's a pity that this loses type-safety.
You mean at run time or because OBJECT() cast is so lose? We can fix the later.. Regards, Anthony Liguori
Perhaps we should look at adding a warning for "unsafe" pointer casts to GCC. Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |