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
2008-08-22 Björn Lindqvist <bjourne@gmail.com>
Bug 523939 – Example program for GValue
* gobject/gvalue.c: Add code example that demonstrates GValue's
features.
svn path=/trunk/; revision=7387
2008-08-21 Johan Dahlin <johan@gnome.org>
* gobject.h:
Mark g_object_get_type function as const, it's
a fundamental type and can safely marked as const,
as opposed to traditionally *_get_type functions.
svn path=/trunk/; revision=7378
2008-08-20 Johan Dahlin <johan@gnome.org>
Bug 548689 – The type name for GParamSpec is wrong
* gparam.c (g_param_type_init):
Register the type name as GParam instead of GParamSpec.
svn path=/trunk/; revision=7374
2008-07-27 Tor Lillqvist <tml@novell.com>
* gtype.h
* gtype.c: Revert my change from 2008-07-24. No G_TYPE_FORMAT is
needed. Just use G_GSIZE_FORMAT always when printing GType values.
svn path=/trunk/; revision=7256
2008-07-27 Tor Lillqvist <tml@novell.com>
* configure.in: Set LIB_EXE_MACHINE_FLAG to either X86 or X64 on
Windows. AC_SUBST it.
* */Makefile.am: Correspondingly, pass appropriate -machine
flag to lib.exe when producing the import library for the MS
toolchain.
svn path=/trunk/; revision=7255
2008-07-24 Tor Lillqvist <tml@novell.com>
* gtype.h: Define G_TYPE_FORMAT as the printf format for a GType
value. Either G_GSIZE_FORMAT or "lu".
* gtype.c: Use it instead of the C99 zu.
svn path=/trunk/; revision=7250
2008-07-21 Michael Natterer <mitch@imendio.com>
Reviewed by Tim Janik:
* gsignal.c (g_signal_chain_from_overridden_handler): allocate
the temp GValue array with GSLice.
(g_signal_emit_valist): dito. Remove optimization/obfuscation of
allocating up to 16 GValues on the stack and always use GSLice.
svn path=/trunk/; revision=7229
2008-07-04 Michael Natterer <mitch@imendio.com>
Bug 541208 – Functions to easily install and use signals without
class struct slot
* gobject.symbols
* gsignal.[ch] (g_signal_new_class_handler): the same as
_gtk_binding_signal_new(), to install signals with a callback
instead of a class struct slot as class closure.
The next two functions are C convenience and much easier to use
than the generic overriding and chaining APIs which are intended
primarily for language bindings:
(g_signal_override_class_handler): to override a signal with a
callback instead of a class struct slot.
(g_signal_chain_from_overridden_handler): to chain up from a
signal without class struct slot. The API is similar to
g_signal_emit().
svn path=/trunk/; revision=7157
2008-06-29 Björn Lindqvist <bjourne@gmail.com>
Bug 539626 – Update docstrings for g_object_freeze_notify and
g_object_thaw_notify
* gobject/gobject.c: Explain how the freeze count works.
svn path=/trunk/; revision=7102
2008-06-27 Hans Breuer <hans@breuer.org>
* glib-genmarshal.c : move G_OS_WIN32 inclusion of <io.h> down to
where G_OS_WIN32 will be defined (#540047, Kazuki IWAMOTO)
svn path=/trunk/; revision=7100
2008-06-23 Kristian Rietveld <kris@imendio.com>
* gobject/glib-mkenums.in: introduce an ENUMPREFIX substitution.
* gio/gioenumtypes.h.template: use @ENUMPREFIX@ instead of
hard coding "G" as prefix.
svn path=/trunk/; revision=7096
2008-06-22 Michael Natterer <mitch@imendio.com>
* *.c: remove trailing whitespace from newly added gtk-doc
comments and reformatted some where they contained overly long or
ill-formatted lines.
svn path=/trunk/; revision=7090
2008-06-22 Michael Natterer <mitch@imendio.com>
* *.c: moved includes back to the top of the files (before gtk-doc
SECTION comments). Add "config.h" in all files and move system
included before glib includes. Remove trailing whitespace from
SECTION comments and did some reformatting where lines were overly
long, no documentation content was changed.
svn path=/trunk/; revision=7089
* docs/reference/gobject/tmpl/gobject-unused.sgml:
* gobject/gobject.h:
* gobject/gtype.c:
* gobject/gtype.h:
Move some content for gobject-unused.sgml and cleared empty entries.
The remaining 4 ones should be checked by some else. If they are not
needed. The file can be removed.
svn path=/trunk/; revision=7087
* gobject/gboxed.c:
* gobject/gclosure.c:
* gobject/genums.c:
* gobject/gvalue.c:
Use file-names from the section file for SECTION: comments.
svn path=/trunk/; revision=7072
2008-06-10 13:34:01 Tim Janik <timj@imendio.com>
* tests/threadtests.c: added race condition tester from Michael Meeks
with a couple fixes so it's not triggering development warnings. From:
Bug 537555 - GObject instantiation not thread safe ...
svn path=/trunk/; revision=6983
2008-06-10 13:15:29 Tim Janik <timj@imendio.com>
* gtype.c (g_type_class_ref): fixed race condition where references to
partially initialized classes could be handed out.
svn path=/trunk/; revision=6982
2008-05-28 Michael Natterer <mitch@imendio.com>
* Makefile.am: don't define G_DISABLE_SINGLE_INCLUDES, it's in
the global CPPFLAGS now.
svn path=/trunk/; revision=6952
2008-05-05 Michael Natterer <mitch@imendio.com>
* Makefile.am. build with G_DISABLE_SINGLE_INCLUDES to prevent
code from being checked in that breaks the build of applications
which use G_DISABLE_SINGLE_INCLUDES.
svn path=/trunk/; revision=6876
2008-04-21 Tor Lillqvist <tml@novell.com>
* configure.in
* */Makefile.am: More work on enabling static building on
Windows. When building statically: Also define
GOBJECT_STATIC_COMPILATION in glibconfig.h so that also the
variables in gparamspecs.h get declared without any
dllimport/dllexport decorations. Don't install .def files which
obviously have no meaning for static libraries. Don't create MS
import libraries. Don't do any resource object files.
svn path=/trunk/; revision=6866
2008-03-16 Tor Lillqvist <tml@novell.com>
* configure.in: Don't bother defining Autoconf variables for
glib.def, gmodule.def, gobject.def and gthread.def when this can
be handled easily in */Makefile.am which are the only files that
use them. Remove also TESTGMODULE_EXP which isn't used at all.
* */Makefile.am: Corrsponding changes.
svn path=/trunk/; revision=6722
* gparamspecs.c: (param_gtype_set_default), (param_gtype_validate):
make GParamGType require the set type during construction instead of
using G_TYPE_NONE, which causes issues when setting.
Bug 513073 - g_param_spec_gtype breaks with G_PARAM_CONSTRUCT
svn path=/trunk/; revision=6457
2008-02-05 18:52:07 Tim Janik <timj@imendio.com>
* gtype.c: added recursive mutex to protect class initialization,
default interface initialization and per-class interface construction.
a lock to this recursive mutex is held during user callback invocations
such as initializers or finalizers, effectively allowing only one thread
to run class/interface initializers/finalizers at a time.
also made misc fixups. this fixes:
Bug 64764 - Class initialization isn't thread safe.
svn path=/trunk/; revision=6454
2008-02-05 18:41:22 Tim Janik <timj@imendio.com>
* Makefile.am: integrate tests/.
* tests/: new directory for libgobject tests.
* tests/Makefile.am: build and run threadtests.
* tests/threadtests.c: test multi-threaded initializers for
object classes and interfaces.
svn path=/trunk/; revision=6452
* gobject/glib-genmarshal.c: Add global exit_status variable, and use
it in pad() and process_signature() to return with non-zero error code
when printing warnings. (#495294)
svn path=/trunk/; revision=6098
2007-11-21 21:06:47 Tim Janik <timj@imendio.com>
* Makefile.decl: initialize automake variables EXTRA_DIST and
TEST_PROGS for unconditional appending via += in other makefiles.
define recursive test targets: test, test-report, perf-report,
full-report, as described here:
http://mail.gnome.org/archives/gtk-devel-list/2007-November/msg00000.html
* Makefile.am:
* build/win32/vs8/Makefile.am, build/win32/dirent/Makefile.am:
* build/win32/Makefile.am, build/Makefile.am:
* docs/Makefile.am, docs/reference/Makefile.am:
* docs/reference/glib/Makefile.am, docs/reference/gobject/Makefile.am:
* gmodule/Makefile.am, tests/Makefile.am:
* tests/refcount/Makefile.am, tests/gobject/Makefile.am:
* glib/update-pcre/Makefile.am, glib/libcharset/Makefile.am:
* glib/tests/Makefile.am, glib/pcre/Makefile.am:
* glib/gnulib/Makefile.am, gobject/Makefile.am, m4macros/Makefile.am:
* gthread/Makefile.am, glib/Makefile.am:
include $(top_srcdir)/Makefile.decl, adapted EXTRA_DIST assignments.
* glib/tests/Makefile.am: removed example testing rules.
* glib/tests/testing.c: conditionalized performance and slow tests.
* glib/gtestutils.h:
* glib/gtestutils.c: work around g_test_config_vars not changing its
exported value after value assignments, aparently due to symbol aliases.
* glib/gtester.c: fixed off-by-one error which produced junk in logs.
* configure.in: check for python >= 2.4 and provide $PYTHON for scripts.
svn path=/trunk/; revision=5914
2007-10-13 Sven Herzberg <herzi@gnome-de.org>
Reviewed by Tim Janik.
Created marshallers that don't throw gcc warnings when compiling with
-WUnused (fixes#359165).
* gobject/glib-genmarshal.c: decorate return_value and invocation_hint
with G_GNUC_UNUSED
svn path=/trunk/; revision=5781
2007-09-20 Carlos Garnacho <carlos@imendio.com>
* gtypemodule.h: make sure we define GType g_define_type_id in
G_G_DEFINE_DYNAMIC_TYPE_EXTENDED so it works together with
G_IMPLEMENT_INTERFACE. (#478459)
svn path=/trunk/; revision=5777
2007-08-14 Cody Russell <bratsche@gnome.org>
* gobject/gsignal.c: g_type_default_interface_ref() was not
ensuring working g_signal_list_ids. Added checks for
!G_TYPE_IS_INTERFACE (itype).
(#465625, by some guy who calls himself Yeti)
svn path=/trunk/; revision=5704
Fri Jun 22 11:31:27 2007 Tim Janik <timj@gtk.org>
* gtype.h: reintroduce typedef gulong GType; for C++, to avoid
C++ specific ABI breakage.
svn path=/trunk/; revision=5582
Thu Jun 14 23:32:00 2007 Tim Janik <timj@gtk.org>
* gtype.h: always define GType unconditionally in terms of gsize,
there's no need to jump through a glong hoop ever and this fixes
the printf modifier to %zu.
svn path=/trunk/; revision=5560
Thu Jun 14 22:33:11 2007 Tim Janik <timj@imendio.com>
* gparamspecs.c (g_param_spec_types_init): work around SGI IDO cc,
fixes#363986.
svn path=/trunk/; revision=5559
2007-05-17 Matthias Clasen <mclasen@redhat.com>
* configure.in: Move the compiler-dependency in the G_GNUC_INTERNAL
definition from configure-time to runtime (of the compiler).
(#438869, Damien Carbery)
* glib/gdebug.h:
* glib/gmessages.h:
* glib/gunicodeprivate.h:
* glib/gthreadprivate.h: Move G_GNUC_INTERNAL before function
declarations to fix compilation with sun studio. (#438873,
Damien Carbery)
svn path=/trunk/; revision=5497
2007-04-25 Michael Natterer <mitch@imendio.com>
* gparamspecs.c (param_string_validate): also clear the
NOCOPY_CONTENTS flag when replacing NULL with the empty string.
svn path=/trunk/; revision=5458
2007-04-24 Michael Natterer <mitch@imendio.com>
* gobject/gparamspecs.c (param_string_validate): don't free or
modify static strings, dup them when needed and clear the
G_VALUE_NOCOPY_CONTENTS flag. Fixes bug #432895.
* tests/gobject/paramspec-test.c: test all GParamSpecString
validations with static and allocated strings.
svn path=/trunk/; revision=5454
Tue Apr 3 12:34:14 2007 Tim Janik <timj@gtk.org>
* gobject.[hc]: invoke GObjectClass.constructed() only for newly
constructed objects, and invoke it while the notify queue is
still being frozen, after all CONSTRUCT* properties have been
set and before random other properties are being set.
* applied modified patch from Ryan Lortie to implement
GObjectClass.constructed() to fix#425324.
2007-04-02 Ryan Lortie <desrt@desrt.ca>
* gobject/gobject.h: Add 'constructed' vcall to GObjectClass.
* gobject/gobject.c (g_object_newv): call ->constructed() as last
step of object construction.
svn path=/trunk/; revision=5441
Mon Mar 12 13:30:20 2007 Tim Janik <timj@gtk.org>
* gtype.h: marked purely functional g_type accessors as PURE or CONST,
closes#305100.
svn path=/trunk/; revision=5400
2007-01-02 Tor Lillqvist <tml@novell.com>
* glib-genmarshal.c (main): Add comment about dup(0) and
lack of /dev/stdin on Win32. (#407431)
svn path=/trunk/; revision=5335
2007-01-02 Tor Lillqvist <tml@novell.com>
* glib-genmarshal.c (main): Handle "/dev/stdin" by dup()ing fd 0
so that it works on Win32, too.
svn path=/trunk/; revision=5185
Tue Oct 10 12:06:08 2006 Tim Janik <timj@gtk.org>
* glib-mkenums.in:
* glib-mkenums.1: applied patch from David Necas which introduces
an underscore_name option and fixes#358734.
2006-10-02 Behdad Esfahbod <behdad@gnome.org>
* glib/Makefile.am:
* gobject/Makefile.am:
Include pltcheck.sh in EXTRA_DIST, and remove redefinition of TESTS.
(#358966)
Mon Oct 2 15:50:16 2006 Tim Janik <timj@gtk.org>
* gvalue.c (g_value_peek_pointer): reverted a change to have an
assert instead of a g_return_val_if_fail() here. libraries (and
programs) should only ever g_assert or g_error if there is no way
to carry on with the current program state. that's clearly not
the case here.
* ChangeLog: added missing changelog entry for 2003-12-30.
2006-09-17 Hans Breuer <hans@breuer.org>
* glib/makefile.msc.in gobject/makefile.msc.in : better filtering
of G_GNUC_* stuff when generating .def files. Now also works with
newer (less tolerant) linkers, e.g. from vc2500e
Tue Aug 29 13:27:33 2006 Tim Janik <timj@gtk.org>
* glib-mkenums.in: fixed to print usage and version info on STDOUT
(#322502).
* gobject.c (g_initially_unowned_init): restore ; after G_DEFINE_TYPE.
Wed Aug 23 10:35:32 2006 Tim Janik <timj@gtk.org>
* gobject.[hc]: changed return value of g_value_dup_object(), fixes#343292.
2006-08-23 Sven Neumann <sven@gimp.org>
* gobject/glib-genmarshal.[c1]: added new command-line option
"--internal" that can be used to let glib-genmarshal generate
internal functions using the G_GNUC_INTERNAL attribute (bug #346647).
2006-08-23 Sven Neumann <sven@gimp.org>
* gobject/glib-genmarshal.[c1]: added new command-line option
"--internal" that can be used to let glib-genmarshal generate
internal functions using the G_GNUC_INTERNAL attribute (bug
#346647).
Wed Aug 16 13:55:08 2006 Tim Janik <timj@imendio.com>
* gobject.c: conditionally thaw the notify queue after construction,
so we don't trigger warnings when trying to thaw an unfrozen singleton.
2006-08-05 Matthias Clasen <mclasen@redhat.com>
* gparamspecs.c (g_param_spec_types_init): Don't initialize
struct members with function calls. (#349952)
2006-07-21 Matthias Clasen <mclasen@redhat.com>
* gtypemodule.c (g_type_module_register_type): Copy the complete
value table, not just the first 4 bytes. (#348136, Coverity)
2006-06-14 Matthias Clasen <mclasen@redhat.com>
* glib/gkeyfile.c (g_key_file_to_data): Separate groups by
an empty line (#344868, Christian Persch)
2006-06-14 Tor Lillqvist <tml@novell.com>
2006-06-02 Behdad Esfahbod <behdad@gnome.org>
* gobject/genum.h: Make value_name and value_nick const in structs
_GEnumValue and _GFlagValue. (#317793)
Tue May 2 14:51:03 2006 Tim Janik <timj@gtk.org>
* gtype.h: split up G_DEFINE_*TYPE macro definitions so C CODE arguments
are not passed on to nested macro calls. patch mostly courtesy of Behdad
Esfahbod, fixes#337128.
Tue Mar 7 17:09:07 2006 Tim Janik <timj@gtk.org>
* gobject.c (g_object_compat_control): added case3 to hand out the
original floating flag handler. required by gtk+ >= 2.10.
2006-01-18 Matthias Clasen <mclasen@redhat.com>
* gobject.h: Make g_object_compat_control() visible
for GTK+ compilation, to avoid segfaults on 64bit
platforms.
2005-12-30 Matthias Clasen <mclasen@redhat.com>
* gsignal.c: Remove the handler trash stack, which
is now unused.
(g_signal_init): Remove the restriction that HandlerMatch
must be the same size as GList, and obsolete comments
referring to mem chunks.
Thu Dec 22 14:59:24 2005 Tim Janik <timj@imendio.com>
* gvaluetypes.[hc]: implemented G_TYPE_GTPYE. applied patch
from matthias which implements GType accessors for GValue.
* gparamspecs.[hc]: applied patch from matthias which
implements G_TYPE_PARAM_GTYPE.
* gobject.[hc]:
GUnowned: introduced a new object type that has an initially
floating reference.
g_object_compat_control(): allow setting of a floating flag handler.
Wed Nov 23 18:01:46 2005 Tim Janik <timj@imendio.com>
* gobject.[hc]: added floating reference count.
g_object_is_floating():
g_object_ref_sink(): new functions to deal with floating references.
g_object_force_floating(): new funciton for object implementations
to set the floating flag.
* gobject.c (g_object_init): make objects initially floating.
Wed Nov 23 17:58:13 2005 Tim Janik <timj@gtk.org>
* gparam.[hc]: added g_param_spec_ref_sink().
2005-11-17 Matthias Clasen <mclasen@redhat.com>
* glib/gbacktrace.c:
* glib/gdate.c:
* glib/gthread.c: const correctness fixes, found
by Arjan van de Ven and gcc.
Tue Nov 1 16:24:20 2005 Tim Janik <timj@imendio.com>
* glib/gmem.[hc]: prepared deprecation of GMemChunk and GAllocator.
added g_slice_*() API to allocate and cache small bits of memory.
an actuall allocator implementation for g_slice_*() is still pending.
* glib/gthread.[hc]: changes from a patch by Matthias Clasen.
changed GRealThread list to use in-structure *next; fields instead
of GSList, in order for thread iteration to not depenend on g_slice_*()
indirectly.
_g_thread_mem_private_get():
_g_thread_mem_private_set(): added accessors for private memory,
needed because the ordinary GPrivate implementation relies on GArray
and GSList and therefore indirectly on working g_slice_*() allocations.
* glib/gthread.[hc]:
g_thread_foreach(): new public API function to loop over all existing threads.
* glib/gdataset.c:
* glib/gstring.c:
* glib/gcache.c:
* glib/garray.c:
* glib/gqueue.c:
* glib/gslist.c:
* glib/glist.c:
* glib/ghash.c:
* glib/gtree.c:
* glib/ghook.c:
* glib/gmain.c:
* glib/gnode.c:
removed GAllocator and free list usages and accompanying locks.
use g_slice_*() API to allocate and cache small bits of memory.
* glib/ghook.h: removed GMemChunk field from public API.
* glib/gslist.h:
* glib/glist.h: deprecate allocator API, provide _free1() for consistency.
* glib/gnode.h: deprecate allocator API.
* glib/gmain.c: reordered GPollRec fields so g_slice_free_chain() can
be used for poll rec lists.
* glib/grel.c: removed mem chunk usage, and allocated tuples via g_slice_*().
g_relation_destroy(): free all tuples from the all_tuples hash table,
this effectively maintains the life time track keeping of tuples.
g_relation_delete_tuple(): free tuples which are removed from the
all_tuples hash table. this fixes a temporary leak that was present
in the memchunk code until the destruction of the relation.
2005-09-28 Michael Natterer <mitch@gimp.org>
* gtype.h (G_IMPLEMENT_INTERFACE): revert last change, it breaks
all users of G_IMPLEMENT_INTERFACE() inside
G_DEFINE_TYPE_WITH_CODE(), since apparently GCC doesn't like
commas enclosed in {}, not (), in nested macro calls.
2005-09-26 Matthias Clasen <mclasen@redhat.com>
* glib-mkenums.in: Don't hang on '{' following a trigraph comment
in the same line. (#314890, Mathias Hasselmann)
Thu Sep 22 12:42:12 2005 Tim Janik <timj@gtk.org>
* gparam.c (g_param_spec_internal): fix pspec->name assignment which
needs to be strdup()ed for non G_PARAM_STATIC_NAME pspecs. this fixes
recently introduced crashes during plugin unloading.
also, ensure that static pspec names are canonicalized.
* gsignal.h: reverted last change from matthias, we don't guarantee
that type ids aren't mangled with G_SIGNAL_TYPE_STATIC_SCOPE anywhere.
2005-09-20 Matthias Clasen <mclasen@redhat.com>
* gsignal.h (struct _GSignalQuery): Remove the misleading comment
about G_SIGNAL_TYPE_STATIC_SCOPE, since we don't allow that
on return types.
2005-09-08 Kjartan Maraas <kmaraas@gnome.org>
* gclosure.c: (g_closure_set_meta_marshal): Remove some unused
code.
* gsignal.c: (g_signal_emitv): Same here
* gtype.c: (g_type_register_fundamental): And here
* testgobject.c: Mark some functions static.
2005-09-05 Matthias Clasen <mclasen@redhat.com>
* gsignal.c (struct _SignalNode): Make the name field const.
(g_signal_newv): Don't keep an unnecessary extra copy of the
signal name around, and don't forget to free the name if
an existing node is reused.
2005-08-31 Matthias Clasen <mclasen@redhat.com>
* gparam.c (g_param_spec_internal): Intern the name here,
since we need the quark anyway when sending change notification.
* gobject/genums.c: (g_flags_get_first_value): Special-case flag
value of 0. Instead of returning the first random GFlagsValue
we come across, return the GFlagsValue for 0 if it exists or
NULL if it does not exist. Never return the GFlagsValue for 0
if the requested flags value is nonzero.
2005-08-09 Matthias Clasen <mclasen@redhat.com>
* gvaluetransform.c: Access enum and flags
values as v_long/v_ulong, not v_int/v_uint,
to make value transformation of such types
work on bigendian 64bit machines. (#312485,
Michael Lorenz)
2005-08-02 Matthias Clasen <mclasen@redhat.com>
* gclosure.c (union ClosureInt): Mark the vint member as
volatile, which seems to be necessary to make atomic operations
work on s390.
Mon Aug 1 23:00:42 2005 Tim Janik <timj@imendio.com>
* gclosure.c: turned all modifications to the first 32 integer bits in a
closure into atomic accesses. wrapped write accesses into special macros
to keep the atomic modification logic in a single place. comment cleanups.
* gclosure.h: made all atomicly accessed closure fields volatile.
* gobject.h: made ref_count field volatile.
Sun Jul 31 02:04:23 2005 Tim Janik <timj@gtk.org>
* gobject.c: use g_datalist_set_flags() and g_datalist_unset_flags() to
allow proper locking around &qdata modifications.
Sat Jul 30 21:10:26 2005 Tim Janik <timj@gtk.org>
* gobject.c: reverted notify_mutex introduction, since this prevents
parallelized setting of object properties on different objects, and
serves no apparent purpose (to me at least).
g_object_real_dispose(): removed non-atomic reference count
modifications.
g_object_unref(): make sure the closures array is destroyed when
destroying signal handlers.
* gparam.c: cosmetic changes.
* gsignal.c: comment fixup. allow 16bit blocking count.
* gsignal.c: reverted GClosure related changes.
* gclosure.c: reverted premature commit of atomic reference
counting attempt.
2005-07-15 Matthias Clasen <mclasen@redhat.com>
Make refcounting threadsafe by using atomic
operations. (#166020, Wim Taymans)
* gobject.c: Use a recursive lock to protect the
notify queue.
(g_object_unref): Get rid of g_object_last_unref and
do the last unref handling in g_object_unref.
(g_object_ref, g_object_unref): Use atomic operations.
* gsignal.c (struct _HandlerMatch): Use a full integer
for the ref_count field.
(handler_ref, handler_unref_R): Use atomic operations.
* gparam.c (g_param_spec_ref, g_param_spec_unref):
Use atomic operations instead of a lock to make the
refcounting threadsafe.
* gclosure.c (g_closure_ref, g_closure_unref): Use atomic
operations. This is more complicated here, since the
refcount is stored in a bitfield, so we also have
to access all other bitfield members atomically.
* gsignal.c (handlers_find): Read the meta_marshal flag
of the closure atomically.
* tests/Makefile.am (SUBDIRS): Add tests/refcount
* configure.in: Add tests/refcount
* tests/refcount/properties.c: Test property changes
from multiple threads.
* tests/refcount/signals.c: Test signal emission from
multiple threads.
* tests/refcount/objects.c: Test refcounting from
multiple threads.
* tests/refcount/objects2.c:
* tests/refcount/properties2.c: Tests to measure the
overhead of threadsafe refcounting.
* glib/giochannel.c (g_io_channel_ref, g_io_channel_unref):
Use atomic operations to make refcounting
threadsafe. (#166020, Wim Taymans)
2005-07-11 Matthias Clasen <mclasen@redhat.com>
* gobject.h:
* gobject.symbols: Remove G_GNUC_NULL_TERMINATED from
g_object_new again, since that makes gcc warn on calls of
the form g_object_new (some_type, NULL)
2005-07-09 Tor Lillqvist <tml@novell.com>
* configure.in: Don't use autoconf variables for the resource
object files on Win32 any longer. Instead handle that in the
Makefile.am files. Check for windres.
* glibconfig.h.win32.in: Minor tuning to match the
configure-produced glibconfig.h closely.
* */Makefile.am: Don't use the scripts in build/win32 to
compile the .rc file into a resource object file. (This means
we loose the build number increment magic, but I doubt it was
that useful anyway.) Instead use windres directly. To pass the
normal .o file produced by windres through libtool, which
wants .lo files, pass it directly to the linker using a -Wl
option.
* */*.rc.in: Thus replace BUILDNUMBER with 0.
2005-06-26 Tor Lillqvist <tml@novell.com>
* Makefile.am: libtool installs/uninstalls the import library, no
need to do it ourselves. Do still install/uninstall the .def file,
though.
2005-06-24 Tor Lillqvist <tml@novell.com>
* glib/Makefile.am
* gmodule/Makefile.am
* gobject/Makefile.am: Current GNU tools do understand the
PRIVATE keyword.
* glib/gfileutils.c (g_mkdir_with_parents): Return error with
EINVAL also for empty pathnames.
(g_build_pathname_va): Fix typo.
2005-06-13 Matthias Clasen <mclasen@redhat.com>
* gparam.h (GParamFlags): Re-add G_PARAM_PRIVATE as a
deprecated name for bit 5, since some language bindings
have it bound.
2005-05-20 Matthias Clasen <mclasen@redhat.com>
* gvaluetypes.c (g_value_set_string): dup the new value
before freeing the old, just in case. (#172142, Morten
Welinder)
2005-05-05 Owen Taylor <otaylor@redhat.com>
* gobject.[ch] gobject.symbols: Add
g_object_add/remove_toggle_ref() functions to get notification
when a reference count is the last remaining reference; this
enables better memory management for language bindings.
(http://mail.gnome.org/archives/gtk-devel-list/2005-April/msg00095.html)
2005-05-05 Owen Taylor <otaylor@redhat.com>
* glib/gdataset.[ch] glib/gdatasetprivate.h: Add
g_datalist_set/unset_flags(), g_datalist_get_flags() functions
to squeeze some bits into a GDataSet... this is needed for
efficient implementation of toggle references in GObject.
* tests/gobject/references.c tests/gobject/Makefile.am:
Add a test case for weak and toggle references.
* glib/gfileutils.[ch]: Rename g_file_replace() back
to g_file_set_contents().
* glib/glib.symbols: Update.
2005-05-05 Owen Taylor <otaylor@redhat.com>
* glib/Makefile.am glib/glib-sections.txt gobject/gobject-sections.txt:
Update
* gobject/tmpl/objects.sgml: Document toggle-references.
2005-03-25 Matthias Clasen <mclasen@redhat.com>
* gparam.c (param_spec_ht_lookup): Don't do the second
lookup if the name was already canonical. (#171502, Morten
Welinder)
2005-03-14 Matthias Clasen <mclasen@redhat.com>
* abicheck.sh: Make work again.
* gsourceclosure.c: Fix a typo.
Make PLT-reduction work with gcc4, and don't include
everything in gobjectalias.h:
* gobject.symbols: Group symbols by header and source
file.
* makegobjectalias.pl: Protect definitions by the same
preprocessor symbols used to guard the headers. Move
the alias declarations to a separate file which is
produced when calling makegalias.pl -def
* Makefile.am (gobjectaliasdef.c): Add a rule to
build this file.
* *.c: Include gobjectalias.h after the other i
GLib headers, include gobjectaliasdef.c at the bottom.
2005-02-24 Tor Lillqvist <tml@novell.com>
* Makefile.am (BUILT_EXTRA_DIST): Don't distribute
glib.def. (#167496, J. Ali Harlow)
* gobject/Makefile.am (EXTRA_DIST): Don't distribute
gobject.def. (#167496, J. Ali Harlow)
Sun Feb 6 22:00:46 2005 Manish Singh <yosh@gimp.org>
* abicheck.sh: feed the contents of config.h and glibconfig.h
into the preprocessor, since glib.symbols could need #defines
from them.
2005-02-04 Matthias Clasen <mclasen@redhat.com>
* configure.in: Define a HAVE_GNUC_VISIBILITY automake
conditional.
* glib/Makefile.am (TESTS): Only check the abi if
the compiler supports visibility, otherwise we
know there will be (harmless) extra symbols.
(#166181, Ed Avis)
2005-01-11 Owen Taylor <otaylor@redhat.com>
* configure.in: Add gmodule-export-2.0.pc to AC_CONFIG_FILES.
* glib/Makefile.am gobject/Makefile.am gthread/Makefile.am:
Use grep | head -n 1 instead of grep -m 1 which doesn't work
with slightly older versions of GNU grep in
install-libtool-import-lib rule.
2005-01-06 Tor Lillqvist <tml@iki.fi>
* glib/Makefile.am
* gobject/Makefile.am: glib.def and gobject.def are generated, not
in $(srcdir). (#163143, J. Ali Harlow)
2004-12-27 Matthias Clasen <mclasen@redhat.com>
* configure.in: Add an OS_LINUX conditional.
* glib/Makefile.am (TESTS): Only check the ABI on
linux, since the shell script is not portable, and libtool
deficiencies may distort the ABI on other platforms. (#161741)
2004-11-30 Tor Lillqvist <tml@iki.fi>
* glib/Makefile.am (glib.def)
* gobject/Makefile.am (gobject.def): gcc -E complains "linker
unused because linking not done" if told to preprocess an
*.symbols file. Use '-' and redirection to pass it as standard
input instead.
Sun Nov 28 01:37:54 2004 <timj@birnet.org>
* gsignal.c: applied patch by sven@gimp.org (#153727) to reduce
signal connection complexity from O(n_handlers) to O(1).
2004-11-23 Matthias Clasen <mclasen@redhat.com>
Fix a problem with the PLT reduction changes which caused the
internal aliases to lose all attributes.
* glib/glib.symbols: Add attribute annotations.
* glib/makegalias.pl: Keep attribute annotations, but strip PRIVATE.
* glib/Makefile.am (glib.def): Strip attribute annotations, but keep
PRIVATE.
2004-11-11 J. Ali Harlow <ali@juiblex.co.uk>
* gobject/Makefile.am:
* glib/Makefile.am (gtk.def): Use embedded tab rather than '\t'
escape sequence. (#157951)
Mon Nov 8 10:47:41 2004 Manish Singh <yosh@gimp.org>
* gobject/gsourceclosure.c: removed wrap_g_io_channel_ref() hack,
since g_io_channel_ref() has a compatible API now.
2004-10-29 Hans Breuer <hans@breuer.org>
* glibconfig.h */makefile.msc.in : updated [and finally fixed my
script to produce ready to go de-in(ed) files, w/o autotools]
* */*.rc.in : updated copyrights to 2004
* glib/gutils.c : some CSIDL_* defines lacking from older SDK;
use the same fallback mecahnism as on *NIX where ever applicable
2004-10-26 Matthias Clasen <mclasen@redhat.com>
* glib/glib.symbols: Add new symbols.
* abicheck.sh: Don't include symbols which are just in the
symbols list for .defs file compatibility.
2004-10-23 Matthias Clasen <mclasen@redhat.com>
* gtype.h (GTypeInterfaceCheckFunc): Rename first parameter to
check_data, since apparently the system headers on AIX leak a
macro named func_data. (#155178, Andrea Campi)
Wed Oct 6 02:12:44 2004 <timj@birnet.org>
* gtype.c (g_type_instance_get_private): applied patch from Jean-Yves
Lefort <jylefort@brutele.be> to not access the instance_real_class_bsa
pointer without holding the instance_real_class lock.
2004-10-04 Matthias Clasen <mclasen@redhat.com>
* gsignal.c (g_signal_add_emission_hook): Improve the warning
if G_SIGNAL_NO_HOOKS is set. (#154299, Nickolay V. Shmyrev)
2004-09-22 Tor Lillqvist <tml@iki.fi>
* Makefile.am (install-libtool-import-lib): [Win32] Add code to
remove the bug-compatibility entries (see #134813, and related
comments below) from the import library. The PRIVATE keyword in
the .def file is supposed to mean that, but it isn't implemented
yet by GNU ld.
* makegobjectalias.pl: In case the symbol is followed by some
stuff ("PRIVATE") that's intended for the .def file, use just the
actual symbol.
* gobject.symbols: For binary bug compatibility on Win32, add the
g_slist_remove_all and g_unichar_validate symbols inside #ifdef
INCLUDE_INTERNAL_SYMBOLS. (See #134813 and log entries from March
below.)
2004-09-16 Matthias Clasen <mclasen@redhat.com>
Implement the same PLT reduction technique used in GTK+:
* Makefile.am: Generate gobjectalias.h from gobject.symbols.
(BUILT_SOURCES): Add gobjectalias.h.
* makegobjectalias.pl: Script to generate gobjectalias.h.
* *.c: Include gobjectalias.h
2004-09-16 Matthias Clasen <mclasen@redhat.com>
Add ABI control using the same technique that is used in GTK+.
* gobject.symbols: Master list of symbols.
* gobject.def: Removed. It is now generated from gobject.symbols.
* Makefile.am (gobject.def): Generate from gobject.symbols.
(TESTS): Add abicheck.sh
(EXTRA_DIST): Add abicheck.sh
(export_symbols): Don't export _-prefixed symbols.
* gtype.h:
* gtype.c: Move the declarations of the various _init() functions
to the header, and mark them as G_GNUC_INTERNAL.
2004-07-21 Matthias Clasen <mclasen@redhat.com>
* glib-genmarshal.c (put_marshal_value_getters): Use the
correct fields for enums and flags. (#145015,Tommi Komulainen)
Tue Jul 6 00:46:43 2004 Matthias Clasen <maclas@gmx.de>
* gtypemodule.h:
* gtypemodule.c: Fix the declarations of the new
functions to return GType, not void.
Also add missing includes. (#145508, Morten Welinder)
Wed Jun 23 12:55:34 2004 Matthias Clasen <maclas@gmx.de>
* gtype.h (G_DEFINE_TYPE_EXTENDED): Add an initializer for
the g_define_type_info.value_table. (#144678,Mariano
Suárez-Alvarez)
Fri Jun 18 22:55:36 2004 Matthias Clasen <maclas@gmx.de>
* gsourceclosure.h (__G_SOURCECLOSURE_H__): Actually
define the guard after checking for it. (#108038,
Morten Welinder)