1 2005-11-28 Matthias Clasen <mclasen@redhat.com>
3 Fix G_STMT_START / G_STMT_END on Solaris. (#321972,
6 * configure.in: Check whether do { } while (0) works.
8 * glib/gmacros.h: Use do { } while (0) for G_STMT_START /
9 G_STMT_END if it works.
11 2005-11-28 Matthias Clasen <mclasen@redhat.com>
13 * glib/gthread.c (g_static_rw_lock_wait, g_static_rw_lock_signal):
14 * glib/gnode.c (g_node_depth_traverse_level):
15 * glib/gmem.c (g_allocator_new):
16 * glib/ghash.c (g_hash_table_unref, g_hash_table_destroy)
17 (g_hash_table_foreach_remove_or_steal): Silence compiler
20 2005-11-27 Matthias Clasen <mclasen@redhat.com>
22 * glib/gunicollate.c (g_utf8_collate_key_for_filename):
23 Don't read beyond len. (#322520, Christian Persch)
25 Wed Nov 23 17:34:01 2005 Tim Janik <timj@imendio.com>
27 * glib/gdataset.c: access datalist flags via atomic pointer access
28 functions, instead of acquiring the dataset lock. this is faster and
29 also matches the atomic pointer readouts in gdatalistprivate.h and
30 direct pointer modifications required by gobject.c.
32 Wed Nov 23 13:35:31 2005 Tim Janik <timj@gtk.org>
34 * glib/gdataset.c: streamlined initialization code somewhat,
35 removed GData node cache.
37 2005-11-22 Matthias Clasen <mclasen@redhat.com>
39 * glib/ghash.c (g_hash_table_ref):
40 (g_hash_table_unref): Mark these as new API.
42 Avoid double locking in g_intern_string (#322133,
45 * glib/gdataset.c (g_quark_from_string_internal): New
46 internal function which factors out common parts of
47 g_quark_from[_static]_string.
48 (g_quark_from_string, g_quark_from_static_string):
49 Use g_quark_from_string_internal.
50 (g_intern_string, g_intern_static_string): Use
51 g_quark_from_string_internal, and only take the
53 (g_quark_new): Don't store the strings shifted by -1
54 in the g_quarks array.
55 (g_quark_to_string): Adapt to the previous change.
57 Tue Nov 22 14:04:26 2005 Tim Janik <timj@imendio.com>
61 g_hash_table_new_full(): create hash tables with a ref count of 1.
62 g_hash_table_ref(): atomically ref_count+=1
63 g_hash_table_unref(): atomically ref_count-=1, destroys hash table
64 when refcount reaches 0.
65 g_hash_table_destroy(): just destroy keys and values, unref by 1.
66 g_hash_table_insert():
67 g_hash_table_replace(): assert ref_count>0.
70 * glib/gatomic.c: added 'volatile' qualifier to all atomic pointer and
73 2005-11-20 Behdad Esfahbod <behdad@gnome.org>
75 * glib/guniprop.c (g_unichar_get_mirror_char): Remove unused
76 variables. (#321984, Andrew Paprocki)
78 2005-11-18 Matthias Clasen <mclasen@redhat.com>
80 * configure.in: Bump version
82 2005-11-17 Matthias Clasen <mclasen@redhat.com>
84 * === Released 2.9.0 ===
86 * glib/glib.symbols: Updates
88 * glib/gutf8.c (g_utf8_offset_to_pointer): Add some performance
89 hints to the docs. (Paolo Borelli)
93 * glib/gthread.c (g_thread_foreach): Mark as new api.
99 * glib/gdate.c (g_date_set_time_t):
100 (g_date_set_time_val): Add functions to set a date from
101 a time_t and from a GTimeVal.
102 (g_date_set_time): Deprecate. (#314067, Roger Leigh)
105 * tests/utf8-pointer.c: Unit tests for g_utf8_pointer_to_offset
106 and g_utf8_offset_to_pointer.
108 * glib/gutf8.c (g_utf8_pointer_to_offset)
109 (g_utf8_offset_to_pointer): Handle negative offsets, and use
110 "stutter stepping" for going backwards. (#320638, Larry
115 * glib/gthread.c: const correctness fixes, found
116 by Arjan van de Ven and gcc.
118 2005-11-16 Behdad Esfahbod <behdad@gnome.org>
120 * docs/reference/glib/tmpl/unicode.sgml: Correct typo on mentioning
121 @G_UNICODE_BREAK_UNKNOWN that should be #G_UNICODE_BREAK_UNKNOWN.
123 2005-11-09 Behdad Esfahbod <behdad@gnome.org>
125 * glib/guniprop.c: Use bit hacks instead when checking a general
126 category value against multiple values.
128 * glib/gutf8.c: Change ISO10646 to Unicode in docs.
130 2005-11-10 Simos Xenitellis <simos@gnome.org>
132 * configure.in: Added tt (Tatar) to ALL_LINGUAS.
134 2005-11-05 Tor Lillqvist <tml@novell.com>
136 * glib/giowin32.c (g_io_win32_set_flags): Don't call g_warning().
137 (#320688) Instead set error and return failure.
139 2005-11-07 Matthias Clasen <mclasen@redhat.com>
141 * glib/gmain.c (g_main_dispatch): Don't call cb_funcs->unref
142 while holding the context lock. (#320886, Andy Wingo)
144 2005-11-07 Billy Biggs <vektor@dumbterm.net>
146 * tests/refcount/Makefile.am: Add a missing reference to libglib
147 in the LDADD for this test.
149 2005-11-07 Matthias Clasen <mclasen@redhat.com>
151 * glib/gmem.c (g_allocator_new): We need to set n_preallocs to a
152 nonzero value, otherwise GTK+ 2.8 breaks when compiled against
153 GLib 2.9. (#320755, Luca Ferretti)
155 2005-11-04 Matthias Clasen <mclasen@redhat.com>
157 * glib/Makefile.am: Apply a patch from Behdad Esfahbod to
158 use a faster lookup table for g_unichar_get_mirror_char().
159 * glib/gmirroringtable.h: The new table.
160 * glib/gunichartables.h: Remove bidi_mirroring_table.
161 * glib/gen-unicode-tables.pl: Don't generate the mirroring
163 * glib/glib-mirroring-tab/*: Sources for the program
164 which generated gmirroringtable.h.
166 * glib/glist.c: Avoid some code duplication.
168 * glib/gscanner.h: Include gdataset.h. (#320322)
170 * glib/gdebug.h: add new GDebugFlag for fatal_criticals
171 * glib/gmessages.c: (_g_debug_init): handle G_DEBUG=fatal_criticals,
172 to help find critical warnings in applications. (#320017,
175 2005-11-02 Tor Lillqvist <tml@novell.com>
177 * glib/glib.symbols: Remove large amount of trailing whitespace
178 from one line. Remove #ifdef G_UNDEFINED from around
179 g_hash_table_new and g_hash_table_new_full symbols, what was the
180 purpose of that? Add the g_slice functions.
182 Tue Nov 1 16:24:20 2005 Tim Janik <timj@imendio.com>
184 * glib/gmem.[hc]: prepared deprecation of GMemChunk and GAllocator.
185 added g_slice_*() API to allocate and cache small bits of memory.
186 an actuall allocator implementation for g_slice_*() is still pending.
188 * glib/gthread.[hc]: changes from a patch by Matthias Clasen.
189 changed GRealThread list to use in-structure *next; fields instead
190 of GSList, in order for thread iteration to not depenend on g_slice_*()
192 _g_thread_mem_private_get():
193 _g_thread_mem_private_set(): added accessors for private memory,
194 needed because the ordinary GPrivate implementation relies on GArray
195 and GSList and therefore indirectly on working g_slice_*() allocations.
198 g_thread_foreach(): new public API function to loop over all existing threads.
212 removed GAllocator and free list usages and accompanying locks.
213 use g_slice_*() API to allocate and cache small bits of memory.
215 * glib/ghook.h: removed GMemChunk field from public API.
218 * glib/glist.h: deprecate allocator API, provide _free1() for consistency.
220 * glib/gnode.h: deprecate allocator API.
222 * glib/gmain.c: reordered GPollRec fields so g_slice_free_chain() can
223 be used for poll rec lists.
225 * glib/grel.c: removed mem chunk usage, and allocated tuples via g_slice_*().
226 g_relation_destroy(): free all tuples from the all_tuples hash table,
227 this effectively maintains the life time track keeping of tuples.
228 g_relation_delete_tuple(): free tuples which are removed from the
229 all_tuples hash table. this fixes a temporary leak that was present
230 in the memchunk code until the destruction of the relation.
232 2005-10-29 Matthias Clasen <mclasen@redhat.com>
234 * tests/convert-test.c: Add some tests for conversions between
235 UTF-8, UCS-4 and UTF-16.
237 * glib/gutf8.c (g_utf8_to_ucs4, g_utf8_to_utf16): Fix handling
238 of len == -1, noticed by Morten Welinder.
240 2005-10-27 Erdal Ronahi <erdal.ronahi@gmail.com>
242 * configure.in: Added ku (Kurdish) to ALL_LINGUAS
244 2005-10-26 Matthias Clasen <mclasen@redhat.com>
246 * glib/gutf8.c (g_ucs4_to_utf8): Don't set items_read twice
247 in the error case, and add some documentation. (#319806, Morten
250 2005-10-19 Manish Singh <yosh@gimp.org>
252 * configure.in: Use AC_CHECK_FUNCS for _NSGetEnviron, to get the
253 config.h symbol automatically. Fixes bug #313731.
255 2005-10-19 Tor Lillqvist <tml@novell.com>
257 * glib/gwin32.c (g_win32_get_package_installation_directory):
258 Return a g_strdup()ed copy of the value stored in the hash table,
259 so that it can be g_free()d without leaving a dangling pointer in
260 the hash table. (#319232)
262 2005-10-06 Matthias Clasen <mclasen@redhat.com>
264 * glib/gunicollate.c (g_utf8_collate_key_for_filename): Handle
265 all-zero sequences correctly. (#317930, Sebastien Bacher)
267 2005-10-05 Matthias Clasen <mclasen@redhat.com>
269 * glib/gmarkup.c (g_markup_escape_text): Doc addition
271 * Makefile.am: Add Collation tests.
273 * tests/collate/*: Inputs and expected outputs for collation tests.
275 * tests/run-collate-tests.sh: Script to run collation tests.
277 * tests/unicode-collate.c (main): Rework slightly to make
278 it usable in unit tests. Also test g_utf8_collate_key_for_filename().
280 2005-10-01 Behdad Esfahbod <behdad@gnome.org>
282 * docs/reference/glib/tmpl/unicode.sgml:
283 * glib/gen-unicode-tables.pl:
285 * glib/gunichartables.h:
287 * tests/casefold.txt:
288 * tests/casemap.txt: Updated to Unicode 4.1. There are five new
289 GUnicodeBreakType types. That may break some applications, like
292 2005-09-26 Matthias Clasen <mclasen@redhat.com>
294 * glib/gstrfuncs.c (g_ascii_strtoull): Add details to the
295 docs. (#314393, Matthew F. Barnes)
298 * glib/gprintf.h: Remove g_snprintf() and g_vsnprintf(), since
299 they are already declared in glib.h. This doesn't break documented
300 use of gprintf.h, but should probably be pointed out in the
301 release notes for 2.10. (#314232, Behdad Esfahbod)
303 Tue Sep 20 13:16:04 2005 Tim Janik <timj@imendio.com>
305 * glib/gpattern.c (g_pattern_ph_match): applied significant recursion
306 complexity optimization, based on a patch from Matthias Clasen.
308 * tests/patterntest.c: more tests, mostly from matthias.
310 2005-09-20 Matthias Clasen <mclasen@redhat.com>
312 * glib/gqueue.c (g_queue_insert_sorted): Correct the docs.
313 (#316703, Mark Drago)
315 Mon Sep 19 17:23:23 2005 Tim Janik <timj@imendio.com>
317 * glib/gpattern.c: applied a patch from matthias which checks on the
318 upper bound of GPatternSpec length to optimize matches.
321 * tests/patterntest.c: added more match cases.
323 2005-09-16 Tor Lillqvist <tml@novell.com>
325 * glib/gstrfuncs.c (g_ascii_strcasecmp, g_ascii_strncasecmp): Add
326 warning to doc comment that these functions should not be used on
327 encodings like CP932.
329 2005-09-14 Matthias Clasen <mclasen@redhat.com>
331 * tests/keyfile-test.c: Add a test for grup names of length 1.
333 * glib/gkeyfile.c (g_key_file_line_is_group): Accept group names
334 of length 1. (#316309)
336 2005-09-12 Matthias Clasen <mclasen@redhat.com>
338 * glib/gmarkup.c (g_markup_escape_text): Clarify docs.
340 2005-09-11 Sebastian Wilhelmi <seppi@seppi.de>
342 * tests/refcount/Makefile.am (INCLUDES): Link the the refcount
343 tests to the system thread library $(G_THREAD_LIBS). Fixes #313744
346 2005-09-11 Kjartan Maraas <kmaraas@gnome.org>
348 * glib/gmain.c: (g_child_watch_prepare), (g_child_watch_check),
349 (child_watch_helper_thread): Remove some dead code. Closes
352 2005-09-07 Tor Lillqvist <tml@novell.com>
354 * glib/Makefile.am: Create also a console version of the
355 gspawn-win32-helper program, gspawn-win32-helper-console.exe.
356 It's otherwise identical to gspawn-win32-helper.exe, except marked
357 as a console application (linked without the -mwindows option).
359 * glib/gspawn-win32.c (do_spawn_directly, do_spawn_with_pipes):
360 Drop the dont_wait parameter. Its truth value correlated 100% with
361 the NULLness of the exit_status parameter anyway, so it's enough
362 to check whether exit_status is NULL. Invert the sense of the
363 dont_return_handle parameter and rename it to do_return_handle, to
364 make the code easier to read by avoiding double negations.
366 (g_spawn_sync_utf8, g_spawn_async_with_pipes_utf8): Modify calls
367 to do_spawn_with_pipes() accordingly.
369 (do_spawn_with_pipes): If we have a console, use the console
370 version of the helper program, otherwise use the GUI one. This
371 avoids extra console windows opening up in some situations. (In
372 case a console application uses the GUI gspawn-win32-helper.exe to
373 spawn another console application we would get a separate console
374 for the spawned console application).
376 * glib-zip.in: Distribute also gspawn-win32-helper-console.exe.
378 2005-09-05 Matthias Clasen <mclasen@redhat.com>
380 * glib/gmappedfile.c (g_mapped_file_new): Report an error
381 if the file is too large. (#315275, Kjartan Maraas)
383 * glib/gkeyfile.c (g_key_file_load_from_fd): The return value
384 of read() is signed. (#315273, Kjartan Maraas)
386 2005-08-31 Tor Lillqvist <tml@novell.com>
388 * glib/gutils.h: Wrapping atexit() is a bad idea on Windows, where
389 the EXE and each DLL have their own atexit function chains.
391 #define g_atexit as atexit instead. This means it has a
392 better chance of doing what the caller wants. For instance,
393 gtkhtml calls g_atexit() registering a function in gtkhtml
394 itself. This caused a crash when g_atexit() was implemented as a
395 function in the GLib DLL. The gtkhtml DLL was already unloaded by
396 the time the GLib DLL got unloaded.
398 * glib/gutils.c: #undef the #define mentioned above, to also get a
399 real g_atexit() into the DLL for backward compatibility. Document
400 the Windows behaviour of g_atexit(), and document the varying ways
401 atexit() can behave in the context of dynamically loaded modules
404 2005-08-31 Matthias Clasen <mclasen@redhat.com>
408 * glib/gdataset.c: Add string interning functions.
410 2005-08-28 Matthias Clasen <mclasen@redhat.com>
412 * glib/giochannel.c: Unify some near-duplicate strings. (#314654,
415 2005-08-26 Matthias Clasen <mclasen@redhat.com>
417 * configure.in: Bump version to 2.9.0
419 2005-08-25 Tor Lillqvist <tml@novell.com>
421 Make also the g_spawn*() functions take parameters in the GLib
422 file name encoding, i.e. UTF-8, on Windows. Has no impact on Unix
423 API or ABI. Like the other GLib API that was earlier changed to
424 use UTF-8 on Windows, the names of the functions that take UTF-8
425 have _utf8 suffixes added by using preprocessor macros in the
426 header file. The old names are kept for functions with the old
427 behaviour, taking parameters in the system codepage, for DLL ABI
430 * glib/gspawn.h: On Win32 add the suffix _utf8 to the names of the
431 g_spawn*() functions.
433 * glib/gspawn-win32.c: Use wide-char API on NT-based
434 Windows. Convert parameters from UTF-8 to wide chars (NT) or
435 system codepage (Win9x) and call the C library _wspawn*() or
436 spawn*() functions respectvely. Add DLL ABI stability versions
437 that take parameters in the system codepage.
439 * glib/gspawn-win32-helper.c: On NT-based Windows use the
440 wide-char versions of argv and envp, and use wide-char API to
441 change directory and spawn the program to run. Remove the verbose
442 debugging output, it was too complex to modify for the wide-char
443 features. (Just add temporary debugging printouts if needed, no
444 need to have them permanently in the source.)
446 * glib/gspawn.c: Corresponding documentation updates.
448 * glib/glib.symbols: Corresponding changes: Mark the ABI stability
449 symbols as PRIVATE, add the new _utf8-suffixed ones.
451 2005-08-24 Stepan Kasal <kasal@ucw.cz>
453 * glib/gtypes.h (G_MININT64): Cast the constant to gint64; it is
454 guint64 otherwise and that can produce warnings about comparison
455 between signed and unsigned.
457 2005-08-23 Matthias Clasen <mclasen@redhat.com>
459 * glib/gutils.c: Fix the crt_externs.h include.
461 2005-08-23 Stepan Kasal <kasal@ucw.cz>
463 * NEWS: Fix spelling of my first name.
465 2005-08-23 Matthias Clasen <mclasen@redhat.com>
469 * === Released 2.8.1 ===
473 2005-08-20 Hans Breuer <hans@breuer.org>
475 * glib/makefile.msc.in : link with ws2_32.lib
477 2005-08-18 Tor Lillqvist <tml@novell.com>
479 * configure.in: Check for <sys/wait.h>
481 * glib/gbacktrace.c: Include <sys/wait.h> on if HAVE_SYS_WAIT_H.
483 2005-08-18 Ross Burton <ross@burtonini.com>
486 Optimise single-character insertions.
491 * tests/string-test.c:
492 Add tests for new optimisation, and fix a leak.
494 2005-08-17 Matthias Clasen <mclasen@redhat.com>
496 * configure.in: Check for crt_externs.h and _NSGetEnviron.
498 * glib/gutils.c: On Darwin, include crt-externs.h and
499 define environ using _NSGetEnviron(). (#313731)
501 2005-08-16 Stepan Kasal <kasal@ucw.cz>
503 * glib/gutils.c (g_get_any_init): Move the body of the big if...
504 (g_get_any_init_do): ... to this new function.
505 (g_get_any_init): Declare as inline.
506 (g_get_any_init_locked): New inline function, does the locking.
507 Make use of these two throughout the code.
509 2005-08-15 Matthias Clasen <mclasen@redhat.com>
511 * glib/gbacktrace.c (g_on_error_stack_trace): Wait for
512 the child process and then simply return. This makes
513 The "S" option work as documented in g_on_error_query().
514 (#313125, Matthew F. Barnes)
516 * glib/gunicode.h: Update the link to Unicode category
517 values. (#313369, Behnam Esfahbod)
519 * glib/gqueue.c (g_queue_find_custom): Clarify docs
520 a little. (#311727, Tristan van Berkom)
522 * glib/abicheck.sh, gobject/abicheck.sh: Make the
523 check work on ia64 too, where some symbols ended up
524 in yet another section.