Don't call g_warning(). (#320688) Instead set error and return failure.
[platform/upstream/glib.git] / ChangeLog
1 2005-11-05  Tor Lillqvist  <tml@novell.com>
2
3         * glib/giowin32.c (g_io_win32_set_flags): Don't call g_warning().
4         (#320688) Instead set error and return failure.
5
6 2005-11-07  Matthias Clasen  <mclasen@redhat.com>
7
8         * glib/gmain.c (g_main_dispatch): Don't call cb_funcs->unref
9         while holding the context lock.  (#320886, Andy Wingo)
10
11 2005-11-07  Billy Biggs <vektor@dumbterm.net>
12
13         * tests/refcount/Makefile.am: Add a missing reference to libglib
14         in the LDADD for this test.
15
16 2005-11-07  Matthias Clasen  <mclasen@redhat.com>
17
18         * glib/gmem.c (g_allocator_new): We need to set n_preallocs to a
19         nonzero value, otherwise GTK+ 2.8 breaks when compiled against
20         GLib 2.9.  (#320755, Luca Ferretti)
21
22 2005-11-04  Matthias Clasen  <mclasen@redhat.com>
23
24         * glib/Makefile.am: Apply a patch from Behdad Esfahbod to 
25         use a faster lookup table for g_unichar_get_mirror_char().
26         * glib/gmirroringtable.h: The new table.
27         * glib/gunichartables.h: Remove bidi_mirroring_table.
28         * glib/gen-unicode-tables.pl: Don't generate the mirroring
29         table.
30         * glib/glib-mirroring-tab/*: Sources for the program
31         which generated gmirroringtable.h.
32
33         * glib/glist.c: Avoid some code duplication.
34
35         * glib/gscanner.h: Include gdataset.h.  (#320322)
36
37         * glib/gdebug.h: add new GDebugFlag for fatal_criticals
38         * glib/gmessages.c: (_g_debug_init): handle G_DEBUG=fatal_criticals,
39         to help find critical warnings in applications.  (#320017,
40         Vincent Untz)
41
42 2005-11-02  Tor Lillqvist  <tml@novell.com>
43
44         * glib/glib.symbols: Remove large amount of trailing whitespace
45         from one line. Remove #ifdef G_UNDEFINED from around
46         g_hash_table_new and g_hash_table_new_full symbols, what was the
47         purpose of that? Add the g_slice functions.
48
49 Tue Nov  1 16:24:20 2005  Tim Janik  <timj@imendio.com>
50
51         * glib/gmem.[hc]: prepared deprecation of GMemChunk and GAllocator.
52         added g_slice_*() API to allocate and cache small bits of memory.
53         an actuall allocator implementation for g_slice_*() is still pending.
54
55         * glib/gthread.[hc]: changes from a patch by Matthias Clasen.
56         changed GRealThread list to use in-structure *next; fields instead
57         of GSList, in order for thread iteration to not depenend on g_slice_*()
58         indirectly.
59         _g_thread_mem_private_get():
60         _g_thread_mem_private_set(): added accessors for private memory,
61         needed because the ordinary GPrivate implementation relies on GArray
62         and GSList and therefore indirectly on working g_slice_*() allocations.
63
64         * glib/gthread.[hc]:
65         g_thread_foreach(): new public API function to loop over all existing threads.
66
67         * glib/gdataset.c:
68         * glib/gstring.c:
69         * glib/gcache.c:
70         * glib/garray.c: 
71         * glib/gqueue.c:
72         * glib/gslist.c:
73         * glib/glist.c:
74         * glib/ghash.c:
75         * glib/gtree.c:
76         * glib/ghook.c:
77         * glib/gmain.c:
78         * glib/gnode.c:
79         removed GAllocator and free list usages and accompanying locks.
80         use g_slice_*() API to allocate and cache small bits of memory.
81
82         * glib/ghook.h: removed GMemChunk field from public API.
83
84         * glib/gslist.h:
85         * glib/glist.h: deprecate allocator API, provide _free1() for consistency.
86
87         * glib/gnode.h: deprecate allocator API.
88
89         * glib/gmain.c: reordered GPollRec fields so g_slice_free_chain() can
90         be used for poll rec lists.
91
92         * glib/grel.c: removed mem chunk usage, and allocated tuples via g_slice_*().
93         g_relation_destroy(): free all tuples from the all_tuples hash table,
94         this effectively maintains the life time track keeping of tuples.
95         g_relation_delete_tuple(): free tuples which are removed from the
96         all_tuples hash table. this fixes a temporary leak that was present
97         in the memchunk code until the destruction of the relation.
98
99 2005-10-29  Matthias Clasen  <mclasen@redhat.com>
100
101         * tests/convert-test.c: Add some tests for conversions between
102         UTF-8, UCS-4 and UTF-16.
103
104         * glib/gutf8.c (g_utf8_to_ucs4, g_utf8_to_utf16): Fix handling
105         of len == -1, noticed by Morten Welinder.
106
107 2005-10-27  Erdal Ronahi  <erdal.ronahi@gmail.com>
108
109         * configure.in: Added ku (Kurdish) to ALL_LINGUAS
110
111 2005-10-26  Matthias Clasen  <mclasen@redhat.com>
112
113         * glib/gutf8.c (g_ucs4_to_utf8): Don't set items_read twice
114         in the error case, and add some documentation.  (#319806, Morten
115         Welinder)
116
117 2005-10-19  Manish Singh  <yosh@gimp.org>
118
119         * configure.in: Use AC_CHECK_FUNCS for _NSGetEnviron, to get the
120         config.h symbol automatically. Fixes bug #313731.
121
122 2005-10-19  Tor Lillqvist  <tml@novell.com>
123
124         * glib/gwin32.c (g_win32_get_package_installation_directory):
125         Return a g_strdup()ed copy of the value stored in the hash table,
126         so that it can be g_free()d without leaving a dangling pointer in
127         the hash table. (#319232)
128
129 2005-10-06  Matthias Clasen  <mclasen@redhat.com>
130
131         * glib/gunicollate.c (g_utf8_collate_key_for_filename): Handle
132         all-zero sequences correctly.  (#317930, Sebastien Bacher)
133
134 2005-10-05  Matthias Clasen  <mclasen@redhat.com>
135
136         * glib/gmarkup.c (g_markup_escape_text): Doc addition
137
138         * Makefile.am: Add Collation tests.
139
140         * tests/collate/*: Inputs and expected outputs for collation tests.
141
142         * tests/run-collate-tests.sh: Script to run collation tests.
143
144         * tests/unicode-collate.c (main): Rework slightly to make
145         it usable in unit tests. Also test g_utf8_collate_key_for_filename().
146
147 2005-10-01  Behdad Esfahbod  <behdad@gnome.org>
148
149         * docs/reference/glib/tmpl/unicode.sgml:
150         * glib/gen-unicode-tables.pl:
151         * glib/gunibreak.h:
152         * glib/gunichartables.h:
153         * glib/gunicode.h:
154         * tests/casefold.txt:
155         * tests/casemap.txt: Updated to Unicode 4.1.  There are five new
156         GUnicodeBreakType types.  That may break some applications, like
157         Pango <= 1.10.
158
159 2005-09-26  Matthias Clasen  <mclasen@redhat.com>
160
161         * glib/gstrfuncs.c (g_ascii_strtoull): Add details to the 
162         docs.  (#314393, Matthew F. Barnes)
163
164         * glib/glib.symbols:
165         * glib/gprintf.h: Remove g_snprintf() and g_vsnprintf(), since
166         they are already declared in glib.h. This doesn't break documented
167         use of gprintf.h, but should probably be pointed out in the 
168         release notes for 2.10. (#314232, Behdad Esfahbod)
169
170 Tue Sep 20 13:16:04 2005  Tim Janik  <timj@imendio.com>
171
172         * glib/gpattern.c (g_pattern_ph_match): applied significant recursion
173         complexity optimization, based on a patch from Matthias Clasen.
174
175         * tests/patterntest.c: more tests, mostly from matthias.
176
177 2005-09-20  Matthias Clasen  <mclasen@redhat.com>
178
179         * glib/gqueue.c (g_queue_insert_sorted): Correct the docs.
180         (#316703, Mark Drago)
181
182 Mon Sep 19 17:23:23 2005  Tim Janik  <timj@imendio.com>
183
184         * glib/gpattern.c: applied a patch from matthias which checks on the
185         upper bound of GPatternSpec length to optimize matches.
186         cosmetic fixups.
187
188         * tests/patterntest.c: added more match cases.
189
190 2005-09-16  Tor Lillqvist  <tml@novell.com>
191
192         * glib/gstrfuncs.c (g_ascii_strcasecmp, g_ascii_strncasecmp): Add
193         warning to doc comment that these functions should not be used on
194         encodings like CP932.
195
196 2005-09-14  Matthias Clasen  <mclasen@redhat.com>
197
198         * tests/keyfile-test.c: Add a test for grup names of length 1.
199
200         * glib/gkeyfile.c (g_key_file_line_is_group): Accept group names
201         of length 1.  (#316309)
202         
203 2005-09-12  Matthias Clasen  <mclasen@redhat.com>
204
205         * glib/gmarkup.c (g_markup_escape_text): Clarify docs.
206
207 2005-09-11  Sebastian Wilhelmi  <seppi@seppi.de>
208
209         * tests/refcount/Makefile.am (INCLUDES): Link the the refcount
210         tests to the system thread library $(G_THREAD_LIBS). Fixes #313744
211         and #314217.
212
213 2005-09-11  Kjartan Maraas  <kmaraas@gnome.org>
214
215         * glib/gmain.c: (g_child_watch_prepare), (g_child_watch_check),
216         (child_watch_helper_thread): Remove some dead code. Closes
217         bug #315278.
218
219 2005-09-07  Tor Lillqvist  <tml@novell.com>
220
221         * glib/Makefile.am: Create also a console version of the
222         gspawn-win32-helper program, gspawn-win32-helper-console.exe.
223         It's otherwise identical to gspawn-win32-helper.exe, except marked
224         as a console application (linked without the -mwindows option).
225         
226         * glib/gspawn-win32.c (do_spawn_directly, do_spawn_with_pipes):
227         Drop the dont_wait parameter. Its truth value correlated 100% with
228         the NULLness of the exit_status parameter anyway, so it's enough
229         to check whether exit_status is NULL. Invert the sense of the
230         dont_return_handle parameter and rename it to do_return_handle, to
231         make the code easier to read by avoiding double negations.
232
233         (g_spawn_sync_utf8, g_spawn_async_with_pipes_utf8): Modify calls
234         to do_spawn_with_pipes() accordingly.
235
236         (do_spawn_with_pipes): If we have a console, use the console
237         version of the helper program, otherwise use the GUI one. This
238         avoids extra console windows opening up in some situations. (In
239         case a console application uses the GUI gspawn-win32-helper.exe to
240         spawn another console application we would get a separate console
241         for the spawned console application).
242
243         * glib-zip.in: Distribute also gspawn-win32-helper-console.exe.
244
245 2005-09-05  Matthias Clasen  <mclasen@redhat.com>
246
247         * glib/gmappedfile.c (g_mapped_file_new): Report an error
248         if the file is too large.  (#315275, Kjartan Maraas)
249
250         * glib/gkeyfile.c (g_key_file_load_from_fd): The return value
251         of read() is signed.  (#315273, Kjartan Maraas)
252         
253 2005-08-31  Tor Lillqvist  <tml@novell.com>
254
255         * glib/gutils.h: Wrapping atexit() is a bad idea on Windows, where
256         the EXE and each DLL have their own atexit function chains.
257
258         #define g_atexit as atexit instead. This means it has a
259         better chance of doing what the caller wants. For instance,
260         gtkhtml calls g_atexit() registering a function in gtkhtml
261         itself. This caused a crash when g_atexit() was implemented as a
262         function in the GLib DLL. The gtkhtml DLL was already unloaded by
263         the time the GLib DLL got unloaded.
264
265         * glib/gutils.c: #undef the #define mentioned above, to also get a
266         real g_atexit() into the DLL for backward compatibility. Document
267         the Windows behaviour of g_atexit(), and document the varying ways
268         atexit() can behave in the context of dynamically loaded modules
269         on Unix.
270
271 2005-08-31  Matthias Clasen  <mclasen@redhat.com>
272
273         * glib/glib.symbols: 
274         * glib/gquark.h: 
275         * glib/gdataset.c: Add string interning functions.
276
277 2005-08-28  Matthias Clasen  <mclasen@redhat.com>
278
279         * glib/giochannel.c: Unify some near-duplicate strings. (#314654,
280         Clytie Siddall)
281         
282 2005-08-26  Matthias Clasen  <mclasen@redhat.com>
283
284         * configure.in: Bump version to 2.9.0
285
286 2005-08-25  Tor Lillqvist  <tml@novell.com>
287
288         Make also the g_spawn*() functions take parameters in the GLib
289         file name encoding, i.e. UTF-8, on Windows. Has no impact on Unix
290         API or ABI. Like the other GLib API that was earlier changed to
291         use UTF-8 on Windows, the names of the functions that take UTF-8
292         have _utf8 suffixes added by using preprocessor macros in the
293         header file. The old names are kept for functions with the old
294         behaviour, taking parameters in the system codepage, for DLL ABI
295         stability.
296         
297         * glib/gspawn.h: On Win32 add the suffix _utf8 to the names of the
298         g_spawn*() functions.
299         
300         * glib/gspawn-win32.c: Use wide-char API on NT-based
301         Windows. Convert parameters from UTF-8 to wide chars (NT) or
302         system codepage (Win9x) and call the C library _wspawn*() or
303         spawn*() functions respectvely. Add DLL ABI stability versions
304         that take parameters in the system codepage.
305
306         * glib/gspawn-win32-helper.c: On NT-based Windows use the
307         wide-char versions of argv and envp, and use wide-char API to
308         change directory and spawn the program to run. Remove the verbose
309         debugging output, it was too complex to modify for the wide-char
310         features. (Just add temporary debugging printouts if needed, no
311         need to have them permanently in the source.)
312
313         * glib/gspawn.c: Corresponding documentation updates.
314
315         * glib/glib.symbols: Corresponding changes: Mark the ABI stability
316         symbols as PRIVATE, add the new _utf8-suffixed ones.
317
318 2005-08-24  Stepan Kasal  <kasal@ucw.cz>
319
320         * glib/gtypes.h (G_MININT64): Cast the constant to gint64; it is
321         guint64 otherwise and that can produce warnings about comparison
322         between signed and unsigned.
323
324 2005-08-23  Matthias Clasen  <mclasen@redhat.com>
325
326         * glib/gutils.c: Fix the crt_externs.h include.
327
328 2005-08-23  Stepan Kasal  <kasal@ucw.cz>
329
330         * NEWS: Fix spelling of my first name.
331
332 2005-08-23  Matthias Clasen  <mclasen@redhat.com>
333
334         * Bump version
335
336         * === Released 2.8.1 ===
337
338         * NEWS: Updates
339
340 2005-08-20  Hans Breuer  <hans@breuer.org>
341
342         * glib/makefile.msc.in : link with ws2_32.lib
343
344 2005-08-18  Tor Lillqvist  <tml@novell.com>
345
346         * configure.in: Check for <sys/wait.h>
347
348         * glib/gbacktrace.c: Include <sys/wait.h> on if HAVE_SYS_WAIT_H.
349
350 2005-08-18  Ross Burton  <ross@burtonini.com>
351
352         * glib/gstring.c:
353         Optimise single-character insertions.
354         
355         * glib/gutf8.c:
356         Note copied code.
357         
358         * tests/string-test.c:
359         Add tests for new optimisation, and fix a leak.
360
361 2005-08-17  Matthias Clasen  <mclasen@redhat.com>
362
363         * configure.in: Check for crt_externs.h and _NSGetEnviron.
364
365         * glib/gutils.c: On Darwin, include crt-externs.h and
366         define environ using _NSGetEnviron().  (#313731)
367
368 2005-08-16  Stepan Kasal  <kasal@ucw.cz>
369
370         * glib/gutils.c (g_get_any_init): Move the body of the big if...
371         (g_get_any_init_do): ... to this new function.
372         (g_get_any_init): Declare as inline.
373         (g_get_any_init_locked): New inline function, does the locking.
374         Make use of these two throughout the code.
375
376 2005-08-15  Matthias Clasen  <mclasen@redhat.com>
377
378         * glib/gbacktrace.c (g_on_error_stack_trace): Wait for
379         the child process and then simply return. This makes 
380         The "S" option work as documented in g_on_error_query().
381         (#313125, Matthew F. Barnes)
382
383         * glib/gunicode.h: Update the link to Unicode category
384         values.  (#313369, Behnam Esfahbod)
385
386         * glib/gqueue.c (g_queue_find_custom): Clarify docs
387         a little.  (#311727, Tristan van Berkom)
388
389         * glib/abicheck.sh, gobject/abicheck.sh: Make the 
390         check work on ia64 too, where some symbols ended up 
391         in yet another section.
392