diff mbox

[3/7] forward declare all QObject subclasses in qobject.h

Message ID 1255766136-3028-4-git-send-email-pbonzini@redhat.com
State New
Headers show

Commit Message

Paolo Bonzini Oct. 17, 2009, 7:55 a.m. UTC
This gives more freedom to define prototypes without dragging in
the whole header files.

Cc: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 qobject.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

Comments

Anthony Liguori Oct. 17, 2009, 1:02 p.m. UTC | #1
Paolo Bonzini wrote:
> This gives more freedom to define prototypes without dragging in
> the whole header files.
>
> Cc: Luiz Capitulino <lcapitulino@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  qobject.h |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/qobject.h b/qobject.h
> index 200644d..f5c78b2 100644
> --- a/qobject.h
> +++ b/qobject.h
> @@ -44,6 +44,10 @@ typedef enum {
>  } qtype_code;
>  
>  struct QObject;
> +struct QInt;
> +struct QString;
> +struct QDict;
> +struct QList;
>   

This seems like a layering violation to me.

Regards,

Anthony Liguori
diff mbox

Patch

diff --git a/qobject.h b/qobject.h
index 200644d..f5c78b2 100644
--- a/qobject.h
+++ b/qobject.h
@@ -44,6 +44,10 @@  typedef enum {
 } qtype_code;
 
 struct QObject;
+struct QInt;
+struct QString;
+struct QDict;
+struct QList;
 
 typedef struct QType {
     qtype_code code;