|
From: | Richard Henderson |
Subject: | Re: [Qemu-devel] [RFC PATCH 01/13] Generic DMA memory access interface |
Date: | Wed, 01 Jun 2011 08:45:56 -0700 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Thunderbird/3.1.10 |
On 06/01/2011 08:35 AM, Eduard - Gabriel Munteanu wrote: > Maybe it's not nice, but you're missing the fact upcasting gives you > some type safety. With opaques you have none. Lol. Do you understand what container_of does? This is not dynamic_cast<> with RTTI. You can put any type name in there that you like, so long as it has a field name to match. The type of the field you give doesn't even have to match the type of the pointer that you pass in. Type safety this is not. r~
[Prev in Thread] | Current Thread | [Next in Thread] |