Skip to content
  • Markus Armbruster's avatar
    15280c36
    qdict qlist: Make most helper macros functions · 15280c36
    Markus Armbruster authored
    
    
    The macro expansions of qdict_put_TYPE() and qlist_append_TYPE() need
    qbool.h, qnull.h, qnum.h and qstring.h to compile.  We include qnull.h
    and qnum.h in the headers, but not qbool.h and qstring.h.  Works,
    because we include those wherever the macros get used.
    
    Open-coding these helpers is of dubious value.  Turn them into
    functions and drop the includes from the headers.
    
    This cleanup makes the number of objects depending on qapi/qmp/qnum.h
    from 4551 (out of 4743) to 46 in my "build everything" tree.  For
    qapi/qmp/qnull.h, the number drops from 4552 to 21.
    
    Reviewed-by: default avatarEric Blake <eblake@redhat.com>
    Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
    Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
    Message-Id: <20180201111846.21846-10-armbru@redhat.com>
    15280c36
    qdict qlist: Make most helper macros functions
    Markus Armbruster authored
    
    
    The macro expansions of qdict_put_TYPE() and qlist_append_TYPE() need
    qbool.h, qnull.h, qnum.h and qstring.h to compile.  We include qnull.h
    and qnum.h in the headers, but not qbool.h and qstring.h.  Works,
    because we include those wherever the macros get used.
    
    Open-coding these helpers is of dubious value.  Turn them into
    functions and drop the includes from the headers.
    
    This cleanup makes the number of objects depending on qapi/qmp/qnum.h
    from 4551 (out of 4743) to 46 in my "build everything" tree.  For
    qapi/qmp/qnull.h, the number drops from 4552 to 21.
    
    Reviewed-by: default avatarEric Blake <eblake@redhat.com>
    Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
    Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
    Message-Id: <20180201111846.21846-10-armbru@redhat.com>
Loading