Commit Graph

21 Commits

Author SHA1 Message Date
Sven Neumann
8e936594e6 I'm stupid and managed to screw up my own patch. Now the new function
works as advertised.


--Sven
2001-03-08 18:18:16 +00:00
Sven Neumann
e71a64bc86 added new function g_tree_lookup_extended().
2001-03-08  Sven Neumann  <sven@gimp.org>

	* gtree.[ch]:
	* docs/reference/glib/tmpl/trees-binary.sgml: added new function
	g_tree_lookup_extended().
2001-03-08 17:51:39 +00:00
Tim Janik
37e4b8c87e changed prototype of g_boxed_type_register_static() to contain an optional
Wed Mar  7 09:36:33 2001  Tim Janik  <timj@gtk.org>

	* gboxed.[hc]: changed prototype of g_boxed_type_register_static()
	to contain an optional init function and a hint at whether the
	boxed structure uses ref counting internally.
	added g_value_set_boxed_take_ownership().
	made G_TYPE_BOXED an abstract value type.

	* genums.[hc]: made G_TYPE_ENUM and G_TYPE_FLAGS abstract value
	types.

	* glib-genmarshal.c: argument type changes, preparation for third-party
	arg specification.

	* gobject.[hc]: cleaned up get/set property code.
	added g_strdup_value_contents() to improve warnings.

	* gparam.[hc]: added g_param_value_convert(), taking over responsibility
	of the old g_value_convert(). added G_PARAM_LAX_VALIDATION flag so
	validation alterations may be valid a part of the property setting
	process.

	* gparamspecs.[hc]: made value comparisons stable (for sort applications).
	added GParamSpecValueArray, a param spec for value arrays and
	GParamSpecClosure. nuked the value exchange functions and
	GParamSpecCCallback.

	* gtype.[hc]: catch unintialized usages of the type system with
	g_return_val_if_uninitialized(). introduced G_TYPE_FLAG_VALUE_ABSTRACT
	to flag types that introduce a value table, but can't be used for
	g_value_init(). cleaned up reserved type ids.

	* gvalue.[hc]: code cleanups and saner checking.
	nuked the value exchange API. implemented value transformations, we
	can't really "convert" values, rather transforms are an anylogy to
	C casts, real conversions need a param spec for validation, which is
	why g_param_value_convert() does real conversions now.

	* gvaluearray.[hc]: new files that implement a GValueArray, a struct
	that can hold inhomogeneous arrays of value (to that extend that it
	also allowes undefined values, i.e. G_VALUE_TYPE(value)==0).
	this is exposed to the type system as a boxed type.

	* gvaluetransform.c: new file implementing most of the former value
	exchange functions as single-sided transformations.

	* gvaluetypes.[hc]: nuked G_TYPE_CCALLBACK, added
	g_value_set_string_take_ownership().

	* *.h: s/G_IS_VALUE_/G_VALUE_HOLDS_/.

	* *.[hc]: many fixes and cleanups.

	* many warning improvements.

Tue Feb 27 18:35:15 2001  Tim Janik  <timj@gtk.org>

	* gobject.c (g_object_get_valist): urg, pass G_VALUE_NOCOPY_CONTENTS
	into G_VALUE_LCOPY(), this needs proper documenting.

	* gparam.c: fixed G_PARAM_USER_MASK.

	* gtype.c (type_data_make_W):
	(type_data_last_unref_Wm): fixed invalid memory freeing.

	* gobject.c (g_object_last_unref): destroy signal handlers associated
	with object, right before finalization.

	* gsignal.c (g_signal_parse_name): catch destroyed nodes or signals
	that don't actually support details.

	* gobject.[hc]: got rid of property trailers. nuked GObject
	properties "data" and the "signal" variants.
	(g_object_connect): new convenience function to do multiple
	signal connections at once.
	(g_object_disconnect): likewise, for disconnections.

	* gparam.[hc] (g_param_spec_pool_lookup): took out trailer support.

	* gvalue.[hc]: marked g_value_fits_pointer() and g_value_peek_pointer()
	as private (the latter got renamed from g_value_get_as_pointer()).

