Re: [Qemu-devel] [PATCH 1/3] qmp-event: Avoid qobject_from_jsonf("%"PRId64)

2016-11-23 Thread Eric Blake
On 11/23/2016 07:56 AM, Eric Blake wrote: >> >> In my opinion, the code becomes less readable. >> >> We want to convert struct timeval members tv_sec (of type time_t) and >> tv_usec (of type suseconds_t) here. Since qobject_from_jsonf() lacks >> conversion specifiers for time_t and suseconds_t, N

Re: [Qemu-devel] [PATCH 1/3] qmp-event: Avoid qobject_from_jsonf("%"PRId64)

2016-11-23 Thread Markus Armbruster
Eric Blake writes: > The qobject_from_jsonf() function implements a pseudo-printf > language for creating a QObject; however, it is hard-coded to > only parse a subset of formats understood by printf(). In > particular, any use of a 64-bit integer works only if the > system's definition of PRId6

Re: [Qemu-devel] [PATCH 1/3] qmp-event: Avoid qobject_from_jsonf("%"PRId64)

2016-11-23 Thread Eric Blake
On 11/23/2016 07:45 AM, Markus Armbruster wrote: > Eric Blake writes: > >> The qobject_from_jsonf() function implements a pseudo-printf >> language for creating a QObject; however, it is hard-coded to >> only parse a subset of formats understood by printf(). In >> particular, any use of a 64-bit

[Qemu-devel] [PATCH 1/3] qmp-event: Avoid qobject_from_jsonf("%"PRId64)

2016-11-22 Thread Eric Blake
The qobject_from_jsonf() function implements a pseudo-printf language for creating a QObject; however, it is hard-coded to only parse a subset of formats understood by printf(). In particular, any use of a 64-bit integer works only if the system's definition of PRId64 matches what the parser expec