1 2006-03-01 Tor Lillqvist <tml@novell.com>
3 * glib/gutils.c (g_listenv): Separate implementation on Win32: Use
4 the wide character API on NT-based Windows. Return UTF-8 strings.
6 * glib/glib.symbols: Don't mark g_listenv as PRIVATE, as that
7 meant it wasn't present in the import library. PRIVATE is used
8 only for the backwards-compatibility DLL ABI stability hacks.
10 2006-02-24 Matthias Clasen <mclasen@redhat.com>
12 * configure.in: Bump version
14 * === Released 2.10.0 ===
16 * README.in: Mention the slice allocator and GInitiallyUnowned.
20 * configure.in: Bump version to 2.10.0
22 * tests/utf8-pointer.c: Add tests for g_utf8_strlen().
24 * glib/gutf8.c: Fix boundary cases in g_utf8_strlen().
27 2006-02-23 Kjartan Maraas <kmaraas@gnome.org>
29 * tests/completion-test.c: (main): Plug leaks reported by
31 * tests/convert-test.c: (test_iconv_state), (test_one_half):
33 * tests/patterntest.c: (test_compilation): Same
34 * tests/shell-test.c: (do_argv_test): Same.
35 * tests/unicode-caseconv.c: (main): Same.
36 * tests/uri-test.c: (run_to_uri_tests): Same.
39 2006-02-19 Martyn Russell <martyn@imendio.com>
41 * tests/asyncqueue-test.c:
43 * tests/slist-test.c: Updated to test _sort, _sort_with_data,
44 _insert_sorted and _insert_sorted_with_data API.
46 2006-02-18 Matthias Clasen <mclasen@redhat.com>
48 * tests/gobject/Makefile.am: Add paramspec-test
50 * tests/gobject/paramspec-test.c: Some GParamSpec tests.
52 * tests/gobject/gvalue-test.c: Add more tests.
54 2006-02-17 Kang Jeong-Hee <keizie@gmail.com>
56 * glib/gutf8.c (g_utf8_find_prev_char): Correct documentation typo.
58 2006-02-15 Sebastian Wilhelmi <seppi@seppi.de>
60 * glib/gthreadpool.c: Fix deadlock when signalling the thread
61 which freed a thread pool (#331110, Chris Wilson).
63 Tue Feb 14 17:00:43 2006 Tim Janik <timj@imendio.com>
65 * glib/gslice.c: only define _XOPEN_SOURCE to 600 to get at
66 posix_memalign() in case we actually are going to use it, because
67 we detected a compliant implementation (#328997).
69 * configure.in (enable_included_printf): don't include malloc.h when
70 testing for posix_memalign() funcitonality, since this may break the
71 test on some systems (#328997).
73 2006-02-14 Matthias Clasen <mclasen@redhat.com>
75 * glib/gstrfuncs.c: Improve docs.
77 2006-02-11 Matthias Clasen <mclasen@redhat.com>
79 * configure.in: Bump version
81 2006-02-10 Matthias Clasen <mclasen@redhat.com>
83 * === Released 2.9.6 ===
87 2006-01-31 Behdad Esfahbod <behdad@gnome.org>
89 * docs/reference/glib/tmpl/relations.sgml (g_relation_insert): Specify
90 the type of varargs arguments. (bug #317679)
92 2006-01-31 Matthias Clasen <mclasen@redhat.com>
94 * autogen.sh: Touch README and INSTALL here to pacify
95 automake. (#329124, Kjartan Maraas, Tim Janik)
97 Tue Jan 31 16:45:03 2006 Tim Janik <timj@imendio.com>
99 * glib/gdataset.c: carry out all dtalist pointer accesses atomically,
100 some missing cases where pointed out by Sebastian Wilhelmi.
102 Tue Jan 31 12:33:48 2006 Tim Janik <timj@imendio.com>
104 * configure.in: generate build/win32/vs8/Makefile, to fix build breakage.
106 2006-01-30 David Schleef <ds@schleef.org>
108 * glib/grand.c: Update URL
110 2006-01-29 Sven Herzberg <herzi@gnome-de.org>
112 * docs/reference/gobject/tmpl/param_value_types.sgml: tell how to
113 create container classes which are as flexible as a GValue is
115 2006-01-27 Matthias Clasen <mclasen@redhat.com>
117 * configure.in: Bump version
119 * === Released 2.9.5 ===
121 * glib/glib.symbols: Add g_mem_gc_friendly as an exported
126 2006-01-26 Matthias Clasen <mclasen@redhat.com>
128 * glib/gmem.c (g_mem_init_nomessage): Fix C99isms. (#328705,
131 Wed Jan 25 19:16:57 2006 Tim Janik <timj@imendio.com>
133 * fixed buglets reported by Jens Granseuer in #328254.
135 * configure.in: free the memory allocated in posix_memalign() tests.
137 * glib/gslice.c: spelling fixes.
139 Wed Jan 25 16:39:18 2006 Tim Janik <timj@imendio.com>
141 * glib/gslice.c: honour g_mem_gc_friendly settings when freeing
142 slices, make sure g_mem_gc_friendly is properly initialized.
144 * gmem.[hc]: ensure g_mem_gc_friendly is initialized from G_DEBUG upon
145 the first allocation. applied some branching optimizations.
147 * docs/macros.txt: reflected --enable-gc-friendly change and
148 described ENABLE_GC_FRIENDLY_DEFAULT as well as G_DEBUG=gc-friendly.
150 * configure.in: changed --enable-gc-friendly=yes to define
151 ENABLE_GC_FRIENDLY_DEFAULT.
153 * glib/garray.c: changed ENABLE_GC_FRIENDLY macro #ifdef-s to
154 if (G_UNLIKELY (g_mem_gc_friendly)).
157 * glib/ghash.c: removed ENABLE_GC_FRIENDLY code which is now taken
158 care of by g_slice_free1().
160 * tests/slice-test.c: fixed leaks, reported by Kjartan Maraas.
162 Tue Jan 24 17:49:36 2006 Tim Janik <timj@imendio.com>
164 * glib/gslice.c: only use posix_memalign() if it's known to work,
165 revert to memalign() otherwise.
167 * configure.in: check for broken posix_memalign() implementations
170 2006-01-24 Matthias Clasen <mclasen@redhat.com>
172 * tests/unicode-encoding.c: Use UTF-16LE as target encoding
173 on all little-endian systems. (#143380, Marc Moorcroft)
175 2006-01-23 Matthias Clasen <mclasen@redhat.com>
177 * configure.in: Change the shared libary extension for hpux-ia64
178 to so. (#328253, The Written Word)
180 Mon Jan 23 17:30:33 2006 Tim Janik <timj@imendio.com>
182 * glib/gutils.c (_g_getenv_nomalloc): wiped out all the wonderfull
183 G_OS_WIN32 code i wrote ;-[) after tml told me windows has getenv()
186 Mon Jan 23 16:46:20 2006 Tim Janik <timj@imendio.com>
188 * glib/gslice.c (slice_config_init): initialize GSlice config from
189 G_SLICE environment variable. we support G_SLICE=always-malloc
190 currently, which forces all g_slice_*() allocations to use the system
194 g_parse_debug_string(): added a note about not using g_malloc() here.
195 _g_getenv_nomalloc(): getenv() variant that doesn't use g_malloc or
196 g_slice. contains only guesswork in the WIN32 branch.
198 2006-01-18 Matthias Clasen <mclasen@redhat.com>
202 * === Released 2.9.4 ===
206 2006-01-17 Matthias Clasen <mclasen@redhat.com>
208 * glib/gkeyfile.c (g_key_file_get_groups): Correct a g_new0()
209 call. (#327421, Morten Welinder)
211 2006-01-17 Sebastian Wilhelmi <seppi@seppi.de>
213 * glib/gthreadpool.c: To avoid deadlocks get rid of the settings
214 G_LOCK. Use the unused_thread_queue lock instead. Change
215 g_thread_pool_thread_proxy such that threads only wait on
216 non-exlusive pools for at most a 1/2 second. Do not reorder tasks
217 due to superfluous tasks. Global tasks wait at most for
218 max-idle-time milliseconds. Make sure, that no task is woken up
219 twice for the same event via a wakeup_serial. This fixes #324228.
221 * tests/threadpool-test.c: Adapt test accordingly. Do not pass
222 invalid NULL into the thread pools. This as well fixes #327290.
224 2006-01-16 Matthias Clasen <mclasen@redhat.com>
226 * configure.in: Bump version
228 * === Released 2.9.3 ===
232 * glib/gthread.h (g_static_mutex_get_mutex_impl_shortcut):
233 Rework the strict aliasing fix to not break C++, pointed
234 out by Murray Cumming.
236 * glib/gasyncqueue.c (g_async_queue_push_sorted_unlocked):
237 Signal waiting threads, problem noticed by Christian Kellner.
239 2006-01-16 Matthias Clasen <mclasen@redhat.com>
241 Fix bug 326747, Alberto Ruiz:
243 * glib/gconvert.c (make_valid_utf8): Change this function to
244 replace unknown characters by the Unicode replacement character
245 instead of '?', and don't append "(invalid encoding)".
246 (g_filename_display_name, g_filename_display_basename): Document
247 how to determine if the filename was in an invalid encoding.
249 2006-01-14 Matthias Clasen <mclasen@redhat.com>
251 * glib/gtree.c: Replace the simple recursive implementation
252 by a nonrecursive, threaded implementation by Maurizio
255 2006-01-12 Matthias Clasen <mclasen@redhat.com>
257 * tests/asyncqueue-test.c (main): Fix the
258 assert to not always trigger. (#326558,
261 2006-01-11 Matthias Clasen <mclasen@redhat.com>
263 * tests/convert-test.c: Don't test items_read and
264 items_written in error cases where it is not set.
266 * tests/asyncqueue-test.c: Set error to NULL.
268 2006-01-08 Matthias Clasen <mclasen@redhat.com>
270 * glib/gtree.c: Break some long lines.
272 * tests/tree-test.c: Add more tests.
274 * glib/gslice.c: Include config.h first, pointed out
277 2005-12-20 Sven Herzberg <herzi@gnome-de.org>
279 * docs/reference/gobject/tmpl/gtype.sgml: explain that
280 G_TYPE_INSTANCE_GET_CLASS() does behave different during
283 2006-01-06 Matthias Clasen <mclasen@redhat.com>
285 * glib/gslice.c: Only define _XOPEN_SOURCE if we know
286 that we have posix_memalign(). (#323937, Bogdan Nicula)
288 2006-01-05 Matthias Clasen <mclasen@redhat.com>
290 * configure.in: Bump version
292 * === Released 2.9.2 ===
294 2006-01-05 Hans Breuer <hans@breuer.org>
296 * glib/makefile.msc.in : added gslice.obj
298 2006-01-05 Matthias Clasen <mclasen@redhat.com>
302 * glib/gmain.c: Clarify the documentation of source ids
303 a bit. (#325874, Dan Williams)
305 * configure.in: Fix another strict aliasing problem.
307 * glib/gthreadpool.c: Avoid use of varargs macro. (#325864,
310 2006-01-04 Manish Singh <yosh@gimp.org>
313 * glib/gstdio.h: don't macroized g_access, g_chdir, and g_unlink
314 either, since they have the same issue as g_rmdir. (Related to
317 Wed Jan 4 13:33:25 2006 Tim Janik <timj@gtk.org>
319 * glib/gslice.c (magazine_cache_pop_magazine): don't reverse chunk
320 order when creating magazines, so we hand out chunks with ascending
323 2006-01-04 Abel Cheung <maddog@linuxhall.org>
325 * configure.in: Added "ml" "zh_HK" to ALL_LINGUAS.
327 2006-01-03 Martyn Russell <martyn@imendio.com>
329 * docs/reference/glib/glib-sections.txt:
331 * glib/gthreadpool.[ch]:
332 - Added new API g_thread_pool_get_idle_time() and
333 g_thread_pool_set_idle_time(). (#324228).
335 * tests/threadpool-test.c:
336 - Updated test case to do thread pool sorting, thread pool with
337 no sorting and a thread pool with idle thread timeouts.
339 2006-01-03 Matthias Clasen <mclasen@redhat.com>
341 * glib/gmain.h: Add new functions here, too.
343 * glib/glib.symbols: Add new functions.
345 2005-12-20 Michael Meeks <michael.meeks@novell.com>
347 * glib/gmain.c (g_main_context_is_owner): new method
348 to determine if the current thread is the owner of the
351 2006-01-02 Matthias Clasen <mclasen@redhat.com>
355 * glib/gstdio.c (g_rmdir): Don't provide g_rmdir() as a macro
356 expanding to rmdir, since rmdir is not declared in a portable
357 system header we can include in gstdio.h. (#325249, Jani Monoses)
359 2006-01-01 Tor Lillqvist <tml@novell.com>
361 * glib/gspawn-win32.c (g_spawn_sync_utf8): Set the GIOChannels for
362 stdout and stderr to unbuffered. Otherwise the giochannel layer
363 will try to read from them regardless whether the
364 g_io_channel_win32_poll() call here has indicated
365 readability or not. (#325310)
367 2005-12-29 Matthias Clasen <mclasen@redhat.com>
369 * glib/gutils.c (glib_check_version): Fix a copy-and-paste error
370 in the docs. (#325273, Declan Naughton)
372 2005-12-27 Manish Singh <yosh@gimp.org>
374 * tests/run-collate-tests.sh: use LC_ALL instead of LC_COLLATE, to
375 make sure we really override things.
377 2005-12-27 Matthias Clasen <mclasen@redhat.com>
379 Fix #316221, Michal Benes, Stanislav Brabec;
381 * configure.in: Fix a strict aliasing problem in
382 g_static_mutex_get_mutex().
383 * glib/gthread.h: ...and in
384 g_static_mutex_get_mutex_impl_shortcut().
386 * glib/gdatasetprivate.h: Add a cast to silence compiler
387 warnings. (#321978, Andrew Paprocki)
389 Partial fix for bug #323937, Bogdan Nicula.
391 * configure.in: Check for malloc.h
392 * glib/gslice.c: Don't include malloc.h unconditionally.
394 2005-12-27 Manish Singh <yosh@gimp.org>
396 * tests/run-collate-tests.sh: export LC_COLLATE so it takes.
397 (#324950, Dan Yefimov)
399 2005-12-26 Matthias Clasen <mclasen@redhat.com>
401 * glib/gslice.c: On Win32, include process.h (#325015, Kazuki
404 2005-12-25 Matthias Clasen <mclasen@redhat.com>
406 * AUTHORS: Update my email
408 * tests/slice-test.c: Fix C99isms. (#324950, Dan Yefimov)
410 2005-12-21 Matthias Clasen <mclasen@redhat.com>
412 * README.in: Add some notes on when 'make check' may fail.
414 2005-12-20 Matthias Clasen <mclasen@redhat.com>
417 * glib/gthreadpool.h:
418 * glib/gthreadpool.c (g_thread_pool_set_sort_function): New function
419 to sort tasks pushed into a threadpool. (#324479, Martyn Russell)
421 * tests/threadpool-test.c: Test this.
423 Tue Dec 20 18:14:14 2005 Tim Janik <timj@imendio.com>
425 * glib/gslice.[hc]: added mem_error() and mem_assert() to test and
426 handle errors without depending on gmessage.c which might not be
427 setup when the error occours.
428 removed G_SLICE_CONFIG_ALWAYS_FREE config option, fixed the code so
429 always freeing can be achieved by adjusting the working set time to
430 0 with G_SLICE_CONFIG_WORKING_SET_MSECS.
431 added G_SLICE_CONFIG_COLOR_INCREMENT to test different color increments
432 (mainly 0 and 1). reduced the minimum block size to 128 bytes, to
433 minimize wastage if small amounts of differently sized structrues are
434 allocated, this does come at a performance cost of roughly 5% though.
435 fixed up block alignment calculation, so it works for varying
436 block sizes. only use strerror() not g_strerror() since the latter
437 depends on working GQuark and GSlice.
438 mem_error(): implemented in terms of fprintf and vfprintf.
440 * tests/slice-color.c: new program to test cache colorization effects.
442 * tests/slice-test.c: trade G_SLICE_CONFIG_ALWAYS_FREE for 0 duration
443 G_SLICE_CONFIG_WORKING_SET_MSECS.
445 2005-12-17 Matthias Clasen <mclasen@redhat.com>
447 * glib/goption.c (parse_short_option): Set an error in all
448 failure cases. (#324332, Tim-Philipp Müller)
450 2005-12-17 Sebastian Wilhelmi <seppi@seppi.de>
452 * glib/gatomic.c: Fix memory barrier position in g_atomic_int_get
453 and g_atomic_pointer_get. Add g_atomic_int_set and
454 g_atomic_pointer_set implementations for the !DEFINE_WITH_MUTEXES &&
455 G_ATOMIC_OP_MEMORY_BARRIER_NEEDED case, as well as defining them
456 as functions (additionally to the macros in the header) for the
457 !G_ATOMIC_OP_MEMORY_BARRIER_NEEDED case.
459 2005-12-16 Matthias Clasen <mclasen@redhat.com>
461 * glib/gmem.c (g_allocator_new): Don't return a pointer to
462 a const struct, since apps expect to be able to modify it.
463 (#324179, J. Ali Harlow)
465 Tue Dec 13 10:13:32 2005 Tim Janik <timj@imendio.com>
467 * glib/gatomic.h: added g_atomic_pointer_set() and g_atomic_int_set()
468 for systems where the initialization of atomic variables requires a
469 write memory barrier.
471 2005-12-09 Matthias Clasen <mclasen@redhat.com>
473 * configure.in: Bump version
475 * === Released 2.9.1 ===
477 2005-12-09 Alexander Larsson <alexl@redhat.com>
481 Use G_GNUC_WARN_UNUSED_RESULT on list functions that return
484 2005-12-08 Matthias Clasen <mclasen@redhat.com>
488 2005-12-07 Martyn Russell <martyn@imendio.com>
490 * glib/gasyncqueue.c:
491 - Call g_queue_insert_sorted() instead of duplicating the code.
492 - Call g_queue_sort() instead of duplicating the code.
493 - Invert sort function results to make sure the same sort function
494 gives the same results across glist, gslist, gqueue and
497 * tests/asyncqueue-test.c:
498 - Updated the sort function to reflect the example in the
499 documentation for gasyncqueue.c.
501 2005-12-07 Martyn Russell <martyn@imendio.com>
503 * docs/reference/glib/glib-sections.txt:
504 * docs/reference/glib/tmpl/linked_lists_double.sgml:
505 * docs/reference/glib/tmpl/linked_lists_single.sgml:
508 - Added g_list_insert_sorted_with_data () and
509 g_slist_insert_sorted_with_data ().
510 - Removed the extra check in g_list_sort() and g_slist_sort() for
511 GCompareDataFunc vs. GCompareFunc.
513 2005-12-07 Tor Lillqvist <tml@novell.com>
515 * glib-gettextize.in: Look up prefix at run-time on Win32,
516 assuming the standard directory structure with glib-gettextize in
519 2005-12-06 Matthias Clasen <mclasen@redhat.com>
521 * glib/gmem.h: Exempt GTK+ from the mem chunk deprecation, since
522 we need GTK+ 2.8 to compile against GLib 2.10.
524 2005-12-05 Manish Singh <yosh@gimp.org>
526 * tests/run-collate-test.sh: set LC_COLLATE, not LANG, to be sure
527 to override any user settings.
529 2005-12-05 Matthias Clasen <mclasen@redhat.com>
531 * configure.in: Revert an accidential commit
533 2005-12-05 Matthias Clasen <mclasen@redhat.com>
535 * glib/gutf8.c: Documentation updates. (#323291, Morten Welinder)
537 * tests/Makefile.am (TESTS_ENVIRONMENT):
538 * tests/gobject/Makefile.am (TESTS_ENVIRONMENT): Set
539 MALLOC_CHECK_ and MALLOC_PERTURB_
541 * tests/run-collate-tests.sh: Run the collation tests explicitly
542 in en_US locale. (#320463)
544 * glib/gmem.h: Really deprecate GMemChunk.
551 * glib/gstrfuncs.c: Add versioned deprecation docs.
553 2005-12-05 Martyn Russell <martyn@imendio.com>
555 * docs/reference/glib/glib-sections.txt:
556 * glib/gasyncqueue.[ch]:
557 - Added support for sorting async queues by with _push_sorted(),
558 _push_sorted_unlocked(), _sort() and _sort_unlocked() (#323047).
561 * tests/asyncqueue-test.c:
562 - Added test case for gasyncqueue.c
564 Mon Dec 5 15:53:20 2005 Tim Janik <timj@imendio.com>
566 * glib/gslice.c: implement chain walking for arbitrary ->next pointer
567 offsets in g_slice_free_chain_with_offset() based on a patch by behdad
568 in bug 323178. moved time consuming logic from g_slice_free() out of
569 the inner loop, so g_slice_free_chain_with_offset() provides a real
570 performance benefit over g_slice_free1() now.
572 * glib/gslice.h: renamed g_slice_free_chain() to
573 g_slice_free_chain_with_offset(). implemented g_slice_free_chain() as
574 a type-safe macro as suggested in bug 323178.
575 simplified the macro implementation of g_slice_free() and implemented
576 it in a type safe manner for all compliers as suggested by Morten
577 Welinder <mortenw@gnome.org>.
582 * glib/glib.symbols: s/g_slice_free_chain/g_slice_free_chain_with_offset/
584 2005-12-05 Matthias Clasen <mclasen@redhat.com>
586 * glib/gasyncqueue.c: Add some docs.
588 * tests/libmoduletestplugin_a.c: Fix compiler warnings.
590 * glib/gatomic.c: In the ia64 implementation, use
591 __sync builtin without _si or _di suffix. (#321229,
592 Stanislav Brabec, patch by Andreas Schwab)
594 2005-12-04 Behdad Esfahbod <behdad@gnome.org>
596 * glib/gslice.h: Remove comma at the end of enum.
598 2005-12-04 Matthias Clasen <mclasen@redhat.com>
600 Handle multiple user names with the same UID better.
601 (#319535, Laszlo Peter)
603 * glib/gutils.c (g_get_any_init_do): When determining user
604 data, first look up $LOGNAME. If the UID doesn't match
605 getuid(), fall back to the current behaviour of looking
606 up the user data based on getuid().
608 2005-12-04 Matthias Clasen <mclasen@redhat.com>
610 * glib/gmacros.h (G_GNUC_WARN_UNUSED_RESULT): Add a macro
611 to make gcc warn if a function result is ignored. (#145466,
612 Arjan van de Ven, Alex Larsson)
614 * glib/gmem.h: Add the new attribute to g_realloc and
617 2005-12-03 Matthias Clasen <mclasen@redhat.com>
620 * glib/gcache.h: Deprecate g_cache_value_foreach. (#322956,
623 * glib/gmappedfile.c: Make mapping of empty files
626 * glib/gfileutils.c: Don't fork a new process just to
627 fix the permissions of the created temp file. (#321318,
628 Alexis S. L. Carvalho)
630 2005-12-02 Matthias Clasen <mclasen@redhat.com>
632 * README.in: Add a note about Solaris threads.
635 * configure.in: Remove support for Solaris threads.
636 (#136971, Sebastian Wilhelmi, patch by Andrew Paprocki)
638 2005-12-02 Matthias Clasen <mclasen@redhat.com>
640 * configure.in: Define G_GUINT64_CONSTANT in analogy to
641 G_GINT64_CONSTANT. (#322568, Andrew Paprocki)
643 2005-12-02 Matthias Clasen <mclasen@redhat.com>
645 * glib/gslice.c: Win32 portability fixes and C99ism removal,
646 pointed out by Kazuki Iwamoto. (#323052)
648 2005-12-02 Matthias Clasen <mclasen@redhat.com>
650 * glib/gatomic.c (g_atomic_int_add): Add a missing volatile for
651 the IA64 implementation.
653 Fri Dec 2 16:18:09 2005 Tim Janik <timj@imendio.com>
655 * glib/gslice.c: some naming and type size fixups.
657 Fri Dec 2 13:08:58 2005 Tim Janik <timj@gtk.org>
659 * glib/gslice.h (g_slice_free): reworked GCC-specific type-safe macro
660 variant into something less verbose, but digestible for gcc-3.4.
662 Fri Dec 2 10:55:07 2005 Tim Janik <timj@imendio.com>
664 * tests/slice-test.c: extended to perform the benchmarking on the old
665 memchunk code if 'O' is selected.
667 * tests/memchunks.c: new file which contains the old GLib mem chunks
668 implementation with prefix old_mem_chunk_.
670 * tests/Makefile.am: added memchunks.c
672 Fri Dec 2 00:16:59 2005 Tim Janik <timj@imendio.com>
674 * glib/gslice.c: improved gettimeofday() timer resolution by maintaining
675 acceptable load distribution of the syscall.
676 (allocator_get_magazine_threshold): reduce minimum/single-thread magazine
677 sizes to approximately page_size/2.5 to avoid excessive startup allocations.
679 2005-12-01 Matthias Clasen <mclasen@redhat.com>
681 * tests/gobject/ifacecheck.c (test_iface_base_init): Don't
682 double-free base interface members.
684 * tests/Makefile.am: Remove duplicate variable.
686 Thu Dec 1 17:32:46 2005 Tim Janik <timj@imendio.com>
688 * glib/gslice.[hc]: new slice allocator implementation.
690 * tests/slice-test.c: added random slice allocation test.
692 * glib/gthread.[hc]: removed newly added private thread mem API.
694 * glib/gthreadinit.h:
697 * glib/gmem.c: divided glib threading initialisation into three phases,
698 initialisation where private keys and messaging are not available (only
699 needed by gmem.c), initialisation without messaging but private keys
700 available (gslice.c, gmessage.c), and full fledged initialisers that
701 server the rest of glib. initialisation functions got renamed to reflect
702 the limitations of their corresponding phases.
704 * glib/gmem.c: removed memchunk code, defer allocations to
707 * glib/gmem.[hc]: removed g_slice_* skeletons.
709 * glib/glib.symbols: added g_slice_* symbols.
711 * configure.in: check for availability of posix_memalign(3), memalign(3)
714 * glib/Makefile.am: added gslice.[hc].
716 2005-12-01 Tor Lillqvist <tml@novell.com>
718 * glib/gstdio.c (g_stat): In the Win32 implementation, strip
719 trailing slash(es) for non-root folders. stat() fails if non-root
720 folders are specified with trailing slashes. It's too much hassle
721 to demand that callers strip such slashes themselves, especially
722 as it is easy to get it wrong and strip the slash of a root
724 (g_rename): On NT-based Windows, use MoveFileEx() with
725 MOVEFILE_REPLACE_EXISTING to better match Unix behaviour.
727 2005-11-28 Matthias Clasen <mclasen@redhat.com>
729 Fix G_STMT_START / G_STMT_END on Solaris. (#321972,
732 * configure.in: Check whether do { } while (0) works.
734 * glib/gmacros.h: Use do { } while (0) for G_STMT_START /
735 G_STMT_END if it works.
737 2005-11-28 Matthias Clasen <mclasen@redhat.com>
739 * glib/gthread.c (g_static_rw_lock_wait, g_static_rw_lock_signal):
740 * glib/gnode.c (g_node_depth_traverse_level):
741 * glib/gmem.c (g_allocator_new):
742 * glib/ghash.c (g_hash_table_unref, g_hash_table_destroy)
743 (g_hash_table_foreach_remove_or_steal): Silence compiler
746 2005-11-27 Matthias Clasen <mclasen@redhat.com>
748 * glib/gunicollate.c (g_utf8_collate_key_for_filename):
749 Don't read beyond len. (#322520, Christian Persch)
751 Wed Nov 23 17:34:01 2005 Tim Janik <timj@imendio.com>
753 * glib/gdataset.c: access datalist flags via atomic pointer access
754 functions, instead of acquiring the dataset lock. this is faster and
755 also matches the atomic pointer readouts in gdatalistprivate.h and
756 direct pointer modifications required by gobject.c.
758 Wed Nov 23 13:35:31 2005 Tim Janik <timj@gtk.org>
760 * glib/gdataset.c: streamlined initialization code somewhat,
761 removed GData node cache.
763 2005-11-22 Matthias Clasen <mclasen@redhat.com>
765 * glib/ghash.c (g_hash_table_ref):
766 (g_hash_table_unref): Mark these as new API.
768 Avoid double locking in g_intern_string (#322133,
771 * glib/gdataset.c (g_quark_from_string_internal): New
772 internal function which factors out common parts of
773 g_quark_from[_static]_string.
774 (g_quark_from_string, g_quark_from_static_string):
775 Use g_quark_from_string_internal.
776 (g_intern_string, g_intern_static_string): Use
777 g_quark_from_string_internal, and only take the
779 (g_quark_new): Don't store the strings shifted by -1
780 in the g_quarks array.
781 (g_quark_to_string): Adapt to the previous change.
783 Tue Nov 22 14:04:26 2005 Tim Janik <timj@imendio.com>
787 g_hash_table_new_full(): create hash tables with a ref count of 1.
788 g_hash_table_ref(): atomically ref_count+=1
789 g_hash_table_unref(): atomically ref_count-=1, destroys hash table
790 when refcount reaches 0.
791 g_hash_table_destroy(): just destroy keys and values, unref by 1.
792 g_hash_table_insert():
793 g_hash_table_replace(): assert ref_count>0.
796 * glib/gatomic.c: added 'volatile' qualifier to all atomic pointer and
799 2005-11-20 Behdad Esfahbod <behdad@gnome.org>
801 * glib/guniprop.c (g_unichar_get_mirror_char): Remove unused
802 variables. (#321984, Andrew Paprocki)
804 2005-11-18 Matthias Clasen <mclasen@redhat.com>
806 * configure.in: Bump version
808 2005-11-17 Matthias Clasen <mclasen@redhat.com>
810 * === Released 2.9.0 ===
812 * glib/glib.symbols: Updates
814 * glib/gutf8.c (g_utf8_offset_to_pointer): Add some performance
815 hints to the docs. (Paolo Borelli)
819 * glib/gthread.c (g_thread_foreach): Mark as new api.
821 * README.in: Updates.
825 * glib/gdate.c (g_date_set_time_t):
826 (g_date_set_time_val): Add functions to set a date from
827 a time_t and from a GTimeVal.
828 (g_date_set_time): Deprecate. (#314067, Roger Leigh)
831 * tests/utf8-pointer.c: Unit tests for g_utf8_pointer_to_offset
832 and g_utf8_offset_to_pointer.
834 * glib/gutf8.c (g_utf8_pointer_to_offset)
835 (g_utf8_offset_to_pointer): Handle negative offsets, and use
836 "stutter stepping" for going backwards. (#320638, Larry
841 * glib/gthread.c: const correctness fixes, found
842 by Arjan van de Ven and gcc.
844 2005-11-16 Behdad Esfahbod <behdad@gnome.org>
846 * docs/reference/glib/tmpl/unicode.sgml: Correct typo on mentioning
847 @G_UNICODE_BREAK_UNKNOWN that should be #G_UNICODE_BREAK_UNKNOWN.
849 2005-11-09 Behdad Esfahbod <behdad@gnome.org>
851 * glib/guniprop.c: Use bit hacks instead when checking a general
852 category value against multiple values.
854 * glib/gutf8.c: Change ISO10646 to Unicode in docs.
856 2005-11-10 Simos Xenitellis <simos@gnome.org>
858 * configure.in: Added tt (Tatar) to ALL_LINGUAS.
860 2005-11-05 Tor Lillqvist <tml@novell.com>
862 * glib/giowin32.c (g_io_win32_set_flags): Don't call g_warning().
863 (#320688) Instead set error and return failure.
865 2005-11-07 Matthias Clasen <mclasen@redhat.com>
867 * glib/gmain.c (g_main_dispatch): Don't call cb_funcs->unref
868 while holding the context lock. (#320886, Andy Wingo)
870 2005-11-07 Billy Biggs <vektor@dumbterm.net>
872 * tests/refcount/Makefile.am: Add a missing reference to libglib
873 in the LDADD for this test.
875 2005-11-07 Matthias Clasen <mclasen@redhat.com>
877 * glib/gmem.c (g_allocator_new): We need to set n_preallocs to a
878 nonzero value, otherwise GTK+ 2.8 breaks when compiled against
879 GLib 2.9. (#320755, Luca Ferretti)
881 2005-11-04 Matthias Clasen <mclasen@redhat.com>
883 * glib/Makefile.am: Apply a patch from Behdad Esfahbod to
884 use a faster lookup table for g_unichar_get_mirror_char().
885 * glib/gmirroringtable.h: The new table.
886 * glib/gunichartables.h: Remove bidi_mirroring_table.
887 * glib/gen-unicode-tables.pl: Don't generate the mirroring
889 * glib/glib-mirroring-tab/*: Sources for the program
890 which generated gmirroringtable.h.
892 * glib/glist.c: Avoid some code duplication.
894 * glib/gscanner.h: Include gdataset.h. (#320322)
896 * glib/gdebug.h: add new GDebugFlag for fatal_criticals
897 * glib/gmessages.c: (_g_debug_init): handle G_DEBUG=fatal_criticals,
898 to help find critical warnings in applications. (#320017,
901 2005-11-02 Tor Lillqvist <tml@novell.com>
903 * glib/glib.symbols: Remove large amount of trailing whitespace
904 from one line. Remove #ifdef G_UNDEFINED from around
905 g_hash_table_new and g_hash_table_new_full symbols, what was the
906 purpose of that? Add the g_slice functions.
908 Tue Nov 1 16:24:20 2005 Tim Janik <timj@imendio.com>
910 * glib/gmem.[hc]: prepared deprecation of GMemChunk and GAllocator.
911 added g_slice_*() API to allocate and cache small bits of memory.
912 an actuall allocator implementation for g_slice_*() is still pending.
914 * glib/gthread.[hc]: changes from a patch by Matthias Clasen.
915 changed GRealThread list to use in-structure *next; fields instead
916 of GSList, in order for thread iteration to not depenend on g_slice_*()
918 _g_thread_mem_private_get():
919 _g_thread_mem_private_set(): added accessors for private memory,
920 needed because the ordinary GPrivate implementation relies on GArray
921 and GSList and therefore indirectly on working g_slice_*() allocations.
924 g_thread_foreach(): new public API function to loop over all existing threads.
938 removed GAllocator and free list usages and accompanying locks.
939 use g_slice_*() API to allocate and cache small bits of memory.
941 * glib/ghook.h: removed GMemChunk field from public API.
944 * glib/glist.h: deprecate allocator API, provide _free1() for consistency.
946 * glib/gnode.h: deprecate allocator API.
948 * glib/gmain.c: reordered GPollRec fields so g_slice_free_chain() can
949 be used for poll rec lists.
951 * glib/grel.c: removed mem chunk usage, and allocated tuples via g_slice_*().
952 g_relation_destroy(): free all tuples from the all_tuples hash table,
953 this effectively maintains the life time track keeping of tuples.
954 g_relation_delete_tuple(): free tuples which are removed from the
955 all_tuples hash table. this fixes a temporary leak that was present
956 in the memchunk code until the destruction of the relation.
958 2005-10-29 Matthias Clasen <mclasen@redhat.com>
960 * tests/convert-test.c: Add some tests for conversions between
961 UTF-8, UCS-4 and UTF-16.
963 * glib/gutf8.c (g_utf8_to_ucs4, g_utf8_to_utf16): Fix handling
964 of len == -1, noticed by Morten Welinder.
966 2005-10-27 Erdal Ronahi <erdal.ronahi@gmail.com>
968 * configure.in: Added ku (Kurdish) to ALL_LINGUAS
970 2005-10-26 Matthias Clasen <mclasen@redhat.com>
972 * glib/gutf8.c (g_ucs4_to_utf8): Don't set items_read twice
973 in the error case, and add some documentation. (#319806, Morten
976 2005-10-19 Manish Singh <yosh@gimp.org>
978 * configure.in: Use AC_CHECK_FUNCS for _NSGetEnviron, to get the
979 config.h symbol automatically. Fixes bug #313731.
981 2005-10-19 Tor Lillqvist <tml@novell.com>
983 * glib/gwin32.c (g_win32_get_package_installation_directory):
984 Return a g_strdup()ed copy of the value stored in the hash table,
985 so that it can be g_free()d without leaving a dangling pointer in
986 the hash table. (#319232)
988 2005-10-06 Matthias Clasen <mclasen@redhat.com>
990 * glib/gunicollate.c (g_utf8_collate_key_for_filename): Handle
991 all-zero sequences correctly. (#317930, Sebastien Bacher)
993 2005-10-05 Matthias Clasen <mclasen@redhat.com>
995 * glib/gmarkup.c (g_markup_escape_text): Doc addition
997 * Makefile.am: Add Collation tests.
999 * tests/collate/*: Inputs and expected outputs for collation tests.
1001 * tests/run-collate-tests.sh: Script to run collation tests.
1003 * tests/unicode-collate.c (main): Rework slightly to make
1004 it usable in unit tests. Also test g_utf8_collate_key_for_filename().
1006 2005-10-01 Behdad Esfahbod <behdad@gnome.org>
1008 * docs/reference/glib/tmpl/unicode.sgml:
1009 * glib/gen-unicode-tables.pl:
1011 * glib/gunichartables.h:
1013 * tests/casefold.txt:
1014 * tests/casemap.txt: Updated to Unicode 4.1. There are five new
1015 GUnicodeBreakType types. That may break some applications, like
1018 2005-09-26 Matthias Clasen <mclasen@redhat.com>
1020 * glib/gstrfuncs.c (g_ascii_strtoull): Add details to the
1021 docs. (#314393, Matthew F. Barnes)
1023 * glib/glib.symbols:
1024 * glib/gprintf.h: Remove g_snprintf() and g_vsnprintf(), since
1025 they are already declared in glib.h. This doesn't break documented
1026 use of gprintf.h, but should probably be pointed out in the
1027 release notes for 2.10. (#314232, Behdad Esfahbod)
1029 Tue Sep 20 13:16:04 2005 Tim Janik <timj@imendio.com>
1031 * glib/gpattern.c (g_pattern_ph_match): applied significant recursion
1032 complexity optimization, based on a patch from Matthias Clasen.
1034 * tests/patterntest.c: more tests, mostly from matthias.
1036 2005-09-20 Matthias Clasen <mclasen@redhat.com>
1038 * glib/gqueue.c (g_queue_insert_sorted): Correct the docs.
1039 (#316703, Mark Drago)
1041 Mon Sep 19 17:23:23 2005 Tim Janik <timj@imendio.com>
1043 * glib/gpattern.c: applied a patch from matthias which checks on the
1044 upper bound of GPatternSpec length to optimize matches.
1047 * tests/patterntest.c: added more match cases.
1049 2005-09-16 Tor Lillqvist <tml@novell.com>
1051 * glib/gstrfuncs.c (g_ascii_strcasecmp, g_ascii_strncasecmp): Add
1052 warning to doc comment that these functions should not be used on
1053 encodings like CP932.
1055 2005-09-14 Matthias Clasen <mclasen@redhat.com>
1057 * tests/keyfile-test.c: Add a test for grup names of length 1.
1059 * glib/gkeyfile.c (g_key_file_line_is_group): Accept group names
1060 of length 1. (#316309)
1062 2005-09-12 Matthias Clasen <mclasen@redhat.com>
1064 * glib/gmarkup.c (g_markup_escape_text): Clarify docs.
1066 2005-09-11 Sebastian Wilhelmi <seppi@seppi.de>
1068 * tests/refcount/Makefile.am (INCLUDES): Link the the refcount
1069 tests to the system thread library $(G_THREAD_LIBS). Fixes #313744
1072 2005-09-11 Kjartan Maraas <kmaraas@gnome.org>
1074 * glib/gmain.c: (g_child_watch_prepare), (g_child_watch_check),
1075 (child_watch_helper_thread): Remove some dead code. Closes
1078 2005-09-07 Tor Lillqvist <tml@novell.com>
1080 * glib/Makefile.am: Create also a console version of the
1081 gspawn-win32-helper program, gspawn-win32-helper-console.exe.
1082 It's otherwise identical to gspawn-win32-helper.exe, except marked
1083 as a console application (linked without the -mwindows option).
1085 * glib/gspawn-win32.c (do_spawn_directly, do_spawn_with_pipes):
1086 Drop the dont_wait parameter. Its truth value correlated 100% with
1087 the NULLness of the exit_status parameter anyway, so it's enough
1088 to check whether exit_status is NULL. Invert the sense of the
1089 dont_return_handle parameter and rename it to do_return_handle, to
1090 make the code easier to read by avoiding double negations.
1092 (g_spawn_sync_utf8, g_spawn_async_with_pipes_utf8): Modify calls
1093 to do_spawn_with_pipes() accordingly.
1095 (do_spawn_with_pipes): If we have a console, use the console
1096 version of the helper program, otherwise use the GUI one. This
1097 avoids extra console windows opening up in some situations. (In
1098 case a console application uses the GUI gspawn-win32-helper.exe to
1099 spawn another console application we would get a separate console
1100 for the spawned console application).
1102 * glib-zip.in: Distribute also gspawn-win32-helper-console.exe.
1104 2005-09-05 Matthias Clasen <mclasen@redhat.com>
1106 * glib/gmappedfile.c (g_mapped_file_new): Report an error
1107 if the file is too large. (#315275, Kjartan Maraas)
1109 * glib/gkeyfile.c (g_key_file_load_from_fd): The return value
1110 of read() is signed. (#315273, Kjartan Maraas)
1112 2005-08-31 Tor Lillqvist <tml@novell.com>
1114 * glib/gutils.h: Wrapping atexit() is a bad idea on Windows, where
1115 the EXE and each DLL have their own atexit function chains.
1117 #define g_atexit as atexit instead. This means it has a
1118 better chance of doing what the caller wants. For instance,
1119 gtkhtml calls g_atexit() registering a function in gtkhtml
1120 itself. This caused a crash when g_atexit() was implemented as a
1121 function in the GLib DLL. The gtkhtml DLL was already unloaded by
1122 the time the GLib DLL got unloaded.
1124 * glib/gutils.c: #undef the #define mentioned above, to also get a
1125 real g_atexit() into the DLL for backward compatibility. Document
1126 the Windows behaviour of g_atexit(), and document the varying ways
1127 atexit() can behave in the context of dynamically loaded modules
1130 2005-08-31 Matthias Clasen <mclasen@redhat.com>
1132 * glib/glib.symbols:
1134 * glib/gdataset.c: Add string interning functions.
1136 2005-08-28 Matthias Clasen <mclasen@redhat.com>
1138 * glib/giochannel.c: Unify some near-duplicate strings. (#314654,
1141 2005-08-26 Matthias Clasen <mclasen@redhat.com>
1143 * configure.in: Bump version to 2.9.0
1145 2005-08-25 Tor Lillqvist <tml@novell.com>
1147 Make also the g_spawn*() functions take parameters in the GLib
1148 file name encoding, i.e. UTF-8, on Windows. Has no impact on Unix
1149 API or ABI. Like the other GLib API that was earlier changed to
1150 use UTF-8 on Windows, the names of the functions that take UTF-8
1151 have _utf8 suffixes added by using preprocessor macros in the
1152 header file. The old names are kept for functions with the old
1153 behaviour, taking parameters in the system codepage, for DLL ABI
1156 * glib/gspawn.h: On Win32 add the suffix _utf8 to the names of the
1157 g_spawn*() functions.
1159 * glib/gspawn-win32.c: Use wide-char API on NT-based
1160 Windows. Convert parameters from UTF-8 to wide chars (NT) or
1161 system codepage (Win9x) and call the C library _wspawn*() or
1162 spawn*() functions respectvely. Add DLL ABI stability versions
1163 that take parameters in the system codepage.
1165 * glib/gspawn-win32-helper.c: On NT-based Windows use the
1166 wide-char versions of argv and envp, and use wide-char API to
1167 change directory and spawn the program to run. Remove the verbose
1168 debugging output, it was too complex to modify for the wide-char
1169 features. (Just add temporary debugging printouts if needed, no
1170 need to have them permanently in the source.)
1172 * glib/gspawn.c: Corresponding documentation updates.
1174 * glib/glib.symbols: Corresponding changes: Mark the ABI stability
1175 symbols as PRIVATE, add the new _utf8-suffixed ones.
1177 2005-08-24 Stepan Kasal <kasal@ucw.cz>
1179 * glib/gtypes.h (G_MININT64): Cast the constant to gint64; it is
1180 guint64 otherwise and that can produce warnings about comparison
1181 between signed and unsigned.
1183 2005-08-23 Matthias Clasen <mclasen@redhat.com>
1185 * glib/gutils.c: Fix the crt_externs.h include.
1187 2005-08-23 Stepan Kasal <kasal@ucw.cz>
1189 * NEWS: Fix spelling of my first name.
1191 2005-08-23 Matthias Clasen <mclasen@redhat.com>
1195 * === Released 2.8.1 ===
1199 2005-08-20 Hans Breuer <hans@breuer.org>
1201 * glib/makefile.msc.in : link with ws2_32.lib
1203 2005-08-18 Tor Lillqvist <tml@novell.com>
1205 * configure.in: Check for <sys/wait.h>
1207 * glib/gbacktrace.c: Include <sys/wait.h> on if HAVE_SYS_WAIT_H.
1209 2005-08-18 Ross Burton <ross@burtonini.com>
1212 Optimise single-character insertions.
1217 * tests/string-test.c:
1218 Add tests for new optimisation, and fix a leak.
1220 2005-08-17 Matthias Clasen <mclasen@redhat.com>
1222 * configure.in: Check for crt_externs.h and _NSGetEnviron.
1224 * glib/gutils.c: On Darwin, include crt-externs.h and
1225 define environ using _NSGetEnviron(). (#313731)
1227 2005-08-16 Stepan Kasal <kasal@ucw.cz>
1229 * glib/gutils.c (g_get_any_init): Move the body of the big if...
1230 (g_get_any_init_do): ... to this new function.
1231 (g_get_any_init): Declare as inline.
1232 (g_get_any_init_locked): New inline function, does the locking.
1233 Make use of these two throughout the code.
1235 2005-08-15 Matthias Clasen <mclasen@redhat.com>
1237 * glib/gbacktrace.c (g_on_error_stack_trace): Wait for
1238 the child process and then simply return. This makes
1239 The "S" option work as documented in g_on_error_query().
1240 (#313125, Matthew F. Barnes)
1242 * glib/gunicode.h: Update the link to Unicode category
1243 values. (#313369, Behnam Esfahbod)
1245 * glib/gqueue.c (g_queue_find_custom): Clarify docs
1246 a little. (#311727, Tristan van Berkom)
1248 * glib/abicheck.sh, gobject/abicheck.sh: Make the
1249 check work on ia64 too, where some symbols ended up
1250 in yet another section.