Since an object instance might have a lot of bindings, using a list
might become a performance issue when removing them. Using a simple
hash table guarantees constant time lookup, which is the most common
operation.
GBinding is a simple, opaque object that represents a binding between a
property on a GObject instance (source) and property on another GObject
instance (target).
https://bugzilla.gnome.org/show_bug.cgi?id=348080
g_object_notify_by_pspec() will emit the "notify" signal on the given
pspec, short-circuiting the hash table lookup needed by
g_object_notify(). The suggested and documented way of using
g_object_notify_by_pspec() is similar to the way of emitting signals
with their ID.
Emission tests (with no handler attached to the notify signal) show a
10-15% speedup over using g_object_notify().
https://bugzilla.gnome.org/show_bug.cgi?id=615425
This adds static markers and systemtap tapsets for:
* type creation
* object lifetimes (creation, ref, unref, dispose, finalize)
* signal creation and emission
Signal emissions and finalization marker have a corresponding
*_end (or *-end in dtrace) version that is when the corresponding
operation is finished.
https://bugzilla.gnome.org/show_bug.cgi?id=606044
Add a @valuenum@ substitution that outputs the integer value of a
particular enum value. The value is determined by using (sandboxed)
perl to evaluate C expression. If evaluation fails then glib-mkenums
dies loudly. Evaluation is only enabled if '@valuenum@' appears in the
template file, so existing users will not be affected.
Currently, specifying a comment template in the template file results in
the given template being appended to the default (C-style) one rather
than replacing it.
This causes it to be replaced outright.
Bug 617940.
Don't keep the lists of source files for libglib, libgobject and
libgio in the VS project files in addition to the canonical location,
the corresponding Makefile.am files.
Instead, generate the corresponding .vcproj files at make dist time
using the C preprocessor, from template files called .vcprojin. We
still list explicitly in the .vcprojin files some of the
Windows-specific source files, and the sources files of gnulib and
pcre.
This adds the two new functions g_type_add_class_private()
and g_type_class_get_private() and a convenience macro
for the getter G_TYPE_CLASS_GET_PRIVATE().
Appease the MS C++ compiler by using _val instead of __value as a variable
name in G_VALUE_COLLECT_INIT.
Problem found by Haakon Sporsheim <haakon.sporsheim@gmail.com>.
Re-closes: bgo#608602
This way we don't need to keep a custom array that we bsearch on (and
that isn't threadsafe) but can use the gtype.c machinery that is
threadsafe. And fast, too!
https://bugzilla.gnome.org/show_bug.cgi?id=554887
This eases cleaning up these functions.
One optimization in value_set_internal() was lost in the process. It
shouldn't cause too many issues when all is said and done.
https://bugzilla.gnome.org/show_bug.cgi?id=554887
It makes the IBM XL C Compiler (the 'native' non-free compiler
on the AIX 5.3 and 6.1 platform) stop compiling with syntax error.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=581300
Signed-off-by: Javier Jardón <jjardon@gnome.org>
The reason we need to enforce this is that the GTypeValueTable
documentation explicitly states that memory is memset to 0 when the
value_init function is called.
https://bugzilla.gnome.org/show_bug.cgi?id=603590
Makes g_signal_emit_valist from 15% to 20% faster.
Results reported from profiling the pan newsreader which uses a variant
of simple and complex signal emissions (i.e no args or various args)
https://bugzilla.gnome.org/show_bug.cgi?id=603590
Most callers of G_VALUE_COLLECT previously had to initialize the GValue
and then G_VALUE_COLLECT would still go through a cleanup phase.
The new variant allows passing a unitialized GValue along with a GType
and speedup the initialization/collection process.
https://bugzilla.gnome.org/show_bug.cgi?id=603590
If threads are available we always enable threads in gobject, which
means all gio/gobject code can enable the unconditional thread calls.
This is a minor optimization since we avoid a bunch of unnecessary
is-threads-enabled checks.
https://bugzilla.gnome.org/show_bug.cgi?id=606775
This works around the need to take a custom mutex twice and add the
object to a GSList of objects that are currently in construction for the
common case. Only when the constructor is overwritten do we use the
previous behavior and allow things like singleton objects.
The only slightly incompatible change is that previously, it was ok to
call g_object_set() on construct-only properties while the object was
initialized. This will now fail. If that behavior is needed, setting a
custom constructor that just chains up will reenable this functionality.
https://bugzilla.gnome.org/show_bug.cgi?id=557151
g_type_default_interface_peek() and g_type_value_table_peek() don't need
to acquire read locks anymore when they test the refcount instead of
node->data.