On Wed, May 18, 2011 at 1:52 AM, Michael Roth <mdr...@linux.vnet.ibm.com> wrote:
> Type of Visiter class that serves as the inverse of the input visiter:
> it takes a series of native C types and uses their values to construct a
> corresponding QObject. The command marshaling/dispatcher functions will
> use this to convert the output of QMP functions into a QObject that can
> be sent over the wire.
>
> Signed-off-by: Michael Roth <mdr...@linux.vnet.ibm.com>
> ---
>  qapi/qmp-output-visiter.c |  188 
> +++++++++++++++++++++++++++++++++++++++++++++
>  qapi/qmp-output-visiter.h |   14 ++++
>  2 files changed, 202 insertions(+), 0 deletions(-)
>  create mode 100644 qapi/qmp-output-visiter.c
>  create mode 100644 qapi/qmp-output-visiter.h
>
> diff --git a/qapi/qmp-output-visiter.c b/qapi/qmp-output-visiter.c
> new file mode 100644
> index 0000000..c8c03c0
> --- /dev/null
> +++ b/qapi/qmp-output-visiter.c
> @@ -0,0 +1,188 @@

License/copyright header?

> +#if 0
> +static void qmp_output_type_enum(Visiter *v, int *obj, const char *kind, 
> const char *name, Error **errp)
> +{
> +    QmpOutputVisiter *qov = to_qov(v);
> +    qmp_output_add(qov, name, qstring_from_str(qapi_enum_int2str(*obj)));
> +}
> +#else
> +static void qmp_output_type_enum(Visiter *v, int *obj, const char *kind, 
> const char *name, Error **errp)
> +{
> +    int64_t value = *obj;
> +    qmp_output_type_int(v, &value, name, errp);
> +}
> +#endif

Looks like string constants were used for enums before but now plain
integers are used instead.  Please resolve the #if 0.

Stefan

Reply via email to