1. 17 Aug, 2000 1 commit
    • Darin Adler's avatar
      Return the data left behind. Return the data left behind. · 4010a5ac
      Darin Adler authored
          * glib.h:
          * garray.c: (g_array_free), (g_ptr_array_free),
          (g_byte_array_free): Return the data left behind.
          * gstring.c: (g_string_free): Return the data left behind.
      
          Changed the free calls that leave data behind so they
          return a pointer to the left-behind data, NULL if told not
          to leave anything behind. This makes these calls easier
          to use correctly, without any incompatible API change for
          callers that don't know about the return value. Of course,
          it would be even clearer if the free calls weren't dual-purpose
          in the first place.
      4010a5ac
  2. 26 Jul, 2000 1 commit
  3. 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
  4. 17 Apr, 2000 2 commits
    • 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
    • Sebastian Wilhelmi's avatar
      Added g_(array|ptr_array|byte_array)_sized_new functions, that reserve a · 03f9d485
      Sebastian Wilhelmi authored
      
      2000-04-17  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
      
      	* garray.c, glib.h: Added g_(array|ptr_array|byte_array)_sized_new
      	functions, that reserve a certain amount of memeory for the array
      	at creation time to avoid reallocation. Fixes bug #6707 from
      	Charles Kerr <ckerr@osserver1.nssl.noaa.gov>.
      03f9d485
  5. 24 Mar, 2000 1 commit
    • Sebastian Wilhelmi's avatar
      Made GArray behave correct. Now zero_terminated really means, that the · fe2e948e
      Sebastian Wilhelmi authored
      
      2000-03-24  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
      
      	* garray.c: Made GArray behave correct. Now zero_terminated really
      	means, that the element array->data[array->len] exists and is
      	zeroed, and clear means that any unassigned elements obtained
      	through g_array_set_size (the only way to get unassigned elements
      	AFAICT) are zeroed. Added some macors to mak the code more
      	obvoius. Also made GPtrArray zero elements after
      	g_ptr_array_set_size. This is done in a portbale way (assignment
      	of NULL instead of just memsetting it to zero), though that might
      	be more portability than we actually want.
      fe2e948e
  6. 24 Feb, 1999 1 commit
  7. 10 Feb, 1999 1 commit
  8. 17 Dec, 1998 1 commit
  9. 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
  10. 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
  11. 23 Nov, 1998 1 commit
  12. 03 Nov, 1998 1 commit
    • Sebastian Wilhelmi's avatar
      new function for removing an entry from an array while preserving the · 4dbf739e
      Sebastian Wilhelmi authored
      1998-11-03  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
      
      	* glib.h:
      	* garray.h:
      	(g_array_remove_index): new function for removing an entry from an
      	array while preserving the order
      	(g_array_remove_index_fast): new function for removing an entry
      	from an array. the order might be distorted
      	(g_ptr_array_remove_index_fast, g_ptr_array_remove_fast): new
      	functions; working similiar to the above. (they have the semantic
      	of the old g_ptr_array_remove[_index] functions)
      	(g_ptr_array_remove_index, g_ptr_array_remove): new semantic. now
      	the order of the elements in the array is not changed
      	(g_byte_array_remove_index, g_byte_array_remove_index_fast): new
      	functions; byte_array wrapper for g_array_remove_index[_fast]
      4dbf739e
  13. 07 Sep, 1998 1 commit
    • Tim Janik's avatar
      check for all three inline keywords individually. · 0b42c37e
      Tim Janik authored
      Mon Sep  7 07:53:21 1998  Tim Janik  <timj@gtk.org>
      
              * configure.in: check for all three inline keywords individually.
      
              * glib.h: inlining hassle. for compilers that don't allow the `inline'
              keyword, mostly because of strict ANSI C compliance or dumbness, we try
              to fall back to either `__inline__' or `__inline'.
              we define G_CAN_INLINE, if the compiler seems to be actually *capable*
              to do function inlining, in which case inline function bodys do make
              sense. we also define G_INLINE_FUNC to properly export the function
              prototypes if no inlinig can be performed. we special case most of the
              stuff, so inline functions can have a normal implementation by defining
              G_INLINE_FUNC to extern and G_CAN_INLINE to 1.
      
              * ltconfig: (compiler PIC flag test): special case linux for non
              aout systems to honour lcc's position independant code (cases
              "linux*aout)" and "linux*)" got added). (this needs to go into
              libtool which does an advanced test, checking for __LCC__).
      
              * autogen.sh: take $CC=lcc into account by invoking automake with
              --include-deps so lcc isn't scared by gcc's auto-dependancy
              generation code. care about $ACLOCAL_FLAGS. optionally feature
              autoheader.
      
              * minor fixups in other places to cure some of lcc's warnings.
      0b42c37e
  14. 02 Sep, 1998 2 commits
  15. 16 Aug, 1998 1 commit
    • Tim Janik's avatar
      version bump to 1.1.3, binary age 0, interface age 0. · d5803865
      Tim Janik authored
      Sun Aug 16 20:28:27 1998  Tim Janik  <timj@gtk.org>
      
              * version bump to 1.1.3, binary age 0, interface age 0.
      
              * glib.h: be nice to platforms that don't have gint64 and don't
              issue #warning on every compilation. since glib doesn't require
              gint64 itself, packages that need gint64 should test for this
              themselves.
      
              * glib.h:
              * gutils.c: added a new function g_vsnprintf().
      
      Fri Aug 14 16:41:53 1998  Tim Janik  <timj@gtk.org>
      
              * glib.h: added static inline functions for bit mask tests:
              g_bit_nth_lsf, g_bit_nth_msf and g_bit_storage.
      
      Fri Aug 13 14:23:37 1998  Tim Janik  <timj@gtk.org>
      
              * glib.h:
              * gmessages.c:
              revised the message handling system, which is now based on a new
              mechanism g_log*. most of the assertment macros got adapted to
              feature the new g_log() call with an additional specification of
              the log level in a preprocessor macro G_LOG_DOMAIN. if G_LOG_DOMAIN
              is undefined upon the includion of glib.h, it'll be defined with a
              value of (NULL) and thus preserves the original bahaviour for
              warning and error messages. the message handler setting functions
              for g_warning, g_error and g_message are only provided for backwards
              compatibility and might get removed somewhen.
      
              * Makefile.am: feature the G_LOG_DOMAIN macro to set the log domain
              to "GLib" upon compilation. we currently have to add this definition
              to the DEFS variable.
              * testglib.c: we need an ugly #undef G_LOG_DOMAIN at the start
              of this file currently, since automake doesn't support per target
              _CFLAGS yet.
      
              * glib.h: changed some gints to gbooleans, made a few const corrections,
              removed some superfluous G_STMT_START{}G_STMT_END wrappers, added some
              in other required places.
      
              * gnode.c:
              (g_node_prepend):
              (g_node_insert_before):
              (g_node_insert):
              (g_node_append_data):
              (g_node_prepend_data):
              (g_node_insert_data_before):
              (g_node_insert_data):
              (g_node_append):
              return (node), so these macros/functions can be usefully chained with
              g_node_new().
      
      [GModule]
      Fri Aug 14 02:24:39 1998  Tim Janik  <timj@gtk.org>
      
              * Makefile.am: feature the G_LOG_DOMAIN macro to set the log domain
              to "GModule" upon compilation. we currently have to add this definition
              to the DEFS variable.
              * testgmodule.c: we need an ugly #undef G_LOG_DOMAIN at the start
              of this file currently, since automake doesn't support per target
              _CFLAGS yet.
      d5803865
  16. 03 Aug, 1998 1 commit
  17. 12 Jun, 1998 1 commit
    • Josh MacDonald's avatar
      [Changes from josh to sync with his glib stuff -Yosh] · df9a49ec
      Josh MacDonald authored
      Fri Jun 12 00:39:28 1998  Josh MacDonald  <jmacd@icw.EECS.Berkeley.EDU>
      
              * glib.h: add new hash and equal functions g_int_*.  complement
              g_direct_hash with g_direct_equal.
      
              * grel.c: new file, GRelations implement tuples of N-N mappings.
              A comment in glib.h briefly describes the interface.
      
              * ghash.c: new function, g_hash_table_size
      
              * glib.h: new typedefs, gsize, gssize, gtime.
      
              * garray.c: new functions implementing a simplified GArray.  This
              GPtrArray is an array of gpointers and has functions to add and
              remove elements, much like java.lang.Vector.
      
              * garray.c: new functions for the single-byte special case of
              GArray.  The functions g_byte_array* operate on arrays of bytes.
              Internally, a GArray is used.
      
              * testglib.c: tests for g_ptr_array, g_byte_array, and g_relation...
      df9a49ec
  18. 10 Jun, 1998 1 commit