From: "Daniel P. Berrange" <berrange@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"David Gilbert" <david.gilbert@linaro.org>,
"Andreas Färber" <afaerber@suse.de>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"QEMU Developers" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PULL 00/12] QOM devices patch queue 2015-05-20
Date: Fri, 29 May 2015 15:08:24 +0100 [thread overview]
Message-ID: <20150529140824.GB10986@redhat.com> (raw)
In-Reply-To: <CAFEAcA9p3yG4g2xFK4QMUFkA8_5aHCfp0kSAruw=9ifzf256Og@mail.gmail.com>
On Fri, May 29, 2015 at 02:57:12PM +0100, Peter Maydell wrote:
> On 29 May 2015 at 14:51, Daniel P. Berrange <berrange@redhat.com> wrote:
> > Since that caused failure with glib 2.22 could you revert that switch
> > to g_assert_null/nonnull.
>
> BTW, David Gilbert is looking at whether we can use the glib support
> to make use of "newer than version X" APIs a compile error everywhere
> rather than just on boxes with the older glib, which should help
> cut down on this kind of problem in future.
It seem these g_assert_nonnull/null functions are in fact just trivial
macros, so we could alternatively add them to our glib-compat.h file
#define g_assert_true(expr) G_STMT_START { \
if G_LIKELY (expr) ; else \
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
"'" #expr "' should be TRUE"); \
} G_STMT_END
#define g_assert_false(expr) G_STMT_START { \
if G_LIKELY (!(expr)) ; else \
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
"'" #expr "' should be FALSE"); \
} G_STMT_END
#define g_assert_null(expr) G_STMT_START { if G_LIKELY ((expr) == NULL) ; else \
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
"'" #expr "' should be NULL"); \
} G_STMT_END
#define g_assert_nonnull(expr) G_STMT_START { \
if G_LIKELY ((expr) != NULL) ; else \
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
"'" #expr "' should not be NULL"); \
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
next prev parent reply other threads:[~2015-05-29 14:08 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-20 15:51 [Qemu-devel] [PULL 00/12] QOM devices patch queue 2015-05-20 Andreas Färber
2015-05-20 15:51 ` [Qemu-devel] [PULL 01/12] qom: strdup() target property name on object_property_add_alias() Andreas Färber
2015-05-20 15:51 ` [Qemu-devel] [PULL 02/12] qdev: Free property names after registering gpio aliases Andreas Färber
2015-05-20 15:51 ` [Qemu-devel] [PULL 03/12] tests: Use qtest_add_data_func() consistently Andreas Färber
2015-05-20 15:51 ` [Qemu-devel] [PULL 04/12] scripts: Add support for path as argument of qom-tree Andreas Färber
2015-05-20 15:51 ` [Qemu-devel] [PULL 05/12] backends: Fix typename of 'policy' enum property in hostmem obj Andreas Färber
2015-05-20 15:51 ` [Qemu-devel] [PULL 06/12] doc: Document user creatable object types in help text Andreas Färber
2015-05-20 15:51 ` [Qemu-devel] [PULL 07/12] vl: Create (most) objects before creating chardev backends Andreas Färber
2015-05-20 15:51 ` [Qemu-devel] [PULL 08/12] qom: Add helper method for getting user objects root Andreas Färber
2015-05-20 15:51 ` [Qemu-devel] [PULL 09/12] qom: Add object_new_with_props() / object_new_withpropv() helpers Andreas Färber
2015-05-20 15:51 ` [Qemu-devel] [PULL 10/12] qom: Make enum string tables const-correct Andreas Färber
2015-05-20 15:51 ` [Qemu-devel] [PULL 11/12] qom: Add an object_property_add_enum() helper function Andreas Färber
2015-05-20 15:51 ` [Qemu-devel] [PULL 12/12] qom: Add object_property_add_const_link() Andreas Färber
2015-05-21 11:18 ` [Qemu-devel] [PULL 00/12] QOM devices patch queue 2015-05-20 Peter Maydell
2015-05-21 11:53 ` Daniel P. Berrange
2015-05-27 18:16 ` Andreas Färber
2015-05-29 13:51 ` Daniel P. Berrange
2015-05-29 13:57 ` Peter Maydell
2015-05-29 14:08 ` Daniel P. Berrange [this message]
2015-05-29 14:14 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150529140824.GB10986@redhat.com \
--to=berrange@redhat.com \
--cc=afaerber@suse.de \
--cc=david.gilbert@linaro.org \
--cc=ehabkost@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.