Commit c447bc7f authored by Thomas Haller's avatar Thomas Haller

gobject: don't use G_STRLOC in G_OBJECT_WARN_INVALID_PSPEC() macro

Using G_STRLOC ends up embedding unique strings of the form
__FILE__:__LINE__ in the compiled binary. We can avoid these
by passing __FILE__ and __LINE__ separately when constructing
the warning text.
This probably reduces the size of the binary as __FILE__ is
likely already contained as string otherwise.

Note that for GCC 2.x this changes behavior because G_STRLOC
also contained __PRETTY_FUNCTION__.

https://bugzilla.gnome.org/show_bug.cgi?id=741654
parent d951db42
......@@ -627,8 +627,8 @@ G_STMT_START { \
GObject *_glib__object = (GObject*) (object); \
GParamSpec *_glib__pspec = (GParamSpec*) (pspec); \
guint _glib__property_id = (property_id); \
g_warning ("%s: invalid %s id %u for \"%s\" of type '%s' in '%s'", \
G_STRLOC, \
g_warning ("%s:%u: invalid %s id %u for \"%s\" of type '%s' in '%s'", \
__FILE__, __LINE__, \
(pname), \
_glib__property_id, \
_glib__pspec->name, \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment