Thu Nov 27 17:53:52 2003 Tim Janik <timj@gtk.org>
* gtype.[hc]:
(g_type_class_peek_static): variant of class_peek() which works for
static types only.
* gobject.c:
(g_object_do_class_init): make ::notify a run-action signal.
(g_object_newv): use g_type_class_peek_static() by default to
speed up common code path (trades two write-locks for one read-lock).
(g_object_disconnect):
(g_object_connect): allow signal specification words to be
seperated by '-'.
(g_object_set_valist):
(g_object_new_valist): don't leak values.
(g_object_get_property): check property for readability.
(g_object_set_property): check property for writability and to
not be construct-only.
(g_object_set_valist): check property to not be construct-only.
Thu Oct 2 01:16:50 2003 Owen Taylor <otaylor@redhat.com>
* gtype.[ch]: Add g_type_add/remove_interface_check(),
which allows inserting a post-interface-initialization
check.
* testgobject.c: Fix a deprecated usage.
Mon Sep 29 10:51:01 2003 Owen Taylor <otaylor@redhat.com>
* gtype.[ch]: Add g_type_default_interface_ref/peek/unref
for accessing the default vtable of an interface.
Fri Sep 26 17:24:53 2003 Owen Taylor <otaylor@redhat.com>
* gtype.c (g_type_instance_get_private): You can
have instance_real_class_bsa be non-NULL, but still
the class not be in the bsa. (Found by Kris Rietveld)
Tue Sep 2 19:37:21 2003 Tim Janik <timj@gtk.org>
* gtype.[hc]: added support for a "default vtable" per interface,
that interface vtables are initialized from.
the default vtable is initialized and finalized through class_init,
class_finalize and class_data from the interfaces GTypeInfo struct.
(type_data_last_unref_Wm): unload child plugin before unreffing
parent type.
testifaceinit.c: minor fixups. fixed up base_init() assertions, since
with a default vtable, base_init() may be called multiple times.
added default initializer to iface1.
Tue Sep 2 14:53:41 2003 Tim Janik <timj@gtk.org>
* gobject-query.c (main): fix iterating over fundamental types.
* gtype.c: applied patch from owen which keeps internal
class initialization state to maintain class and interface
initialization happen in the order of:
1. class' base_init
2. interface' base_init
= interfaces added after here are immediately base_init-ialized
3. class_init
4. Interface_init
= interfaces added here are immediately Interface_init-ialized
Tue Aug 19 05:21:04 2003 Tim Janik <timj@gtk.org>
* testgobject.c (main): check private instance data after
initialization.
* gtype.c: for instances with private data, store the real class
pointer in a bsearch array during class initialization.
(g_type_instance_get_private): fetch the real class of
an instance from the bsearch array if necessary.
Tue Jul 8 22:29:31 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtype.c (type_class_init_Wm): Only access node->data->instance
when the node is instantiable.
Tue Jul 8 14:55:27 2003 Owen Taylor <otaylor@redhat.com>
* gtype.c (type_class_init_Wm): Initialize
node->data->instance.private_size here rather than
in type_data_make_W() since the class init for the parent
class may have changed pnode->data->instance.private_size.
(#116921, reported by Soeren Sandmann)
Thu Feb 27 17:33:19 2003 Owen Taylor <otaylor@redhat.com>
* gtype.[ch] testgobject.c: Add support for instance-private data.
g_type_class_add_private(), g_type_instance_get_private(),
G_TYPE_INSTANCE_GET_PRIVATE(). (#101959, patch partly by
Mark McLoughlin, extensive feedback from Tim Janik.)
2002-12-18 Michael Natterer <mitch@gimp.org>
* gobject/gtype.c (type_data_finalize_class_ifaces_Wm): applied
patch I got from Tim Janik for testing which fixes bug #101521.
(restart iterating the interface enties each time we finalized one
because they might have been modified).
Thu Nov 21 16:05:50 2002 Owen Taylor <otaylor@redhat.com>
* gtype.c (g_type_check_instance_cast): Allow
NULL to be cast to any type. (Frequently requested,
most recently #99023, Lars Clausen.)
Mon Nov 4 14:41:48 2002 Owen Taylor <otaylor@redhat.com>
* glib/gbsearcharray.c: Include config.h
so DISABLE_MEMPOOLS actually has an effect.
(#96437, Morten Welinder)
* tests/uri-test.c: Include <config.h>
Mon Nov 4 14:42:36 2002 Owen Taylor <otaylor@redhat.com>
* gtype.c gsignal.c gvaluearray.c: Include config.h
so DISABLE_MEMPOOLS actually has an effect.
(#96437, Morten Welinder)
* gsignal.c: Conditionalize definition of g_handler_ts
on DISABLE_MEM_POOLS (#96437)
Mon Nov 4 14:45:24 2002 Owen Taylor <otaylor@redhat.com>
* gthread-posix.c gthread-solaris.c: Include <config.h>
* gtype.c (g_type_interface_prerequisites): Report only the most
specific instantiatable prerequisite, filter out all supertypes of
this one (the supertypes are added to the prerequisites array for
technical reasons).
Sat Oct 12 22:02:32 2002 Tim Janik <timj@gtk.org>
* merged up from 2.0:
* testgobject.c: test creation of new fundamental types.
* gtype.c (g_type_fundamental_next), (type_node_fundamental_new_W):
account for static_fundamental_next storing non-shifted fundamental
IDs. this fixes g_type_fundamental_next() not returning a new usable
fundamental ID.
Thu Jul 25 20:34:39 2002 Owen Taylor <otaylor@redhat.com>
* gtype.c (g_type_interface_add_prerequisite): When
adding ancestral prerequisites, add the grandparents,
not the siblings. (Problem found by Jon Trowbridge, patch from
Dave Camp, #86879)
Mon May 20 15:57:47 2002 Owen Taylor <otaylor@redhat.com>
* gsignal.c: When printing errors, handle NULL
returns from g_type_debug(). (#73559, Laszlo Peter)
* gtype.c (type_descriptive_name_I): De-inline,
since it's only used for debugging.
Tue Mar 19 18:57:12 2002 Tim Janik <timj@gtk.org>
* gtype.c (check_add_interface_L): applied patch from Matthias Clasen
<maclas@gmx.de> to check for prerequisite of interfaces, fixes#74427.
fixed mutex recursion in his patch (we can't call g_type_is_a() while
holding a read lock).
* gparam.c (canonalize_key): cleanup.
* docs/debugging.txt, gobject/glib-genmarshal.c,
gobject/glib-genmarshal.1, gobject/Makefile.am, gobject/gtype.c:
Remove references to gruntime. This includes renaming the test
program testgruntime to testgobject and the debug envvar
GRUNTIME_DEBUG to GOBJECT_DEBUG. (#50877)
Thu Nov 22 03:30:57 2001 Tim Janik <timj@gtk.org>
* gvalue.h (G_TYPE_IS_VALUE): use g_type_check_is_value_type()
instead of g_type_value_table_peek().
* gtype.[hc] (type_check_is_value_type_U): speed up check
LOCK-less by caching lookups in node->mutatable_has_value_table.
* gtype.[hc]: removed locks where possible. partly based on
patches from owen and alex.
Thu Nov 22 00:26:26 2001 Tim Janik <timj@gtk.org>
* gtype.[hc]: provide G_TYPE_FUNDAMENTAL_SHIFT and
g_type_fundamental_next() to return next usable fundamental
type. use TypeNode pointers as type IDs.
Wed Nov 21 17:23:33 2001 Tim Janik <timj@gtk.org>
* gparamspecs.[hc]: put newly created param spec types into a
global array.
* gboxed.[hc]: moved boxed types with _get_type() function here,
for: G_TYPE_CLOSURE, G_TYPE_VALUE, G_TYPE_VALUE_ARRAY,
G_TYPE_GSTRING.
* gtype.h: removed fundamental branch APIs and derived enum
values.
Sat Nov 17 14:10:35 2001 Owen Taylor <otaylor@redhat.com>
* glib/gbsearcharray.h: Include gtypes.h not gobject/gtype.h
* glib/glib-object.h gobject/*.h: Prevent headers from
being included directly except when compiling GObject.
* gobject/gvaluecollector.h: Include glib-object.h so that
this file can be included directly, since we don't
include it _from_ glib-object.h.
* gobject/gtype.c: Remove struct _GValue hack since we
now include glib/gvaluecollector.h which simply pulls in
glib-object.h.
Tue Nov 13 23:18:10 2001 Tim Janik <timj@gtk.org>
* gsignal.[hc]: add API for chaining:
g_signal_chain_from_overridden() and g_signal_override_class_closure(),
implementation yet to come.
* gtype.[hc], Makefile.am: provide G_LOG_DOMAIN as compile flag.
* gparam.[hc]: s/g_param_get/g_param_spec_get/ for get_nick,
get_name and get_blurb, to be consistent with the rest of the
g_param_spec_*() functions.
* gparamspecs.[hc]: got rid of bogus GClosure paramspec.
G_TYPE_CLOSURE is a boxed type already.
Tue Nov 13 22:16:41 2001 Tim Janik <timj@gtk.org>
* gtype.[hc]: API cleanups.
remove g_type_check_flags(), provide g_type_test_flags() as
a *private* function.
s/g_type_check_is_a/g_type_check_class_is_a/, private function.
s/g_type_instance_is_a/g_type_check_instance_is_a/, also private.
* glib-genmarshal.c gparamspecs.[ch] gtype.[ch] gvalue.h
gvaluecollector.h gvaluetypes.[ch]: Fill in missing support for
gint64 & guint64 (#59254).
* Unconditionalize same (compile with or without G_HAVE_INT64).
Mon Sep 10 17:13:36 2001 Tim Janik <timj@gtk.org>
* glib/gmessages.h: got rid of g_set_error_handler(),
g_set_warning_handler(), g_set_message_handler().
Wed Sep 5 05:24:07 2001 Tim Janik <timj@gtk.org>
* gobject/tmpl/gboxed.sgml: documented some functions.
* gobject/tmpl/objects.sgml: some fixups.
Mon Sep 10 19:27:47 2001 Tim Janik <timj@gtk.org>
* gtype.[hc]:
g_type_add_interface*(): implement the ability to add an interface to
a type whose parents already conform to this interface.
such "overriding" interfaces, when initialized, are not just initialized
with 0, but with a copy of the interface they override.
g_type_interface_peek_parent(): new function, return the interface
that this interface "overrides", if any.
* testgruntime.c: test new interface stuff.
Wed Jul 18 19:42:31 2001 Tim Janik <timj@gtk.org>
* gtype.h: if __GNUC__ is defined, inline a test for an exact type
match for instances and classes in G_TYPE_CHECK_INSTANCE_TYPE() and
G_TYPE_CHECK_CLASS_TYPE() before calling g_type_instance_is_a().
* .cvsignore: Add some generated files.
* glib/gmain.c: (g_main_context_iterate): Comment out cruft
after #endif to avoid gcc warning.
* gmodule/gmodule.c: (g_module_set_error_unduped): Remove
const from type to avoid gcc warning.
* gobject/gsignal.c: (g_signal_emitv): ifdef variable used
only if G_ENABLE_DEBUG to avoid gcc warning.
* gobject/gtype.c: (type_iface_vtable_init_Wm),
(type_iface_vtable_finalize_Wm): ifdef call needed only
if !G_DISABLE_ASSERT to avoid gcc warning.
* tests/testglib.c: (main): ifdef call needed only if
!G_DISABLE_ASSERT to avoid gcc warning. Maybe later we
should make the test to #undef G_DISABLE_ASSERT.
* tests/unicode-collate.c: Add include of <string.h> to
avoid gcc warning.
Thu Jun 28 22:49:40 2001 Owen Taylor <otaylor@redhat.com>
* gtype.[ch] gobject-query.c testgruntime.c: Remove
debug flag argument to g_type_init() and add
g_type_init_with_debug_flags().
Mon Jun 11 17:07:06 2001 Tim Janik <timj@gtk.org>
* gboxed.[hc]: remove left-over usages of an anonymous GBoxed typedef.
* gobjectnotifyqueue.c: moved property notify queue implementation
bits into this function.
* gparam.[hc]: added g_param_spec_pool_belongings(), completed
g_param_spec_pool_list(). added GParameter for _setv() functions.
* gobject.[hc]: use gobjectnotifyqueue.h implementation now.
got rid of properties_changed signal.
new functions g_object_newv(), g_object_class_list_properties().
removed "properties_changed" signal.
* gtype.[hc]: added g_type_depth() to figure number of parent
types + 1 for a type.
* gsignal.h: add g_signal_connect() (as per owen's request) and
g_signal_connect_swapped().
Thu May 10 15:19:01 2001 Tim Janik <timj@gtk.org>
* gscanner.c (g_scanner_key_hash): use g_str_hash() algorithm
to generate hashes.
* gmem.c (standard_calloc): free() doesn't return a value
(Mark Murnane).
Thu May 10 14:00:48 2001 Tim Janik <timj@gtk.org>
* gparamspecs.[hc]: removed g_param_spec_stringc() in lack of
evidence of public need.
* gsignal.h: added g_signal_disconnect_by_func(),
g_signal_block_by_func() and g_signal_unblock_by_func() convenience
macros as per owen's request.
* gtype.c (SIZEOF_FUNDAMENTAL_INFO): align sizeof (GTypeFundamentalInfo)
to size of longs and pointers.
Wed Apr 18 09:46:56 2001 Owen Taylor <otaylor@redhat.com>
* gobject.c gsignal.c: Change C++ comments for FIXME's to
C comments. (Patch from Andres Salomon)
Sat Mar 31 23:55:58 2001 Tim Janik <timj@gtk.org>
* gtype.h:
* gparamspecs.[hc]: applied patch from owen to implement
GParamSpecUnichar.
Fri Mar 30 07:34:02 2001 Tim Janik <timj@gtk.org>
* gtype.c (type_iface_retrive_holder_info_Wm):
* gtypeplugin.c (g_type_plugin_complete_interface_info):
* gtypemodule.c (g_type_module_complete_interface_info):
change order of instance_type and interface_type so they match
the g_type_add_interface_*() API.
* gsignal.c (g_signal_emit_valist): always assign C return value
location, people depending on unaltered return values after emissions
that had no handlers to run need to use g_signal_emitv().
* gtype.[hc] (g_type_query): new function to allow querying of
class and object size (semantics like g_signal_query()).
currently the implementation is better held conservative so as to
only support types that are classed and static.
Fri Mar 9 14:57:17 2001 Tim Janik <timj@gtk.org>
* testgruntime.c: test program. covers run first/last/cleanup signal
handlers, return value accumulator, signal string returns, and
interface types in signal arguments.
* gtype.c (g_type_value_table_peek): for interface types without
value table, try looking up a value table from an instantiatable
prerequisite type (this is safe as an interface may only have
one instantiatable prerequisiste).
(type_check_is_value_type_U): same here.
* gsignal.c (g_signal_newv): assert that return types never have
G_SIGNAL_TYPE_STATIC_SCOPE set.
(g_signal_newc): only create class closure if the class_offset is not
0.
Fri Mar 9 10:14:00 2001 Tim Janik <timj@gtk.org>
* gparamspecs.c (g_param_spec_object): use g_type_is_a() to check
for object_type being a G_TYPE_OBJECT, not G_TYPE_IS_OBJECT(), since
that wouldn't allow interface types.
* gtype.c (g_type_interface_add_prerequisite): arg, fixed small cnp bug
with bad implications and an off-by-one error.