qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Separate function types from opaque types in include/qemu/typedefs.h
@ 2017-06-22 16:06 Greg Kurz
  2017-06-22 16:14 ` Peter Maydell
  0 siblings, 1 reply; 16+ messages in thread
From: Greg Kurz @ 2017-06-22 16:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Dr. David Alan Gilbert

Function types cannot reside in the same sorted list as opaque types since
they may depend on a type which would be defined later.

Of course, the same problem could arise if a function type depends on
another function type with greater alphabetical order. Hopefully we
don't have that at this time.

Signed-off-by: Greg Kurz <groug@kaod.org>
---
 include/qemu/typedefs.h |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
index f745d5faf7fd..cd3e369ae01a 100644
--- a/include/qemu/typedefs.h
+++ b/include/qemu/typedefs.h
@@ -1,10 +1,9 @@
 #ifndef QEMU_TYPEDEFS_H
 #define QEMU_TYPEDEFS_H
 
-/* A load of opaque types so that device init declarations don't have to
-   pull in all the real definitions.  */
-
-/* Please keep this list in alphabetical order */
+/* First list is for opaque types only, second one for function types.
+ * Please keep both lists in alphabetical order.
+ */
 typedef struct AdapterInfo AdapterInfo;
 typedef struct AddressSpace AddressSpace;
 typedef struct AioContext AioContext;
@@ -96,7 +95,8 @@ typedef struct uWireSlave uWireSlave;
 typedef struct VirtIODevice VirtIODevice;
 typedef struct Visitor Visitor;
 typedef struct node_info NodeInfo;
+
+typedef int  LoadStateHandler(QEMUFile *f, void *opaque, int version_id);
 typedef void SaveStateHandler(QEMUFile *f, void *opaque);
-typedef int LoadStateHandler(QEMUFile *f, void *opaque, int version_id);
 
 #endif /* QEMU_TYPEDEFS_H */

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

end of thread, other threads:[~2017-06-28  9:32 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-22 16:06 [Qemu-devel] [PATCH] Separate function types from opaque types in include/qemu/typedefs.h Greg Kurz
2017-06-22 16:14 ` Peter Maydell
2017-06-22 16:42   ` Greg Kurz
2017-06-22 17:03     ` Juan Quintela
2017-06-22 17:22       ` Peter Maydell
2017-06-22 17:25         ` Dr. David Alan Gilbert
2017-06-22 17:46           ` Greg Kurz
2017-06-22 17:50             ` Dr. David Alan Gilbert
2017-06-22 18:08               ` Thomas Huth
2017-06-22 18:11                 ` Peter Maydell
2017-06-22 18:34                   ` Dr. David Alan Gilbert
2017-06-22 19:23                     ` Greg Kurz
2017-06-26  9:27                       ` Dr. David Alan Gilbert
2017-06-23  7:11                   ` Markus Armbruster
2017-06-28  9:32                     ` Juan Quintela
2017-06-23  7:04         ` Markus Armbruster

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