qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 03/15] hw/ssi: Remove SSIBus from "qemu/typedefs


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 03/15] hw/ssi: Remove SSIBus from "qemu/typedefs.h"
Date: Wed, 16 Jan 2019 12:49:07 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1

On 16/01/19 12:34, Gerd Hoffmann wrote:
>   Hi,
> 
>> typedefs.h is useful to avoid rebuilding the world too often if a type
>> is used many times as a pointer, but rarely as a struct and rarely has
>> functions called on its instances.
> 
> Related:  Can also be used to keep struct content private.  struct
> QemuConsole for example is private to ui/console.c, but pointers to
> QemuConsole are passed around alot in ui/* and hw/display/* code.

True, though as we switch more and more from pointers to embedded
structs that does not work that much anymore.  Another way to do that is
to split the header in include/path/to/foo.h and path/to/foo_internal.h.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]