Wed Mar  7 09:32:06 2001  Tim Janik  <timj@gtk.org>

        * glib-object.h: add gvaluearray.h.

        * gstring.[hc]: fixup naming of g_string_sprint*.

        * gtypes.h: fixed GCompareDataFunc naming.

Wed Mar  7 09:33:27 2001  Tim Janik  <timj@gtk.org>

        * gobject/Makefile.am: shuffled rules to avoid excessive
        rebuilds.

        * gobject/gobject-sections.txt: updates.

        * gobject/tmpl/*: bunch of updates, added another patch
        from Eric Lemings <eric.b.lemings@lmco.com>.
2001-03-07 14:46:45 +00:00
Owen Taylor
bf2b2fdfca Remove useless check. (Mike Chen)
Wed Jan 31 16:05:44 2001  Owen Taylor  <otaylor@redhat.com>

	* gtree.c (g_tree_node_search): Remove useless check.
	(Mike Chen)
2001-01-31 21:06:27 +00:00
Sebastian Wilhelmi
2fb47703e2 Ok, I'm a moron. When I originally implemented ENABLE_GC_FRIENDLY, I
2000-12-19  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* gslist.c, glist.c: Ok, I'm a moron. When I originally
	implemented ENABLE_GC_FRIENDLY, I forgot to include config.h into
	the affected files. Now that Alex did that for those two,
	inevitable typos surfaced, which are now fixed.

	* garray.c, ghash.c, gqueue.c, gtree.c: Include config.h as well,
	as ENABLE_GC_FRIENDLY should be known.
2000-12-19 15:40:30 +00:00
Jonathan Blandford
2645aaf59c Patch from David Benson <daveb@idealab.com> to add user_data support to
Mon Nov 20 18:55:17 2000  Jonathan Blandford  <jrb@redhat.com>

	* gtree.[hc]: Patch from David Benson <daveb@idealab.com> to add
	user_data support to gtree functions.

Mon Nov 13 18:35:52 2000  Jonathan Blandford  <jrb@redhat.com>

	* gtypes.h (GCompareFuncData): new func type to let you use user
	data when comparing nodes.

	* gslist.c (g_list_sort_with_data): new function to sort with
	user_data.

	* glist.c (g_list_sort_with_data): new function to sort with
	user_data.

	* garray.[ch]: Added convenience functions to sort arrays.
2000-11-20 23:59:32 +00:00
Tim Janik
c9bd7542e1 applied patch from Andreas Persenius <ndap@swipnet.se> that updates the
Wed Jul 26 12:59:31 2000  Tim Janik  <timj@gtk.org>

        * *.[hc]: applied patch from Andreas Persenius <ndap@swipnet.se> that
        updates the license headers to the GNU Lesser General Public License,
        as well as updating the copyright year to 2000.
2000-07-26 11:02:02 +00:00
Tim Janik
1e5d06d4ce fixed SIZEOF_LONG==4 assumption with ENABLE_MEM_CHECK, from Art Haas
Fri May 19 09:00:44 2000  Tim Janik  <timj@gtk.org>

        * gmem.c (g_free): fixed SIZEOF_LONG==4 assumption with
        ENABLE_MEM_CHECK, from Art Haas <ahaas@neosoft.com>.

        * gslist.c (g_slist_reverse): shut up compiler.

        * gscanner.c (g_scanner_get_token_ll): removed inline assignment.

        * garray.c: remove index>=0 checks for unsigned indices.

        * gmain.c (g_idle_prepare): timeout assignment fix.

        * gtree.c (g_tree_node_rotate_right): shut up compiler.
2000-05-19 08:18:29 +00:00
Tor Lillqvist
77866eaf9b makefile.mingw.in tests/makefile.mingw.in Rename makefile.cygwin(.in) to
2000-05-13  Tor Lillqvist  <tml@iki.fi>

* makefile.mingw.in
* tests/makefile.mingw.in
* build-dll: Rename makefile.cygwin(.in) to
makefile.mingw(.in), which better describes what it is. Move the
build of gmodule, gthread and gobject DLLs to makefiles in those
directories. Move resource file handling and build number bump to
build-dll, where it sits much cleaner.

* README.win32
* Makefile.am (EXTRA_DIST): Update accordingly.

* glib.h: Add G_PI, G_PI_2, G_PI_4, G_E, G_LN2, G_LN10 and
G_SQRT2. M_PI etc aren't necessarily in <math.h> in strict ISO C
implementations.

* glib.def: Add g_strcanon.

* gtree.c (g_tree_node_rotate_left): Remove unused variables.

* gwin32.c (g_win32_opendir): Remove unneeded statement.

gmodule:

* makefile.mingw.in: New file, with gmodule stuff
moved from ../makefile.mingw.in.

* Makefile.am: Add to EXTRA_DIST, and add rule to make makefile.mingw.

gobject:
* makefile.mingw.in
* gobject.def
* gobject.rc.in: New files, for Win32 (mingw) build.

* Makefile.am: Add to EXTRA_DIST. Add rules to produce the
corresponding non-*.in files.

* gtype.h: (Win32:) Mark _g_type_fundamental_last for
export/import from DLL.

gthread:
* makefile.mingw.in: New file, with gthread stuff moved from
../makefile.mingw.in.

* Makefile.am: Add to EXTRA_DIST, add rule to build makefile.mingw.
2000-05-13 19:30:58 +00:00
Sebastian Wilhelmi
d5fccfb0eb Changed the 'value' parameter of g_cache_remove from gpointer to
2000-04-26  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* glib.h, gcache.c, gtree.c: Changed the 'value' parameter of
	g_cache_remove from gpointer to gconstpointer. Dito for the 'key'
	parameter of g_tree_lookup and g_tree_remove and the 'data'
	parameter of g_tree_serach. This function now takes a function of
	type GCompareFunc instead of GSearchFunc.

	* glib.h: Removed declaration of GSearchFunc.

	* gmem.c: s/GSearchFunc/GCompareFunc/.
2000-04-26 08:42:19 +00:00
Sebastian Wilhelmi
8c90d7766b Add configure test for garbage collector friendliness for GLib. If
2000-04-17  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* configure.in, acconfig.h: Add configure test for garbage
	collector friendliness for GLib. If enabled, ENABLE_GC_FRIENDLY
	will be defined.

	* garray.c, ghash.c, glist.c, gmain.c, gmem.c, gnode.c, gqueue.c,
	gslist.c, gtree.c: If ENABLE_GC_FRIENDLY is defined, NULLify all
	memory released by the user, but cached by GLib. This lets a
	garbage collector have a more correct view of the actually used
	memory.
2000-04-17 13:23:27 +00:00
CST 1999 Shawn T. Amundson
b9ef2b41db inserted additional note to look for ChangeLog and AUTHORS file for a log
Wed Feb 24 00:08:42 CST 1999 Shawn T. Amundson <amundson@gtk.org>

        * *.[ch]: inserted additional note to look for ChangeLog and
	  AUTHORS file for a log of modifications.
1999-02-24 06:14:27 +00:00
Sebastian Wilhelmi
b37e032581 s/G_LOCK_DECLARE/G_LOCK_DEFINE/ throuhout glib. Added G_LOCK_EXTERN macro
1999-02-10  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* glib.h: s/G_LOCK_DECLARE/G_LOCK_DEFINE/ throuhout glib. Added
	G_LOCK_EXTERN macro to declare a lock externally.
1999-02-10 09:40:46 +00:00
Tim Janik
6db5c264f9 removed assertment about rtree->root being NULL, so this function can be
Sun Jan 17 17:15:59 1999  Tim Janik  <timj@gtk.org>

        * gtree.c (g_tree_traverse): removed assertment about rtree->root being
        NULL, so this function can be applied to unpopulated trees as well, fix
        provided by Simon Kagedal <sika8225@csd.uu.se>.
1999-01-17 16:56:28 +00:00
Tim Janik
b2e318ff3e version bump to 1.1.8, binary age 0, interface age 0.
Wed Dec 16 03:16:58 1998  Tim Janik  <timj@gtk.org>

        * configure.in: version bump to 1.1.8, binary age 0, interface age 0.

        * glib.h: changed g_lock() to G_LOCK(), g_unlock() to G_UNLOCK() and
        g_trylock() to G_TRYLOCK(), since these are macros that expand to
        nothing with --disable-threads.
        changed G_LOCK_DEFINE() to G_LOCK_DECLARE() and introduced
        G_LOCK_DECLARE_STATIC() to achive the results of static G_LOCK_DECLARE().
        changed semantics of g_thread_supported to g_thread_supported() so it
        can be used as a function like g_module_supported(). the actuall
        definition is still a macro that expands into a variable for
        performance reasons though.
        various indentation and coding style cleanups.

        * configure.in: added --enable-threads that defaults to yes.

        * gmutex.c: changed tests g_thread_supported to g_thread_supported (),
        changed variable settings of g_thread_supported
        to g_threads_got_initialized.

        garray.c:
        gcache.c:
        gdataset.c:
        gdate.c:
        ghash.c:
        glist.c:
        gmain.c:
        gnode.c:
        gslist.c:
        gstring.c:
        gtree.c:
        gutils.c:
        changed s/g_lock/G_LOCK/, s/g_unlock/G_UNLOCK/,
        s/static G_LOCK_DEFINE/G_LOCK_DECLARE_STATIC/.
1998-12-16 05:38:35 +00:00
Owen Taylor
931ea95265 This commit merges the glib-threads branch into the main
branch. See the ChangeLog for details of the changes.

In brief overview:

 - The set of threading functions can be set
 - A default implementation is provided in -lgthread
 - All static data structures are locked using these
   functions if g_thread_init() is called.
1998-12-15 05:28:02 +00:00
Tim Janik
9c1692c260 removed the GListAllocator type and its g_*_allocator_*() function
Tue Nov 24 09:40:00 1998  Tim Janik  <timj@gtk.org>

        * glib.h: removed the GListAllocator type and its g_*_allocator_*()
        function variants (which weren't working anyways) in favour of a
        generic GAllocator type. new functions:
        g_allocator_new, g_allocator_free, g_slist_push_allocator,
        g_slist_pop_allocator, g_list_push_allocator, g_list_pop_allocator,
        g_node_push_allocator and g_node_pop_allocator.

        * gstring.c: removed bogus slist allocator code.
        * gtree.c: maintain own list of free tree nodes and don't waste
        GSLists for that, removed bogus slist allocator code.
        * glist.c: use GAllocators for node allocation.
        * gslist.c: use GAllocators for node allocation.
        * gnode.c: use GAllocators for node allocation.

        * gdataset.c: cleanups wrt automatic initialization.
1998-11-24 12:18:22 +00:00
Tim Janik
ac3a8ac9a7 check for key_compare_func != NULL (reported by Michal Kara).
Fri Sep 18 03:41:20 1998  Tim Janik  <timj@gtk.org>

        * gtree.c (g_tree_new): check for key_compare_func != NULL (reported
        by Michal Kara).
1998-09-18 02:12:32 +00:00
Tim Janik
e1f0fb0c1e new function g_log_set_always_fatal() to set an additional fatal_mask for
Tue Aug 18 04:40:17 1998  Tim Janik  <timj@gtk.org>

        * glib.h:
        * gmessages.c: new function g_log_set_always_fatal() to set an
        additional fatal_mask for log levels that are considered to be fatal
        globally (required by gtk). since this mask is not domain-associated,
        it is restricted to the log levels, introduced by glib itself.

        * gmem.c:
        * grel.c:
        * gtree.c (g_tree_node_check):
        don't use g_print() calls for informational/debugging output,
        but log all this stuff through g_log() with G_LOG_LEVEL_INFO.
        libraries shouldn't use printf(), g_print() or g_printerr() at all.
1998-08-18 03:50:35 +00:00
Tim Janik
5272119ce9 added a GNode test.
Fri Jul 31 22:17:05 1998  Tim Janik  <timj@gtk.org>

        * testglib.c (g_node_test): added a GNode test.

Fri Jul 31 09:08:16 1998  Tim Janik  <timj@gtk.org>

        * Makefile.am: compile gnode.c.

        * glib.h:
        * gnode.c: added implementation of n-way trees.

        * gtree.c (g_tree_traverse): added a warning to the switch() statement
        which says that G_LEVEL_ORDER is not implemented.
1998-07-31 20:21:10 +00:00
Owen Taylor
2e0320d57e Initial revision 1998-06-10 23:21:14 +00:00