Bug 558672 – NULL key lookup using g_hash_table_lookup_extended()
[platform/upstream/glib.git] / ChangeLog
1 2008-11-04  Christian Dywan  <christian@imendio.com>
2
3         Bug 558672 – NULL key lookup using g_hash_table_lookup_extended()
4
5         * glib/ghash.c:
6         Clarify g_hash_table_lookup_extended
7
8 2008-11-02  Tor Lillqvist  <tml@novell.com>
9
10         * configure.in: Expand also build/win32/vs9/Makefile.
11
12 2008-10-31  Christian Dywan  <christian@imendio.com>
13
14         Bug 558513 – g_warn_if_fail FIXME in gtestutils
15
16         * glib/gtestutils.c (g_test_log_send):
17         Turn g_assert into g_warn_if_fail as advised
18
19 2008-10-31  Grahame Bowland  <grahame@angrygoats.net>
20
21         Bug 558185 – 'parent' variable in g_local_file_get_child_for_display_name() 
22         hits g_object_unref(NULL) assertion
23
24         * gio/glocalfile.c: 
25         - remove unused variable. Patch by Matt Johnston <matt@ucc.asn.au>
26
27 2008-10-29 16:11:14  Tim Janik  <timj@gtk.org>
28
29         * glib/gmacros.h: added G_PASTE() and G_STATIC_ASSERT(), based on
30         patches by Christian Persch and Christian Dywan. Fixes:
31         Bug 558381 - Add support for compile time assertions
32
33 2008-10-27  Joseph Pingenot  <gnomesvn@digitasaru.net>
34
35         * glib/ghash.c: changed "#GHashTableIterator" to "#GHashTableIter"
36         in the documentation-comments above g_hash_table_foreach_remove()
37         and g_hash_table_foreach_steal() to correctly name and link to
38         GHashTableIter.  This affects the GNOME documentation website
39         as well, so further steps are likely necessary beyond this subproject..
40
41 2008-10-23 Matthias Clasen <mclasen@redhat.com>
42
43         Bug 557210 – g_compute_checksum_for_* asserts with less than 2 bytes
44
45         * glib/gchecksum.c (g_compute_checksum_for_data): Accept 
46         lengths < 2. Patch by Tommi Komulainen
47
48         * tests/checksum-test.c: Add a test for this
49
50 2008-10-23 Matthias Clasen <mclasen@redhat.com>
51
52         Bug 556921 – gpoll.h breaks hal compilation
53
54         * glib/gpoll.h: Include gtypes.h. Pointed out by Anis Elleuch
55
56 2008-10-20 Christian Persch <chpe@gnome.org>
57
58         Bug 557087 – mem leak in g_content_types_get_registered
59                 
60         * gio/gcontenttype.c: Plug a mem leak.
61
62 2008-10-19  Michael Natterer  <mitch@imendio.com>
63
64         Bug 556186 – gpoll.h breaks gmain.h inclusion
65
66         * glib/gpoll.h: different fix: disallow direct inclusion
67         unconditionally again but make an exception if included from
68         gmain.h to maintain compatibility.
69
70 2008-10-16  Matthias Clasen <mclasen@redhat.com>
71
72         * configure.in: Bump version to 2.19.1
73
74         * === Released 2.19.0 ===
75
76         * NEWS: Updates
77
78 2008-10-14  Christian Persch <chpe@gnome.org>
79
80         Bug 556186 – gpoll.h breaks gmain.h inclusion
81
82         * glib/gpoll.h: Only disallow direct inclusion when
83         G_DISABLE_SINGLE_INCLUDES is defined.
84
85 2008-10-13  Sven Herzberg  <sven@imendio.com>
86
87         Bug 556101 – static mutex yields warnings with g++
88         Reviewed by Tim Janik
89
90         * configure.in: added an intermediate cast to gpointer
91
92 2008-10-13  Christian Persch <chpe@gnome.org>
93
94         Bug 555311 – format not a string literal and no format arguments
95
96         * glib/gmarkup.c:
97         * glib/gshell.c: Use literal errors where appropriate.
98
99 2008-10-10  Behdad Esfahbod  <behdad@gnome.org>
100
101         Bug 551355 – [PATCH] Make glib build with libtool 2.2
102
103         * autogen.sh: Accept libtool 2.2.   We are moving towards having
104         it working.
105
106 2008-10-10  Behdad Esfahbod  <behdad@gnome.org>
107
108         * configure.in: With libtool 2.x, regenerate libtool early.
109         Based on bug 552107, patch by Patryk Zawadzki
110
111 2008-10-10  Matthias Clasen  <mclasen@redhat.com>
112
113         Bug 554557 – Patch to fix gcc warnings about missing format 
114         specifiers
115
116         * glib/gmarkup.c:
117         * glib/gshell.c:
118         * glib/grel.c: Fix gcc warnings. Patch by Kjartan Maraas
119
120 2008-10-10  Matthias Clasen  <mclasen@redhat.com>
121
122         Bug 552861 – glib-2.0.m4 calls system(3) without storing its result
123
124         * m4macros/glib-2.0.m4: Cosmetic change to make -Werror happy.
125         Patch by Andreas Köhler
126
127 2008-10-08  Christian Persch  <chpe@gnome.org>
128
129         Bug 555313 – GFileAttribute boxed type get_type function should
130         use usual get_type pattern
131
132         * gio/gfileattribute.c (g_file_attribute_info_list_get_type): Use
133         g_once_init_enter/leave.
134
135 2008-10-08  Christian Persch  <chpe@gnome.org>
136
137         Bug 555314 – mem leak in gmarkup
138
139         * glib/gmarkup.c: (g_markup_parse_context_parse): Plug a mem leak.
140
141 2008-10-08  Tor Lillqvist  <tml@novell.com>
142
143         Bug 554790 - g_convert() misbehaves with winiconv versions
144
145         * glib/win_iconv.c (kernel_mbtowc): If converting from ASCII,
146         explicitly check for and reject 8bit chars. MultiByteToWideChar()
147         doesn't, at least not on XP.
148
149 2008-10-06  Matthias Clasen  <mclasen@redhat.com>
150
151         * glib/gtypes.h: Properly include gmacros.h
152
153 2008-10-06  Behdad Esfahbod  <behdad@gnome.org>
154
155         Bug 555309 – giochannel breaks on error
156         Patch from Christian Persch
157
158         * glib/giounix.c (g_io_unix_read), (g_io_unix_write),
159         (g_io_unix_seek), (g_io_unix_close), (g_io_unix_set_flags):
160         Don't shadow err.  Oops!
161
162 2008-10-06  Christophe Fergeau  <teuf@gnome.org>
163
164         Bug 555224 – Improve g_format_size_for_display doc
165         
166         * glib/gfileutils.c: change g_format_size_for_display API doc to
167         explicitly say that the returned string has to be freed. Change
168         spelling of "newly allocated" to "newly-allocated" in g_file_read_link
169         API doc to be more consistent with what is done in that file.
170
171 2008-10-01  David Zeuthen  <davidz@redhat.com>
172
173         * README.in: Add "Notes about glib 2.20" section detailing the
174         ramifications of the patch from bug #528670.
175
176 2008-09-30  Behdad Esfahbod  <behdad@gnome.org>
177
178         Bug 554092 – glib doesn't return G_FILE_ERROR_NOENT et al on OS X
179
180         * glib/giounix.c (g_io_unix_read), (g_io_unix_write),
181         (g_io_unix_seek), (g_io_unix_close), (g_io_unix_set_flags),
182         (g_io_unix_get_flags), (g_io_channel_new_file):
183         Like mclasen says: "well, thats the way errno works...,
184         save it or loose it".  Save errno.
185
186 2008-09-30  Tor Lillqvist  <tml@novell.com>
187
188         * Makefile.decl
189         * glib/tests/Makefile.am: Bypass gtester related stuff on Windows.
190
191 2008-09-30  Tor Lillqvist  <tml@novell.com>
192
193         * glib/gprintf.c
194         * glib/gnulib/vasnprintf.c: Don't define _GNU_SOURCE on Windows,
195         as _GNU_SOURCE has unintended side effects when compiling against
196         newest mingw headers.
197
198 2008-09-26  Dan Winship  <danw@gnome.org>
199
200         Bug 553447 – g_assert_no_error()
201
202         * glib/gtestutils.h (g_assert_no_error, g_assert_error): Macros to
203         assert that a GError is not set, or else is set to a particular
204         error.
205
206         * glib/gtestutils.c (g_assertion_message_error): utility for
207         those macros
208
209         * glib/tests/keyfile.c:
210         * tests/asyncqueue-test.c:
211         * tests/bookmarkfile-test.c:
212         * tests/convert-test.c:
213         * tests/file-test.c: Use g_assert_error/g_assert_no_error
214
215 2008-09-26  Dan Winship  <danw@gnome.org>
216
217         * glib/gthreadpool.c (wakeup_thread_marker): make this a "const
218         gpointer" rather than a gconstpointer to avoid warnings later
219
220         * glib/pcre/pcre_ucp_searchfuncs.c:
221         * glib/pcre/pcre_valid_utf8.c: #include "config.h"
222
223         * glib/tests/printf.c (test_d): fool gcc into not warning about
224         some printf format strings that we know are dubious
225
226 2008-09-26  Matthias Clasen  <mclasen@redhat.com>
227
228         Bug 553857 – gbacktrace.h requires signal.h
229
230         * glib/gbacktrace.h: Include signal.h for raise(). 
231         Pointed out by Sebastien Bacher
232
233 2008-09-26  Matthias Clasen  <mclasen@redhat.com>
234
235         Bug 553724 – python interpretter path not patched in correctly
236
237         * glib/Makefile.am: Fix the sed magic to replace python.
238
239 2008-09-26  Matthias Clasen  <mclasen@redhat.com>
240
241         * glib/gmain.c: Add some more docs.
242
243         * glib/giochannel.c: Move more docs inline, and improve them
244         on the way.
245
246 2008-09-25  Tor Lillqvist  <tml@novell.com>
247
248         Bug 553820 - gpoll.c: undeclared identifier
249
250         * glib/gmain.c
251         * glib/gpoll.c: Make the g_poll() function non-static also on
252         Windows. Prefix an underscore to the g_main_poll_debug variable
253         and make it non-static in gmain.c so that it can be used in
254         gpoll.c. Add back missing variable declaration.
255
256 2008-09-25  Tor Lillqvist  <tml@novell.com>
257
258         * glib/gspawn-win32.c (do_spawn_with_pipes) (do_spawn_directly):
259         Just ignore the child_setup function, never call it. The is no
260         situation in which it could be useful on Windows. Do print a
261         warning, like before.
262
263         * glib/gspawn.c (g_spawn_async_with_pipes): Corresponding change
264         in documentation.
265
266 2008-09-24  Sven Herzberg  <sven@imendio.com>
267
268         Be a little more explcit in the docs. Includes Owen's requested
269         changes.
270
271         * glib/gmain.c: improved documentation for g_source_attach() and
272         g_source_destroy()
273
274 2008-09-23  Michael Natterer  <mitch@imendio.com>
275
276         * glib/glib.h: #include <glib/gpoll.h>
277
278         * glib/gpoll.h: #error out if gpoll.h is included directly.
279
280         * glib/gpoll.c: remove trailing whitespace.
281
282 2008-09-23  Dan Winship  <danw@gnome.org>
283
284         * glib/gpoll.[ch] (g_poll): Move this out of gmain.c and make it part
285         of the public API. (Part of Bug 505361 - gunixinputstream.c assumes
286         poll() available.)
287
288 2008-09-23  Tor Lillqvist  <tml@novell.com>
289
290         * glib/gmain.c (poll_rest) [Win32]: Fix embarrassing bug: I was
291         passing an incorrect third parameter to memmove(), had forgotten
292         to multiply by the size of the table entry. Just use a for loop
293         instead, clearer. Odd I didn't notice when testing this code.
294
295 2008-09-19  Hans Petter Jansson  <hpj@novell.com>
296
297         Rewrite most of GHashTable to use open addressing with quadratic
298         probing instead of chaining. This has the potential to reduce memory
299         fragmentation significantly, while being slightly faster due to
300         better locality and no need to call alloc/free functions for nodes.
301         Benchmarks suggest it also uses less memory overall.
302
303         * glib/ghash.c (prime_mod): Table of suitable primes for
304         initial-probe distribution.
305         (g_hash_table_set_shift): New function.
306         (g_hash_table_find_closest_shift): New function.
307         (g_hash_table_set_shift_from_size): New function.
308         (g_hash_table_lookup_node_for_insertion): New function.
309         (g_hash_table_lookup_node): Rewritten to return node index instead of
310         pointer, use quadratic probe on flat table, and not return insertion
311         data. The latter saves some computation for read-only lookups.
312         (g_hash_table_remove_node): Rewrite to take a pointer directly to the
313         node structure to remove, and clear that. Remove unlinking code.
314         (g_hash_table_remove_all_nodes): Rewrite to not clear nodes
315         individually, but en masse using memset () after potentially calling
316         notify functions.
317         (iter_remove_or_steal): Use new data structure and algorithm. Vastly
318         simplified - now just a call to g_hash_table_remove_node ().
319         (g_hash_table_resize): New resize code, re-indexing with new prime
320         and cleaning up tombstones.
321         (g_hash_table_maybe_resize): Table may hold 8 buckets minimum, no less
322         than 1/4 load excluding tombstones, and no more than 15/16 load
323         including tombstones. These numbers are the results of a lot of
324         benchmarking with multiple complex applications, and should not be
325         changed lightly.
326         (g_hash_table_iter_next)
327         (g_hash_table_lookup)
328         (g_hash_table_lookup_extended)
329         (g_hash_table_insert_internal)
330         (g_hash_table_remove_internal)
331         (g_hash_table_foreach_remove_or_steal)
332         (g_hash_table_foreach)
333         (g_hash_table_find)
334         (g_hash_table_get_keys)
335         (g_hash_table_get_values): Use new data structure and algorithm,
336         fairly trivial changes.
337
338 2008-09-19  Tor Lillqvist  <tml@novell.com>
339
340         * glib-zip.in: Look for man pages in share/man.
341
342         * glib/gutils.c (_glib_get_dll_directory)
343         * glib/gspawn-win32.c (do_spawn_with_pipes): Be a bit less
344         restrictive, look for the helper programs in the same folder where
345         the GLib DLL is, not necessarily in a "bin" subfolder of the top
346         GLib installation folder.
347
348 2008-09-18  Matthias Clasen <mclasen@redhat.com>
349
350         * configure.in: Bump version to 2.19.0
351
352         * ChangeLog.pre-2-18: rotate ChangeLog
353         
354         * === branch for 2.18 ===