1. 25 Jan, 2006 1 commit
    • Tim Janik's avatar
      honour g_mem_gc_friendly settings when freeing slices, make sure · eda944bc
      Tim Janik authored
      Wed Jan 25 16:39:18 2006  Tim Janik  <timj@imendio.com>
      
              * glib/gslice.c: honour g_mem_gc_friendly settings when freeing
              slices, make sure g_mem_gc_friendly is properly initialized.
      
              * gmem.[hc]: ensure g_mem_gc_friendly is initialized from G_DEBUG upon
              the first allocation. applied some branching optimizations.
      
              * docs/macros.txt: reflected --enable-gc-friendly change and
              described ENABLE_GC_FRIENDLY_DEFAULT as well as G_DEBUG=gc-friendly.
      
              * configure.in: changed --enable-gc-friendly=yes to define
              ENABLE_GC_FRIENDLY_DEFAULT.
      
              * glib/garray.c: changed ENABLE_GC_FRIENDLY macro #ifdef-s to
              if (G_UNLIKELY (g_mem_gc_friendly)).
      
              * glib/gtree.c:
              * glib/ghash.c: removed ENABLE_GC_FRIENDLY code which is now taken
              care of by g_slice_free1().
      
              * tests/slice-test.c: fixed leaks, reported by Kjartan Maraas.
      eda944bc
  2. 14 Jan, 2006 1 commit
  3. 09 Jan, 2006 1 commit
    • Matthias Clasen's avatar
      Break some long lines. · a3a46919
      Matthias Clasen authored
      2006-01-08  Matthias Clasen  <mclasen@redhat.com>
      
      	* glib/gtree.c: Break some long lines.
      
      	* tests/tree-test.c: Add more tests.
      a3a46919
  4. 05 Dec, 2005 1 commit
  5. 01 Nov, 2005 1 commit
    • Tim Janik's avatar
      prepared deprecation of GMemChunk and GAllocator. added g_slice_*() API to · 0cba1b53
      Tim Janik authored
      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.
      0cba1b53
  6. 17 May, 2005 1 commit
    • Matthias Clasen's avatar
      Check the return values of g_tree_remove(). · 0c04a92b
      Matthias Clasen authored
      2005-05-17  Matthias Clasen  <mclasen@redhat.com>
      
      	* tests/tree-test.c (main): Check the return values of
      	g_tree_remove().
      
      	* glib/gtree.c (g_tree_remove, g_tree_steal): Return
      	a boolean indicating wether the key was found.  (#302545,
      	Matthew F. Barnes)
      0c04a92b
  7. 29 Apr, 2005 1 commit
  8. 14 Mar, 2005 1 commit
    • Matthias Clasen's avatar
      Make PLT-reduction work with gcc4, and don't include everything in · 608a31b9
      Matthias Clasen authored
      2005-03-13  Matthias Clasen  <mclasen@redhat.com>
      
      	Make PLT-reduction work with gcc4, and don't include
      	everything in galias.h:
      
      	* glib/glib.symbols: Group symbols by header and source file.
      	* glib/makegalias.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
      	* glib/Makefile.am (galiasdef.c): Add a rule to generate this
      	file.
      	* glib/*.c: Include galias.h after the other GLib headers,
      	include galiasdef.c at the bottom.
      608a31b9
  9. 16 Sep, 2004 1 commit
  10. 25 Jul, 2003 1 commit
  11. 04 Dec, 2002 1 commit
  12. 28 Nov, 2002 1 commit
    • Matthias Clasen's avatar
      Move some docs inline, and add deprecation information. To see the list of · 803bae66
      Matthias Clasen authored
      	* glib/gutils.c:
      	* glib/gtree.c:
      	* glib/gstring.c:
      	* glib/gstrfuncs.c:
      	* glib/giochannel.c: Move some docs inline, and add deprecation
      	information. To see the list of affected functions, grep for
      	"Deprecated:".
      
      	* glib/tmpl/strings.sgml:
      	* glib/tmpl/string_utils.sgml:
      	* glib/tmpl/misc_utils.sgml: Move some docs inline.
      803bae66
  13. 12 Oct, 2002 1 commit
  14. 26 May, 2002 1 commit
    • Matthias Clasen's avatar
      Remove references to nonexisting functions · 5e45a337
      Matthias Clasen authored
      	* glib/gmain.c: Remove references to nonexisting functions
      	g_source_set_callback_closure(), g_source_poll(), g_source_add()
      	from docs.
      
      	* glib/gdir.c (g_dir_open): Typo fix in docs.
      
      	* glib/gasyncqueue.c (g_async_queue_lock):
      	(g_async_queue_unref_and_unlock): Fix markup to avoid erroneous
      	<link>s in docs.
      
      	* glib/gwin32.c: Escape #'s leading to erroneous <link>s in docs.
      
      	* glib/gtree.c: Replace some occurances of Gtree by GTree in docs.
      
      	* glib/gstring.c (g_string_insert_unichar): Typo fix in docs.
      
      	* glib/tmpl/conversions.sgml: Add GIConv.
      
      	* glib/tmpl/main.sgml: Fix references to nonexisting functions
      	g_main_loop_destroy(), g_source_add(), g_source_connect().
      
      	* glib/glib-sections.txt: Add GIConv, g_str_has_prefix, g_str_has_suffix.
      
      	* glib/tmpl/linked_lists_single.sgml:
      	* glib/tmpl/linked_lists_double.sgml: GListAllocator doesn't exist.
      
      	* glib/glib-docs.sgml: Declare hash entity.
      
      	* glib/tmpl/macros.sgml: Escape # in #ifdef to suppress erroneous links.
      
      	* gobject/Makefile.am, gobject/gobject-docs.sgml, gobject/tmpl/*:
      	* glib/Makefile.am, glib/glib-docs.sgml, glib/tmpl/*: Produce XML,
      	not SGML.
      5e45a337
  15. 03 Feb, 2002 1 commit
  16. 16 Dec, 2001 1 commit
    • Matthias Clasen's avatar
      Minor markup fixes. · a52e2986
      Matthias Clasen authored
      
              * glib/gshell.c, glib/gspawn.c, glib/gspawn-win32.c, glib/gerror.c,
              glib/gfileutils.c, glib/ghash.c, glib/gmain.c, glib/gasyncqueue.c,
              glib/gtree.c: Minor markup fixes.
      
              * glib/tmpl/caches.sgml: GCs are cached by GTK, not by GDK.
      a52e2986
  17. 12 Dec, 2001 1 commit
    • Matthias Clasen's avatar
      Documentation fixes. · 3fa33317
      Matthias Clasen authored
              * glib/gconvert.c, glib/grand.c, glib/ghash.c,
              glib/gthreadpool.c, glib/gtree.c: Documentation fixes.
      
              * glib/tmpl/allocators.sgml, glib/tmpl/arrays.sgml,
              glib/tmpl/arrays_byte.sgml, glib/tmpl/arrays_pointer.sgml,
              glib/tmpl/caches.sgml, glib/tmpl/completion.sgml,
              glib/tmpl/conversions.sgml,
              glib/tmpl/datalist.sgml, glib/tmpl/date.sgml,
              glib/tmpl/error_reporting.sgml, glib/tmpl/fileutils.sgml,
              glib/tmpl/hash_tables.sgml,
              glib/tmpl/hooks.sgml, glib/tmpl/macros.sgml,
              glib/tmpl/macros_misc.sgml, glib/tmpl/main.sgml, glib/tmpl/markup.sgml,
              glib/tmpl/memory.sgml, glib/tmpl/memory_chunks.sgml,
              glib/tmpl/messages.sgml, glib/tmpl/misc_utils.sgml,
              glib/tmpl/modules.sgml, glib/tmpl/numerical.sgml,
              glib/tmpl/patterns.sgml, glib/tmpl/queue.sgml,
              glib/tmpl/shell.sgml, glib/tmpl/spawn.sgml,
              glib/tmpl/string_utils.sgml, glib/tmpl/thread_pools.sgml,
              glib/tmpl/threads.sgml, glib/tmpl/timers.sgml,
              glib/tmpl/trees-binary.sgml, glib/tmpl/trees-nary.sgml,
              glib/tmpl/type_conversion.sgml, glib/tmpl/unicode.sgml,
              glib/tmpl/warnings.sgml, glib/tmpl/windows.sgml:
              Improve markup of examples, general consistency improvements.
      3fa33317
  18. 05 Dec, 2001 1 commit
  19. 29 Nov, 2001 1 commit
  20. 26 Nov, 2001 1 commit
  21. 17 Nov, 2001 1 commit
  22. 19 Sep, 2001 1 commit
  23. 03 Aug, 2001 1 commit
    • Sven Neumann's avatar
      beautified configure help output. · c2ec77f5
      Sven Neumann authored
      2001-08-03  Sven Neumann  <sven@gimp.org>
      
      	* configure.in: beautified configure help output.
      
      	* glib/gtree.c: changed help for g_tree_insert(); it was misleading.
      c2ec77f5
  24. 04 May, 2001 1 commit
    • Sven Neumann's avatar
      fixed a typo in a comment. · d18b364d
      Sven Neumann authored
      2001-05-04  Sven Neumann  <sven@convergence.de>
      
              * ghash.c: fixed a typo in a comment.
      
              * gtree.[ch]: added new functions g_tree_new_full(), g_tree_replace(),
              g_tree_steal() and g_tree_foreach() to adapt GTree to the GHashTable
              API. Moved comments into the C file.
      
              * docs/reference/glib/glib-sections.txt
              * docs/reference/glib/tmpl/glib-unused.sgml
              * docs/reference/glib/tmpl/hash_tables.sgml
              * docs/reference/glib/tmpl/linked_lists_double.sgml
              * docs/reference/glib/tmpl/linked_lists_single.sgml
              * docs/reference/glib/tmpl/macros_misc.sgml
              * docs/reference/glib/tmpl/trees-binary.sgml: updated documentation
      d18b364d
  25. 08 Mar, 2001 2 commits
  26. 07 Mar, 2001 1 commit
    • Tim Janik's avatar
      changed prototype of g_boxed_type_register_static() to contain an optional · 37e4b8c8
      Tim Janik authored
      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>.
      37e4b8c8
  27. 31 Jan, 2001 1 commit
  28. 19 Dec, 2000 1 commit
    • Sebastian Wilhelmi's avatar
      Ok, I'm a moron. When I originally implemented ENABLE_GC_FRIENDLY, I · 2fb47703
      Sebastian Wilhelmi authored
      
      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.
      2fb47703
  29. 20 Nov, 2000 1 commit
    • Jonathan Blandford's avatar
      Patch from David Benson <daveb@idealab.com> to add user_data support to · 2645aaf5
      Jonathan Blandford authored
      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.
      2645aaf5
  30. 26 Jul, 2000 1 commit
  31. 19 May, 2000 1 commit
    • Tim Janik's avatar
      fixed SIZEOF_LONG==4 assumption with ENABLE_MEM_CHECK, from Art Haas · 1e5d06d4
      Tim Janik authored
      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.
      1e5d06d4
  32. 13 May, 2000 1 commit
    • Tor Lillqvist's avatar
      makefile.mingw.in tests/makefile.mingw.in Rename makefile.cygwin(.in) to · 77866eaf
      Tor Lillqvist authored
      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.
      77866eaf
  33. 26 Apr, 2000 1 commit
    • Sebastian Wilhelmi's avatar
      Changed the 'value' parameter of g_cache_remove from gpointer to · d5fccfb0
      Sebastian Wilhelmi authored
      
      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/.
      d5fccfb0
  34. 17 Apr, 2000 1 commit
    • Sebastian Wilhelmi's avatar
      Add configure test for garbage collector friendliness for GLib. If · 8c90d776
      Sebastian Wilhelmi authored
      
      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.
      8c90d776
  35. 24 Feb, 1999 1 commit
  36. 10 Feb, 1999 1 commit
  37. 17 Jan, 1999 1 commit
  38. 16 Dec, 1998 1 commit
    • Tim Janik's avatar
      version bump to 1.1.8, binary age 0, interface age 0. · b2e318ff
      Tim Janik authored
      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/.
      b2e318ff
  39. 15 Dec, 1998 1 commit
    • Owen Taylor's avatar
      This commit merges the glib-threads branch into the main · 931ea952
      Owen Taylor authored
      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.
      931ea952