Fix G_STMT_START / G_STMT_END on Solaris. (#321972, Andrew Paprocki)
[platform/upstream/glib.git] / ChangeLog.pre-2-10
1 2005-11-28  Matthias Clasen  <mclasen@redhat.com>
2
3         Fix G_STMT_START / G_STMT_END on Solaris.  (#321972,
4         Andrew Paprocki)
5         
6         * configure.in: Check whether do { } while (0) works.
7
8         * glib/gmacros.h: Use do { } while (0) for G_STMT_START / 
9         G_STMT_END if it works.
10         
11 2005-11-28  Matthias Clasen  <mclasen@redhat.com>
12
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
18         warnings.
19
20 2005-11-27  Matthias Clasen  <mclasen@redhat.com>
21
22         * glib/gunicollate.c (g_utf8_collate_key_for_filename): 
23         Don't read beyond len.  (#322520, Christian Persch)
24
25 Wed Nov 23 17:34:01 2005  Tim Janik  <timj@imendio.com>
26
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.
31
32 Wed Nov 23 13:35:31 2005  Tim Janik  <timj@gtk.org>
33
34         * glib/gdataset.c: streamlined initialization code somewhat,
35         removed GData node cache.
36
37 2005-11-22  Matthias Clasen  <mclasen@redhat.com>
38
39         * glib/ghash.c (g_hash_table_ref): 
40         (g_hash_table_unref): Mark these as new API.
41
42         Avoid double locking in g_intern_string (#322133,
43         Benedikt Meurer)
44
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
52         lock once.
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.
56
57 Tue Nov 22 14:04:26 2005  Tim Janik  <timj@imendio.com>
58
59         * glib/ghash.h: 
60         * glib/ghash.c: 
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.
68
69         * glib/gatomic.h: 
70         * glib/gatomic.c: added 'volatile' qualifier to all atomic pointer and
71         integer pointers.
72
73 2005-11-20  Behdad Esfahbod  <behdad@gnome.org>
74
75         * glib/guniprop.c (g_unichar_get_mirror_char): Remove unused
76         variables. (#321984, Andrew Paprocki)
77
78 2005-11-18  Matthias Clasen  <mclasen@redhat.com>
79
80         * configure.in: Bump version
81
82 2005-11-17  Matthias Clasen  <mclasen@redhat.com>
83
84         * === Released 2.9.0 ===
85
86         * glib/glib.symbols: Updates
87
88         * glib/gutf8.c (g_utf8_offset_to_pointer): Add some performance
89         hints to the docs. (Paolo Borelli)
90         
91         * NEWS: Updates
92
93         * glib/gthread.c (g_thread_foreach): Mark as new api.
94
95         * README.in: Updates.
96
97         * glib/glib.symbols: 
98         * glib/gdate.h: 
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)
103         
104         * tests/Makefile.am:
105         * tests/utf8-pointer.c: Unit tests for g_utf8_pointer_to_offset
106         and g_utf8_offset_to_pointer.
107
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
111         Ewing)
112
113         * glib/gbacktrace.c:
114         * glib/gdate.c:
115         * glib/gthread.c: const correctness fixes, found
116         by Arjan van de Ven and gcc.
117         
118 2005-11-16  Behdad Esfahbod  <behdad@gnome.org>
119
120         * docs/reference/glib/tmpl/unicode.sgml: Correct typo on mentioning
121         @G_UNICODE_BREAK_UNKNOWN that should be #G_UNICODE_BREAK_UNKNOWN.
122
123 2005-11-09  Behdad Esfahbod  <behdad@gnome.org>
124
125         * glib/guniprop.c: Use bit hacks instead when checking a general
126         category value against multiple values.
127
128         * glib/gutf8.c: Change ISO10646 to Unicode in docs.
129
130 2005-11-10  Simos Xenitellis  <simos@gnome.org>
131
132         * configure.in: Added tt (Tatar) to ALL_LINGUAS.
133
134 2005-11-05  Tor Lillqvist  <tml@novell.com>
135
136         * glib/giowin32.c (g_io_win32_set_flags): Don't call g_warning().
137         (#320688) Instead set error and return failure.
138
139 2005-11-07  Matthias Clasen  <mclasen@redhat.com>
140
141         * glib/gmain.c (g_main_dispatch): Don't call cb_funcs->unref
142         while holding the context lock.  (#320886, Andy Wingo)
143
144 2005-11-07  Billy Biggs <vektor@dumbterm.net>
145
146         * tests/refcount/Makefile.am: Add a missing reference to libglib
147         in the LDADD for this test.
148
149 2005-11-07  Matthias Clasen  <mclasen@redhat.com>
150
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)
154
155 2005-11-04  Matthias Clasen  <mclasen@redhat.com>
156
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
162         table.
163         * glib/glib-mirroring-tab/*: Sources for the program
164         which generated gmirroringtable.h.
165
166         * glib/glist.c: Avoid some code duplication.
167
168         * glib/gscanner.h: Include gdataset.h.  (#320322)
169
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,
173         Vincent Untz)
174
175 2005-11-02  Tor Lillqvist  <tml@novell.com>
176
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.
181
182 Tue Nov  1 16:24:20 2005  Tim Janik  <timj@imendio.com>
183
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.
187
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_*()
191         indirectly.
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.
196
197         * glib/gthread.[hc]:
198         g_thread_foreach(): new public API function to loop over all existing threads.
199
200         * glib/gdataset.c:
201         * glib/gstring.c:
202         * glib/gcache.c:
203         * glib/garray.c: 
204         * glib/gqueue.c:
205         * glib/gslist.c:
206         * glib/glist.c:
207         * glib/ghash.c:
208         * glib/gtree.c:
209         * glib/ghook.c:
210         * glib/gmain.c:
211         * glib/gnode.c:
212         removed GAllocator and free list usages and accompanying locks.
213         use g_slice_*() API to allocate and cache small bits of memory.
214
215         * glib/ghook.h: removed GMemChunk field from public API.
216
217         * glib/gslist.h:
218         * glib/glist.h: deprecate allocator API, provide _free1() for consistency.
219
220         * glib/gnode.h: deprecate allocator API.
221
222         * glib/gmain.c: reordered GPollRec fields so g_slice_free_chain() can
223         be used for poll rec lists.
224
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.
231
232 2005-10-29  Matthias Clasen  <mclasen@redhat.com>
233
234         * tests/convert-test.c: Add some tests for conversions between
235         UTF-8, UCS-4 and UTF-16.
236
237         * glib/gutf8.c (g_utf8_to_ucs4, g_utf8_to_utf16): Fix handling
238         of len == -1, noticed by Morten Welinder.
239
240 2005-10-27  Erdal Ronahi  <erdal.ronahi@gmail.com>
241
242         * configure.in: Added ku (Kurdish) to ALL_LINGUAS
243
244 2005-10-26  Matthias Clasen  <mclasen@redhat.com>
245
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
248         Welinder)
249
250 2005-10-19  Manish Singh  <yosh@gimp.org>
251
252         * configure.in: Use AC_CHECK_FUNCS for _NSGetEnviron, to get the
253         config.h symbol automatically. Fixes bug #313731.
254
255 2005-10-19  Tor Lillqvist  <tml@novell.com>
256
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)
261
262 2005-10-06  Matthias Clasen  <mclasen@redhat.com>
263
264         * glib/gunicollate.c (g_utf8_collate_key_for_filename): Handle
265         all-zero sequences correctly.  (#317930, Sebastien Bacher)
266
267 2005-10-05  Matthias Clasen  <mclasen@redhat.com>
268
269         * glib/gmarkup.c (g_markup_escape_text): Doc addition
270
271         * Makefile.am: Add Collation tests.
272
273         * tests/collate/*: Inputs and expected outputs for collation tests.
274
275         * tests/run-collate-tests.sh: Script to run collation tests.
276
277         * tests/unicode-collate.c (main): Rework slightly to make
278         it usable in unit tests. Also test g_utf8_collate_key_for_filename().
279
280 2005-10-01  Behdad Esfahbod  <behdad@gnome.org>
281
282         * docs/reference/glib/tmpl/unicode.sgml:
283         * glib/gen-unicode-tables.pl:
284         * glib/gunibreak.h:
285         * glib/gunichartables.h:
286         * glib/gunicode.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
290         Pango <= 1.10.
291
292 2005-09-26  Matthias Clasen  <mclasen@redhat.com>
293
294         * glib/gstrfuncs.c (g_ascii_strtoull): Add details to the 
295         docs.  (#314393, Matthew F. Barnes)
296
297         * glib/glib.symbols:
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)
302
303 Tue Sep 20 13:16:04 2005  Tim Janik  <timj@imendio.com>
304
305         * glib/gpattern.c (g_pattern_ph_match): applied significant recursion
306         complexity optimization, based on a patch from Matthias Clasen.
307
308         * tests/patterntest.c: more tests, mostly from matthias.
309
310 2005-09-20  Matthias Clasen  <mclasen@redhat.com>
311
312         * glib/gqueue.c (g_queue_insert_sorted): Correct the docs.
313         (#316703, Mark Drago)
314
315 Mon Sep 19 17:23:23 2005  Tim Janik  <timj@imendio.com>
316
317         * glib/gpattern.c: applied a patch from matthias which checks on the
318         upper bound of GPatternSpec length to optimize matches.
319         cosmetic fixups.
320
321         * tests/patterntest.c: added more match cases.
322
323 2005-09-16  Tor Lillqvist  <tml@novell.com>
324
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.
328
329 2005-09-14  Matthias Clasen  <mclasen@redhat.com>
330
331         * tests/keyfile-test.c: Add a test for grup names of length 1.
332
333         * glib/gkeyfile.c (g_key_file_line_is_group): Accept group names
334         of length 1.  (#316309)
335         
336 2005-09-12  Matthias Clasen  <mclasen@redhat.com>
337
338         * glib/gmarkup.c (g_markup_escape_text): Clarify docs.
339
340 2005-09-11  Sebastian Wilhelmi  <seppi@seppi.de>
341
342         * tests/refcount/Makefile.am (INCLUDES): Link the the refcount
343         tests to the system thread library $(G_THREAD_LIBS). Fixes #313744
344         and #314217.
345
346 2005-09-11  Kjartan Maraas  <kmaraas@gnome.org>
347
348         * glib/gmain.c: (g_child_watch_prepare), (g_child_watch_check),
349         (child_watch_helper_thread): Remove some dead code. Closes
350         bug #315278.
351
352 2005-09-07  Tor Lillqvist  <tml@novell.com>
353
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).
358         
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.
365
366         (g_spawn_sync_utf8, g_spawn_async_with_pipes_utf8): Modify calls
367         to do_spawn_with_pipes() accordingly.
368
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).
375
376         * glib-zip.in: Distribute also gspawn-win32-helper-console.exe.
377
378 2005-09-05  Matthias Clasen  <mclasen@redhat.com>
379
380         * glib/gmappedfile.c (g_mapped_file_new): Report an error
381         if the file is too large.  (#315275, Kjartan Maraas)
382
383         * glib/gkeyfile.c (g_key_file_load_from_fd): The return value
384         of read() is signed.  (#315273, Kjartan Maraas)
385         
386 2005-08-31  Tor Lillqvist  <tml@novell.com>
387
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.
390
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.
397
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
402         on Unix.
403
404 2005-08-31  Matthias Clasen  <mclasen@redhat.com>
405
406         * glib/glib.symbols: 
407         * glib/gquark.h: 
408         * glib/gdataset.c: Add string interning functions.
409
410 2005-08-28  Matthias Clasen  <mclasen@redhat.com>
411
412         * glib/giochannel.c: Unify some near-duplicate strings. (#314654,
413         Clytie Siddall)
414         
415 2005-08-26  Matthias Clasen  <mclasen@redhat.com>
416
417         * configure.in: Bump version to 2.9.0
418
419 2005-08-25  Tor Lillqvist  <tml@novell.com>
420
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
428         stability.
429         
430         * glib/gspawn.h: On Win32 add the suffix _utf8 to the names of the
431         g_spawn*() functions.
432         
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.
438
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.)
445
446         * glib/gspawn.c: Corresponding documentation updates.
447
448         * glib/glib.symbols: Corresponding changes: Mark the ABI stability
449         symbols as PRIVATE, add the new _utf8-suffixed ones.
450
451 2005-08-24  Stepan Kasal  <kasal@ucw.cz>
452
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.
456
457 2005-08-23  Matthias Clasen  <mclasen@redhat.com>
458
459         * glib/gutils.c: Fix the crt_externs.h include.
460
461 2005-08-23  Stepan Kasal  <kasal@ucw.cz>
462
463         * NEWS: Fix spelling of my first name.
464
465 2005-08-23  Matthias Clasen  <mclasen@redhat.com>
466
467         * Bump version
468
469         * === Released 2.8.1 ===
470
471         * NEWS: Updates
472
473 2005-08-20  Hans Breuer  <hans@breuer.org>
474
475         * glib/makefile.msc.in : link with ws2_32.lib
476
477 2005-08-18  Tor Lillqvist  <tml@novell.com>
478
479         * configure.in: Check for <sys/wait.h>
480
481         * glib/gbacktrace.c: Include <sys/wait.h> on if HAVE_SYS_WAIT_H.
482
483 2005-08-18  Ross Burton  <ross@burtonini.com>
484
485         * glib/gstring.c:
486         Optimise single-character insertions.
487         
488         * glib/gutf8.c:
489         Note copied code.
490         
491         * tests/string-test.c:
492         Add tests for new optimisation, and fix a leak.
493
494 2005-08-17  Matthias Clasen  <mclasen@redhat.com>
495
496         * configure.in: Check for crt_externs.h and _NSGetEnviron.
497
498         * glib/gutils.c: On Darwin, include crt-externs.h and
499         define environ using _NSGetEnviron().  (#313731)
500
501 2005-08-16  Stepan Kasal  <kasal@ucw.cz>
502
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.
508
509 2005-08-15  Matthias Clasen  <mclasen@redhat.com>
510
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)
515
516         * glib/gunicode.h: Update the link to Unicode category
517         values.  (#313369, Behnam Esfahbod)
518
519         * glib/gqueue.c (g_queue_find_custom): Clarify docs
520         a little.  (#311727, Tristan van Berkom)
521
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.
525