The n_children variable can be written when locked, while the n_supers
variable is read at any time. As they both share the same bytes,
accessing them is not threadsafe.
This patch puts them into different bytes.
Thanks to Xan Lopez and valgrind for noticing this.
Store whether the object has a toggleref before decrementing the
refcount to prevent race condition when two threads simultaneously
try to unref an object with a refcount of 2.
Patch by Antoine Tremblay.
https://bugzilla.gnome.org/show_bug.cgi?id=551706
This avoids a bunch of code and makes construction of simple objects
faster.
Object construction performance improvement:
Non-Threaded Threaded
Simple: 14% 5%
Complex: -1.1% -2.2%
Other tests stable.
https://bugzilla.gnome.org/show_bug.cgi?id=557100
If the class has no properties there could be no notification anyway.
This is an important optimization for construction of simple objects.
Object construction performance improvement:
Non-Threaded Threaded
Simple: 84% 91%
Complex: -1.4% -0.6%
Other tests stable.
https://bugzilla.gnome.org/show_bug.cgi?id=557100
This is both cleaner and faster (it avoids function calls and
zeroing the memory twice).
Object construction performance improvement:
Non-Threaded Threaded
Simple: 11% 1.3%
Complex: 8% 6%
Other tests stable.
https://bugzilla.gnome.org/show_bug.cgi?id=557100
Commit 789e260638 tried to add support for -?, but there is a typo
and instead -h was added when already present instead of -? for one
of the cases.
It works without this corrections, because all unrecognized options
trigger usage showing as well, but this is more correct.
This was bug 556706 originally.
Tools like clang fail to recognize that stanzas like
g_return_if_fail (GTK_IS_FOO (w)) guarantee w != NULL. By minimally
rewriting the type-checking macros, we can avoid these false positives.
Since @filename@ contains the full filename as given to the glib-mkenum
command, possibly including path elements (e.g. when using a non-srcdir
build), it is unsuitable to use in a #include statement in the generated
file if one wants to distribute it. This patch adds @basename@ which
expands to the base name of the input filename. Bug #587307.
Update various README files to refer to git instead of svn.
Add a README.commits that is pretty much a copy of the same file
in GTK+. Also discontinue ChangeLog files.
2009-03-13 Kristian Rietveld <kris@imendio.com>
* gsignal.c (signal_lookup_closure): when defaulting to the only
item in the array, check if this is indeed the default closure.
(patch by Tim Janik).
svn path=/trunk/; revision=7979
GLib users buildable with gcc 4.4. Patch by Jakub Jelinek.
* glib/gatomic.[hc]: Add G_GNUC_MAY_ALIAS to pointer arguments,
fix macro versions to only operate on objects of the same size.
* glib/gdataset.c:
* glib/gthread.[hc]:
* glib/gdatasetprivate.h: Remove unnecessary casts in
g_atomic_pointer_get calls.
svn path=/trunk/; revision=7875
* configure.in: Define an ENABLE_REGEX macro
* gobject/gboxed.c: Don't refer to g_regex_ref if ENABLE_REGEX
is not defined.
svn path=/trunk/; revision=7815
2009-01-02 Behdad Esfahbod <behdad@gnome.org>
Bug 565136 – Gobject's "notify" signal parameters are wrong in gtk-doc
Patch from Andrzej Zaborowski
* gobject.c (g_object_do_class_init): Fix param order in docs.
svn path=/trunk/; revision=7759
* gtypemodule.c (g_type_module_use): Always reset the use count
to its previous value before returning FALSE. Pointed out by
Johan Billien.
svn path=/trunk/; revision=7725