|
From: | Eduardo Habkost |
Subject: | [Qemu-devel] Why do we typedef every struct on QEMU? |
Date: | Tue, 17 Jul 2018 16:50:28 -0300 |
User-agent: | Mutt/1.9.2 (2017-12-15) |
I have been looking at patches that touch typedefs.h and wondering: why do we make typedefs.h necessary at all? Why do we always add typedefs for every struct and union type in QEMU? Why do we prefer to write this: ----- qemu/typedefs.h: typedef struct SomeType SomeType; ---------------------- ----- qemu/somecode.h: #include <qemu/typedefs.h> int some_function(SomeType *a); ---------------------- ...instead of simply writing this:? ----- qemu/somecode.h: struct SomeType; int some_function(struct SomeType *a); ---------------------- Is the maintenance burden of typedefs.h worth it? -- Eduardo
[Prev in Thread] | Current Thread | [Next in Thread] |