1. 26 Jul, 2003 1 commit
  2. 04 Dec, 2002 1 commit
  3. 07 May, 2002 1 commit
    • Owen Taylor's avatar
      Fixes for #79347, Ron Arts. · 053a1ce4
      Owen Taylor authored
      Tue May  7 11:24:22 2002  Owen Taylor  <otaylor@redhat.com>
      
              Fixes for #79347, Ron Arts.
      
              * glib/gqsort.c (g_qsort_with_data): Handle 0 elements,
              don't g_return_if_fail().
      
              * tests/qsort-test.c (main): Add a 0 element test.
      
              * glib/garray.c (g_[ptr_]array_sort_with[_data]):
              Remove invalid assertions that array->pdata != NULL ..
              it's NULL for 0 elements which is a valid case.
      053a1ce4
  4. 23 Jun, 2001 1 commit
    • Owen Taylor's avatar
      Changes for 64-bit cleanliness, loosely based on patch from Mark Murnane. · f5c28ce4
      Owen Taylor authored
      Wed Jun 20 12:00:54 2001  Owen Taylor  <otaylor@redhat.com>
      
              Changes for 64-bit cleanliness, loosely based on patch
      	from Mark Murnane.
      
      	* gconvert.c (g_convert/g_convert_with_fallback): Remove
      	workarounds for since-fixed GNU libc bugs. Minor
      	doc fix.
      
      	* gconvert.[ch]: Change gint to gsize/gssize as
      	appropriate.
      
      	* gconvert.c (g_locale/filename_to/from_utf8): Fix incorrect
      	computation of bytes_read / bytes_written.
      
      	* gfileutils.[ch] (g_file_get_contents): Make length
      	out parameter 'gsize *len'.
      
      	* ghook.c (g_hook_compare_ids): Don't compare a
      	and b as 'a - b'.
      
      	* gmacros.h (GSIZE_TO_POINTER): Add GPOINTER_TO_SIZE,
      	GSIZE_TO_POINTER.
      
      	* gmain.c (g_timeout_prepare): Rewrite to avoid
      	overflows. (Fixes bug when system clock skews
      	backwards more than 24 days.)
      
      	* gmarkup.[ch]: Make lengths passed to callbacks
      	gsize, length for g_markup_parse-context_parse(),
      	g_markup_escape_text() gssize.
      
      	* gmessages.[ch] (g_printf_string_upper_bound): Change
      	return value to gsize.
      
      	* gmessages.c (printf_string_upper_bound): Remove
      	a ridiculous use of 'inline' on a 300 line function.
      
      	* gstring.[ch]: Represent size of string as a gsize,
      	not gint. Make parameters to functions take gsize,
      	or gssize where -1 is allowed.
      
      	* gstring.c (g_string_erase): Make
      	g_string_erase (string, pos, -1) a synonym for
      	g_string_truncate for consistency with other G*
      	APIs.
      
      	* gstrfuncs.[ch]: Make all functions taking a string
      	length, take a gsize, or gssize if -1 is allowed.
      	(g_strstr_len, g_strrstr_len). Also fix some boundary
      	conditions in g_str[r]str[_len].
      
      	* gutf8.c tests/unicode-encoding.c: Make parameters that
      	are byte lengths gsize, gssize as appropriate. Make
      	character offsets, other counts, glong.
      
      	* gasyncqueue.c gcompletion.c
                timeloop.c timeloop-basic.c gutils.c gspawn.c.
      	Small 64 bit cleanliness fixups.
      
      	* glist.c (g_list_sort2, g_list_sort_real): Fix functions
      	that should have been static.
      
      	* gdate.c (g_date_fill_parse_tokens): Fix extra
      	declaration that was shadowing another.
      
      	* tests/module-test.c: Include string.h
      
      Mon Jun 18 15:43:29 2001  Owen Taylor  <otaylor@redhat.com>
      
      	* gutf8.c (g_get_charset): Make argument
      	G_CONST_RETURN char **.
      f5c28ce4
  5. 23 May, 2001 1 commit
    • Sebastian Wilhelmi's avatar
      Tiny speed improvement suggested by noon@users.sourceforge.net. · ef492967
      Sebastian Wilhelmi authored
      
      2001-05-23  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
      
      	* garray.c (g_array_remove_index_fast): Tiny speed improvement
      	suggested by noon@users.sourceforge.net.
      
      	* glib/tmpl/arrays.sgml, glib/tmpl/arrays_pointers.sgml,
      	glib/tmpl/arrays_byte.sgml: Corrected documentation for the
      	..._sized_new functions. Discovered by noon@users.sourceforge.net.
      ef492967
  6. 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
  7. 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
  8. 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
  9. 25 Sep, 2000 1 commit
  10. 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
  11. 26 Jul, 2000 1 commit
  12. 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
  13. 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
  14. 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
  15. 24 Feb, 1999 1 commit
  16. 10 Feb, 1999 1 commit
  17. 17 Dec, 1998 1 commit
  18. 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
  19. 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
  20. 23 Nov, 1998 1 commit
  21. 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
  22. 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
  23. 02 Sep, 1998 2 commits
  24. 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
  25. 03 Aug, 1998 1 commit
  26. 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
  27. 10 Jun, 1998 1 commit