4 This is GLib version @GLIB_VERSION@. GLib is the low-level core
5 library that forms the basis for projects such as GTK+ and GNOME. It
6 provides data structure handling for C, portability wrappers, and
7 interfaces for such runtime functionality as an event loop, threads,
8 dynamic loading, and an object system.
10 The official download locations are:
11 ftp://ftp.gtk.org/pub/glib
12 http://download.gnome.org/sources/glib
14 The official web site is:
17 Information about mailing lists can be found at
18 http://www.gtk.org/mailing-lists.php
20 To subscribe, send mail to gtk-list-request@gnome.org
21 with the subject "subscribe".
26 See the file 'INSTALL'
31 Bugs should be reported to the GNOME bug tracking system.
32 (http://bugzilla.gnome.org, product glib.) You will need
33 to create an account for yourself.
35 In the bug report please include:
37 * Information about your system. For instance:
39 - What operating system and version
40 - For Linux, what version of the C library
42 And anything else you think is relevant.
44 * How to reproduce the bug.
46 If you can reproduce it with one of the test programs that are built
47 in the tests/ subdirectory, that will be most convenient. Otherwise,
48 please include a short test program that exhibits the behavior.
49 As a last resort, you can also provide a pointer to a larger piece
50 of software that can be downloaded.
52 * If the bug was a crash, the exact text that was printed out
53 when the crash occured.
55 * Further information such as stack traces may be useful, but
61 Patches should also be submitted to bugzilla.gnome.org. If the
62 patch fixes an existing bug, add the patch as an attachment
65 Otherwise, enter a new bug report that describes the patch,
66 and attach the patch to that bug report.
68 Patches should be in unified diff form. (The -up option to GNU diff.)
73 * GTask no longer imposes a fixed limit on the number of tasks that
74 can be run_in_thread() simultaneously, since doing this inevitably
75 results in deadlocks in some use cases. Instead, it now has a base
76 number of threads that can be used "for free", but will gradually
77 add more threads to the pool if too much time passes without any
80 The exact behavior may continue to change in the future, and it's
81 possible that some future version of GLib may not do any
82 rate-limiting at all. As a result, you should no longer assume that
83 GTask will rate-limit tasks itself (or, by extension, that calls to
84 certain async gio methods will automatically be rate-limited for
85 you). If you have a very large number of tasks to run, and don't
86 want them to all run at once, you should rate-limit them yourself.
91 * g_test_run() no longer runs tests in exactly the order they are
92 registered; instead, it groups them according to test suites (ie,
93 path components) like the documentation always claimed it did. In
94 some cases, this can result in a sub-optimal ordering of tests,
95 relative to the old behavior. The fix is to change the test paths to
96 properly group together the tests that should run together. (eg, if
97 you want to run test_foo_simple(), test_bar_simple(), and
98 test_foo_using_bar() in that order, they should have test paths like
99 "/simple/foo", "/simple/bar", "/complex/foo-using-bar", not
100 "/foo/simple", "/bar/simple", "/foo/using-bar" (which would result
101 in test_foo_using_bar() running before test_bar_simple()).
103 (The behavior actually changed in GLib 2.36, but it was not
104 documented at the time, since we didn't realize it mattered.)
106 Notes about GLib 2.36
107 =====================
109 * It is no longer necessary to call g_type_init(). If you are
110 loading GLib as a dynamic module, you should be careful to avoid
111 unloading it, then subsequently loading it again. This never
112 really worked before, but it is now explicitly undefined behavior.
113 Note that if g_type_init() was the only explicit use of a GObject
114 API and you are using linker flags such as --no-add-needed, then
115 you may have to artificially use some GObject call to keep the
116 linker from optimizing away -lgobject. We recommend to use
117 g_type_ensure (G_TYPE_OBJECT) for this purpose.
119 * This release contains an incompatible change to the g_get_home_dir()
120 function. Previously, this function would effectively ignore the HOME
121 environment variable and always return the value from /etc/password.
122 As of this version, the HOME variable is used if it is set and the
123 value from /etc/passwd is only used as a fallback.
125 * The 'flowinfo' and 'scope_id' fields of GInetSocketAddress
126 (introduced in GLib 2.32) have been fixed to be in host byte order
127 rather than network byte order. This is an incompatible change, but
128 the previous behavior was clearly broken, so it seems unlikely that
131 Notes about GLib 2.34
132 =====================
134 * GIO now looks for thumbnails in XDG_CACHE_HOME, following a
135 recent alignment of the thumbnail spec with the basedir spec.
137 * The default values for GThreadPools max_unused_threads and
138 max_idle_time settings have been changed to 2 and 15*1000,
141 Notes about GLib 2.32
142 =====================
144 * It is no longer necessary to use g_thread_init() or to link against
145 libgthread. libglib is now always thread-enabled. Custom thread
146 system implementations are no longer supported (including errorcheck
149 * The thread and synchronisation APIs have been updated.
150 GMutex and GCond can be statically allocated without explicit
151 initialisation, as can new types GRWLock and GRecMutex. The
152 GStatic_______ variants of these types have been deprecated. GPrivate
153 can also be statically allocated and has a nicer API (deprecating
154 GStaticPrivate). Finally, g_thread_create() has been replaced with a
155 substantially simplified g_thread_new().
157 * The g_once_init_enter()/_leave() functions have been replaced with
158 macros that allow for a pointer to any gsize-sized object, not just a
159 gsize*. The assertions to ensure that a pointer to a correctly-sized
160 object is being used will not work with generic pointers (ie: (void*)
161 and (gpointer) casts) which would have worked with the old version.
163 * It is now mandatory to include glib.h instead of individual headers.
165 * The -uninstalled variants of the pkg-config files have been dropped.
167 * For a long time, gobject-2.0.pc mistakenly declared a public
168 dependency on gthread-2.0.pc (when the dependency should have been
169 private). This means that programs got away with calling
170 g_thread_init() without explicitly listing gthread-2.0.pc among their
173 gthread has now been removed as a gobject dependency, which will cause
174 such programs to break.
176 The fix for this problem is either to declare an explicit dependency
177 on gthread-2.0.pc (if you care about compatibility with older GLib
178 versions) or to stop calling g_thread_init().
180 * g_debug() output is no longer enabled by default. It can be enabled
181 on a per-domain basis with the G_MESSAGES_DEBUG environment variable
183 G_MESSAGES_DEBUG=domain1,domain2
187 Notes about GLib 2.30
188 =====================
190 * GObject includes a generic marshaller, g_cclosure_marshal_generic.
191 To use it, simply specify NULL as the marshaller in g_signal_new().
192 The generic marshaller is implemented with libffi, and consequently
193 GObject depends on libffi now.
195 Notes about GLib 2.28
196 =====================
198 * The GApplication API has changed compared to the version that was
199 included in the 2.25 development snapshots. Existing users will need
202 Notes about GLib 2.26
203 =====================
205 * Nothing noteworthy.
207 Notes about GLib 2.24
208 =====================
210 * It is now allowed to call g_thread_init(NULL) multiple times, and
211 to call glib functions before g_thread_init(NULL) is called
212 (although the later is mainly a change in docs as this worked before
213 too). See the GThread reference documentation for the details.
215 * GObject now links to GThread and threads are enabled automatically
216 when g_type_init() is called.
218 * GObject no longer allows to call g_object_set() on construct-only properties
219 while an object is being initialized. If this behavior is needed, setting a
220 custom constructor that just chains up will re-enable this functionality.
222 * GMappedFile on an empty file now returns NULL for the contents instead of
223 returning an empty string. The documentation specifically states that code
224 may not rely on nul-termination here so any breakage caused by this change
225 is a bug in application code.
227 Notes about GLib 2.22
228 =====================
230 * Repeated calls to g_simple_async_result_set_op_res_gpointer used
231 to leak the data. This has been fixed to always call the provided
234 Notes about GLib 2.20
235 =====================
237 * The functions for launching applications (e.g. g_app_info_launch() +
238 friends) now passes a FUSE file:// URI if possible (requires gvfs
239 with the FUSE daemon to be running and operational). With gvfs 2.26,
240 FUSE file:// URIs will be mapped back to gio URIs in the GFile
241 constructors. The intent of this change is to better integrate
242 POSIX-only applications, see bug #528670 for the rationale. The
243 only user-visible change is when an application needs to examine an
244 URI passed to it (e.g. as a positional parameter). Instead of
245 looking at the given URI, the application will now need to look at
246 the result of g_file_get_uri() after having constructed a GFile
247 object with the given URI.
249 Notes about GLib 2.18
250 =====================
252 * The recommended way of using GLib has always been to only include the
253 toplevel headers glib.h, glib-object.h and gio.h. GLib enforces this by
254 generating an error when individual headers are directly included.
255 To help with the transition, the enforcement is not turned on by
256 default for GLib headers (it is turned on for GObject and GIO).
257 To turn it on, define the preprocessor symbol G_DISABLE_SINGLE_INCLUDES.
259 Notes about GLib 2.16
260 =====================
262 * GLib now includes GIO, which adds optional dependencies against libattr
263 and libselinux for extended attribute and SELinux support. Use
264 --disable-xattr and --disable-selinux to build without these.
266 Notes about GLib 2.10
267 =====================
269 * The functions g_snprintf() and g_vsnprintf() have been removed from
270 the gprintf.h header, since they are already declared in glib.h. This
271 doesn't break documented use of gprintf.h, but people have been known
272 to include gprintf.h without including glib.h.
274 * The Unicode support has been updated to Unicode 4.1. This adds several
275 new members to the GUnicodeBreakType enumeration.
277 * The support for Solaris threads has been retired. Solaris has provided
278 POSIX threads for long enough now to have them available on every
281 * 'make check' has been changed to validate translations by calling
282 msgfmt with the -c option. As a result, it may fail on systems with
283 older gettext implementations (GNU gettext < 0.14.1, or Solaris gettext).
284 'make check' will also fail on systems where the C compiler does not
285 support ELF visibility attributes.
287 * The GMemChunk API has been deprecated in favour of a new 'slice
288 allocator'. See the g_slice documentation for more details.
290 * A new type, GInitiallyUnowned, has been introduced, which is
291 intended to serve as a common implementation of the 'floating reference'
292 concept that is e.g. used by GtkObject. Note that changing the
293 inheritance hierarchy of a type can cause problems for language
294 bindings and other code which needs to work closely with the type
295 system. Therefore, switching to GInitiallyUnowned should be done
296 carefully. g_object_compat_control() has been added to GLib 2.8.5
297 to help with the transition.
299 Notes about GLib 2.6.0
300 ======================
302 * GLib 2.6 introduces the concept of 'GLib filename encoding', which is the
303 on-disk encoding on Unix, but UTF-8 on Windows. All GLib functions
304 returning or accepting pathnames have been changed to expect
305 filenames in this encoding, and the common POSIX functions dealing
306 with pathnames have been wrapped. These wrappers are declared in the
307 header <glib/gstdio.h> which must be included explicitly; it is not
308 included through <glib.h>.
310 On current (NT-based) Windows versions, where the on-disk file names
311 are Unicode, these wrappers use the wide-character API in the C
312 library. Thus applications can handle file names containing any
313 Unicode characters through GLib's own API and its POSIX wrappers,
314 not just file names restricted to characters in the system codepage.
316 To keep binary compatibility with applications compiled against
317 older versions of GLib, the Windows DLL still provides entry points
318 with the old semantics using the old names, and applications
319 compiled against GLib 2.6 will actually use new names for the
320 functions. This is transparent to the programmer.
322 When compiling against GLib 2.6, applications intended to be
323 portable to Windows must take the UTF-8 file name encoding into
324 consideration, and use the gstdio wrappers to access files whose
325 names have been constructed from strings returned from GLib.
327 * Likewise, g_get_user_name() and g_get_real_name() have been changed
328 to return UTF-8 on Windows, while keeping the old semantics for
329 applications compiled against older versions of GLib.
331 * The GLib uses an '_' prefix to indicate private symbols that
332 must not be used by applications. On some platforms, symbols beginning
333 with prefixes such as _g will be exported from the library, on others not.
334 In no case can applications use these private symbols. In addition to that,
335 GLib+ 2.6 makes several symbols private which were not in any installed
336 header files and were never intended to be exported.
338 * To reduce code size and improve efficiency, GLib, when compiled
339 with the GNU toolchain, has separate internal and external entry
340 points for exported functions. The internal names, which begin with
341 IA__, may be seen when debugging a GLib program.
343 * On Windows, GLib no longer opens a console window when printing
344 warning messages if stdout or stderr are invalid, as they are in
345 "Windows subsystem" (GUI) applications. Simply redirect stdout or
346 stderr if you need to see them.
348 * The child watch functionality tends to reveal a bug in many
349 thread implementations (in particular the older LinuxThreads
350 implementation on Linux) where it's not possible to call waitpid()
351 for a child created in a different thread. For this reason, for
352 maximum portability, you should structure your code to fork all
353 child processes that you want to wait for from the main thread.
355 * A problem was recently discovered with g_signal_connect_object();
356 it doesn't actually disconnect the signal handler once the object being
357 connected to dies, just disables it. See the API docs for the function
358 for further details and the correct workaround that will continue to
359 work with future versions of GLib.