Commit Graph

19 Commits

Author SHA1 Message Date
Alexander Larsson
c7f80dbb13 Added --disable-mem-pools option.
2000-12-19  Alexander Larsson  <alexl@redhat.com>

	* configure.in:
	Added --disable-mem-pools option.

	* glist.c:
	* gslist.c:
	* gnode.c:
	* gmem.c:
	Disable free list and memory chunks if DISABLE_MEM_POOLS is defined.
2000-12-19 09:35:44 +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
Sebastian Wilhelmi
059f5b9416 Changed the 'data' parameters from gpointer to gconstpointer for the
2000-04-18  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* glib.h, glist.h, gslist.h: Changed the 'data' parameters from
	gpointer to gconstpointer for the functions
	g_(list|slist)_(remove|find|find_custom|index), as they do not
	change this parameter. This fixes bug #4836.
2000-04-18 14:01:33 +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
Tim Janik
db8baf6978 minor optimization.
Wed Mar  1 10:39:39 2000  Tim Janik  <timj@gtk.org>

        * gslist.c (g_slist_reverse): minor optimization.

        * testglib.c (g_node_test): added a couple of tests for
        g_node_copy().

        * glib.h:
        * gnode.c (g_node_copy): new function to copy subtrees,
        supplied by dbsears@ix.netcom.com.
        changed iterator to walk the children list backwards, so
        we get down from O(n^2) to O(n).

        * gnode.c (g_node_first_sibling): applied patch from
        dbsears@ix.netcom.com to optimize access if node->parent
        is present.

        * gutils.c (g_get_any_init): backed out HAVE_PW_GECOS check around
        assignment of g_real_name, sicne HAVE_PW_GECOS is never defined and
        thus breaks the original code.

        * merged changes from 1.2.7.

Sat Feb 19 19:43:29 2000  Tim Janik  <timj@gtk.org>

        * testgmodule.c (main): added test to check that not yet bound symbols
        in shared libraries of the main module are retrievable, from David Gero.

Fri Jan 28 11:37:41 2000  Owen Taylor  <otaylor@redhat.com>

        Bug #4156 - Changes vaguely modelled after Scott Gifford's patch

        * gtimer.c (g_timer_elapsed): Never report negative times -
        clip times to 0.

        * gmain.c (g_timeout_prepare): Guard against unexpected
        clock shifts by never setting a timeout of more than
        data->interval msecs.
2000-03-01 09:44:10 +00:00
Tor Lillqvist
80c44ef391 Add a cast.
* glib.h (g_trash_stack_push): Add a cast.

	* gslist.c
	* glist.c: Make the inline functions static inline, and add
	separate extern wrappers. Not all compilers produce callable entry
	points for inline functions, even if gcc does.
1999-08-17 17:41:01 +00:00
Tim Janik
87c7aeb93b 18:36. incorporated proposed cleanups from gtk-devel-list.
Sat Jul 24 20:11:35 1999  Tim Janik  <timj@gtk.org>

        * merged GLib 1.3.0 with glib-1.2.3 from Fri Jul 16 22:18:36.
        * incorporated proposed cleanups from gtk-devel-list.

        * bumped version number to GLib-1.3.1

        * glib.h:
        * gqueue.c:
        * gstring.c:
        * glist.c:
        removed string tokenisation (we got g_strsplit() and g_strjoin()
        already) and readline functions.
        s/g_list_delete/g_list_delete_link.
        implemented g_slist_delete_link.
        removed notion of g_ATEXIT() macro in glib.h, this is an *internal*
        macro, g_atexit() is provided for public consumption.
        added GTrashStack inline utility functions.
        reimplement double eneded queues.
        removed GStack implementation, people can use a queue or a (singly)
        linked list for this task.
        deprecated g_strescape(), we need the SunOS variants here.

        * gdate.c: added DEBUG_MSG() macro to wrap old messages.

        * *.*: CVS merges.

        * upgrade to libtool 1.3.3.
1999-07-24 18:50:58 +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
Elliot Lee
6c79947722 pools of 128 items instead of 1024 items.
pools of 128 items instead of 1024 items.
1999-02-09 19:25:38 +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
dcd0c664b7 Make sure all calls to g_node_validate_allocator are within
Tue Dec 15 10:40:09 1998  Owen Taylor  <otaylor@redhat.com>

	* gnode.c glist.c gslist.c: Make sure all
	calls to g_node_validate_allocator are within
	current_allocator lock, so we have consistency
	on that point. (Should not really matter,
	but this way we match the comments)

	* glist.c (g_list_free_1): Removed some lines
	that should never have been committed. (For
	debugging)
1998-12-15 15:40:01 +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
70a6dbff87 new function g_slist_copy() to duplicate a list with all its data
Sun Nov 22 17:07:03 1998  Tim Janik  <timj@gtk.org>

        * glib.h:
        * gslist.c: new function g_slist_copy() to duplicate a list with all its
        data pointers.
        * glist.c: new function g_list_copy.
1998-11-23 01:52:07 +00:00
Owen Taylor
be7ab912ee Added g_list_sort() and g_slist_sort() to merge sort GLists and GSLists.
Fri Nov 13 15:17:34 1998  Owen Taylor  <otaylor@redhat.com>

	* glist.c gslist.c glib.h: Added g_list_sort() and
	g_slist_sort() to merge sort GLists and GSLists.
	Submitted by Sven Over <sven.over@ob.kamp.net>
	over a year ago!

	* testglib.c: Test the new sort functions.
1998-11-13 20:50:41 +00:00
Owen Taylor
2e0320d57e Initial revision 1998-06-10 23:21:14 +00:00