|
Packit |
db3073 |
General Information
|
|
Packit |
db3073 |
===================
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
This is GLib version 2.32.4. GLib is the low-level core
|
|
Packit |
db3073 |
library that forms the basis for projects such as GTK+ and GNOME. It
|
|
Packit |
db3073 |
provides data structure handling for C, portability wrappers, and
|
|
Packit |
db3073 |
interfaces for such runtime functionality as an event loop, threads,
|
|
Packit |
db3073 |
dynamic loading, and an object system.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
The official download locations are:
|
|
Packit |
db3073 |
ftp://ftp.gtk.org/pub/glib
|
|
Packit |
db3073 |
http://download.gnome.org/sources/glib
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
The official web site is:
|
|
Packit |
db3073 |
http://www.gtk.org/
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
Information about mailing lists can be found at
|
|
Packit |
db3073 |
http://www.gtk.org/mailing-lists.php
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
To subscribe, send mail to gtk-list-request@gnome.org
|
|
Packit |
db3073 |
with the subject "subscribe".
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
Installation
|
|
Packit |
db3073 |
============
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
See the file 'INSTALL'
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
How to report bugs
|
|
Packit |
db3073 |
==================
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
Bugs should be reported to the GNOME bug tracking system.
|
|
Packit |
db3073 |
(http://bugzilla.gnome.org, product glib.) You will need
|
|
Packit |
db3073 |
to create an account for yourself.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
In the bug report please include:
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* Information about your system. For instance:
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
- What operating system and version
|
|
Packit |
db3073 |
- For Linux, what version of the C library
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
And anything else you think is relevant.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* How to reproduce the bug.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
If you can reproduce it with one of the test programs that are built
|
|
Packit |
db3073 |
in the tests/ subdirectory, that will be most convenient. Otherwise,
|
|
Packit |
db3073 |
please include a short test program that exhibits the behavior.
|
|
Packit |
db3073 |
As a last resort, you can also provide a pointer to a larger piece
|
|
Packit |
db3073 |
of software that can be downloaded.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* If the bug was a crash, the exact text that was printed out
|
|
Packit |
db3073 |
when the crash occured.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* Further information such as stack traces may be useful, but
|
|
Packit |
db3073 |
is not necessary.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
Patches
|
|
Packit |
db3073 |
=======
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
Patches should also be submitted to bugzilla.gnome.org. If the
|
|
Packit |
db3073 |
patch fixes an existing bug, add the patch as an attachment
|
|
Packit |
db3073 |
to that bug report.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
Otherwise, enter a new bug report that describes the patch,
|
|
Packit |
db3073 |
and attach the patch to that bug report.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
Patches should be in unified diff form. (The -up option to GNU diff.)
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
Notes about GLib 2.32
|
|
Packit |
db3073 |
=====================
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* It is no longer necessary to use g_thread_init() or to link against
|
|
Packit |
db3073 |
libgthread. libglib is now always thread-enabled. Custom thread
|
|
Packit |
db3073 |
system implementations are no longer supported (including errorcheck
|
|
Packit |
db3073 |
mutexes).
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* The thread and synchronisation APIs have been updated.
|
|
Packit |
db3073 |
GMutex and GCond can be statically allocated without explicit
|
|
Packit |
db3073 |
initialisation, as can new types GRWLock and GRecMutex. The
|
|
Packit |
db3073 |
GStatic_______ variants of these types have been deprecated. GPrivate
|
|
Packit |
db3073 |
can also be statically allocated and has a nicer API (deprecating
|
|
Packit |
db3073 |
GStaticPrivate). Finally, g_thread_create() has been replaced with a
|
|
Packit |
db3073 |
substantially simplified g_thread_new().
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* The g_once_init_enter()/_leave() functions have been replaced with
|
|
Packit |
db3073 |
macros that allow for a pointer to any gsize-sized object, not just a
|
|
Packit |
db3073 |
gsize*. The assertions to ensure that a pointer to a correctly-sized
|
|
Packit |
db3073 |
object is being used will not work with generic pointers (ie: (void*)
|
|
Packit |
db3073 |
and (gpointer) casts) which would have worked with the old version.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* It is now mandatory to include glib.h instead of individual headers.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* The -uninstalled variants of the pkg-config files have been dropped.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* For a long time, gobject-2.0.pc mistakenly declared a public
|
|
Packit |
db3073 |
dependency on gthread-2.0.pc (when the dependency should have been
|
|
Packit |
db3073 |
private). This means that programs got away with calling
|
|
Packit |
db3073 |
g_thread_init() without explicitly listing gthread-2.0.pc among their
|
|
Packit |
db3073 |
dependencies.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
gthread has now been removed as a gobject dependency, which will cause
|
|
Packit |
db3073 |
such programs to break.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
The fix for this problem is either to declare an explicit dependency
|
|
Packit |
db3073 |
on gthread-2.0.pc (if you care about compatibility with older GLib
|
|
Packit |
db3073 |
versions) or to stop calling g_thread_init().
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* g_debug() output is no longer enabled by default. It can be enabled
|
|
Packit |
db3073 |
on a per-domain basis with the G_MESSAGES_DEBUG environment variable
|
|
Packit |
db3073 |
like
|
|
Packit |
db3073 |
G_MESSAGES_DEBUG=domain1,domain2
|
|
Packit |
db3073 |
or
|
|
Packit |
db3073 |
G_MESSAGES_DEBUG=all
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
Notes about GLib 2.30
|
|
Packit |
db3073 |
=====================
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* GObject includes a generic marshaller, g_cclosure_marshal_generic.
|
|
Packit |
db3073 |
To use it, simply specify NULL as the marshaller in g_signal_new().
|
|
Packit |
db3073 |
The generic marshaller is implemented with libffi, and consequently
|
|
Packit |
db3073 |
GObject depends on libffi now.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
Notes about GLib 2.28
|
|
Packit |
db3073 |
=====================
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* The GApplication API has changed compared to the version that was
|
|
Packit |
db3073 |
included in the 2.25 development snapshots. Existing users will need
|
|
Packit |
db3073 |
adjustments.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
Notes about GLib 2.26
|
|
Packit |
db3073 |
=====================
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* Nothing noteworthy.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
Notes about GLib 2.24
|
|
Packit |
db3073 |
=====================
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* It is now allowed to call g_thread_init(NULL) multiple times, and
|
|
Packit |
db3073 |
to call glib functions before g_thread_init(NULL) is called
|
|
Packit |
db3073 |
(although the later is mainly a change in docs as this worked before
|
|
Packit |
db3073 |
too). See the GThread reference documentation for the details.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* GObject now links to GThread and threads are enabled automatically
|
|
Packit |
db3073 |
when g_type_init() is called.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* GObject no longer allows to call g_object_set() on construct-only properties
|
|
Packit |
db3073 |
while an object is being initialized. If this behavior is needed, setting a
|
|
Packit |
db3073 |
custom constructor that just chains up will re-enable this functionality.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* GMappedFile on an empty file now returns NULL for the contents instead of
|
|
Packit |
db3073 |
returning an empty string. The documentation specifically states that code
|
|
Packit |
db3073 |
may not rely on nul-termination here so any breakage caused by this change
|
|
Packit |
db3073 |
is a bug in application code.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
Notes about GLib 2.22
|
|
Packit |
db3073 |
=====================
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* Repeated calls to g_simple_async_result_set_op_res_gpointer used
|
|
Packit |
db3073 |
to leak the data. This has been fixed to always call the provided
|
|
Packit |
db3073 |
destroy notify.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
Notes about GLib 2.20
|
|
Packit |
db3073 |
=====================
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* The functions for launching applications (e.g. g_app_info_launch() +
|
|
Packit |
db3073 |
friends) now passes a FUSE file:// URI if possible (requires gvfs
|
|
Packit |
db3073 |
with the FUSE daemon to be running and operational). With gvfs 2.26,
|
|
Packit |
db3073 |
FUSE file:// URIs will be mapped back to gio URIs in the GFile
|
|
Packit |
db3073 |
constructors. The intent of this change is to better integrate
|
|
Packit |
db3073 |
POSIX-only applications, see bug #528670 for the rationale. The
|
|
Packit |
db3073 |
only user-visible change is when an application needs to examine an
|
|
Packit |
db3073 |
URI passed to it (e.g. as a positional parameter). Instead of
|
|
Packit |
db3073 |
looking at the given URI, the application will now need to look at
|
|
Packit |
db3073 |
the result of g_file_get_uri() after having constructed a GFile
|
|
Packit |
db3073 |
object with the given URI.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
Notes about GLib 2.18
|
|
Packit |
db3073 |
=====================
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* The recommended way of using GLib has always been to only include the
|
|
Packit |
db3073 |
toplevel headers glib.h, glib-object.h and gio.h. GLib enforces this by
|
|
Packit |
db3073 |
generating an error when individual headers are directly included.
|
|
Packit |
db3073 |
To help with the transition, the enforcement is not turned on by
|
|
Packit |
db3073 |
default for GLib headers (it is turned on for GObject and GIO).
|
|
Packit |
db3073 |
To turn it on, define the preprocessor symbol G_DISABLE_SINGLE_INCLUDES.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
Notes about GLib 2.16
|
|
Packit |
db3073 |
=====================
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* GLib now includes GIO, which adds optional dependencies against libattr
|
|
Packit |
db3073 |
and libselinux for extended attribute and SELinux support. Use
|
|
Packit |
db3073 |
--disable-xattr and --disable-selinux to build without these.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
Notes about GLib 2.10
|
|
Packit |
db3073 |
=====================
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* The functions g_snprintf() and g_vsnprintf() have been removed from
|
|
Packit |
db3073 |
the gprintf.h header, since they are already declared in glib.h. This
|
|
Packit |
db3073 |
doesn't break documented use of gprintf.h, but people have been known
|
|
Packit |
db3073 |
to include gprintf.h without including glib.h.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* The Unicode support has been updated to Unicode 4.1. This adds several
|
|
Packit |
db3073 |
new members to the GUnicodeBreakType enumeration.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* The support for Solaris threads has been retired. Solaris has provided
|
|
Packit |
db3073 |
POSIX threads for long enough now to have them available on every
|
|
Packit |
db3073 |
Solaris platform.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* 'make check' has been changed to validate translations by calling
|
|
Packit |
db3073 |
msgfmt with the -c option. As a result, it may fail on systems with
|
|
Packit |
db3073 |
older gettext implementations (GNU gettext < 0.14.1, or Solaris gettext).
|
|
Packit |
db3073 |
'make check' will also fail on systems where the C compiler does not
|
|
Packit |
db3073 |
support ELF visibility attributes.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* The GMemChunk API has been deprecated in favour of a new 'slice
|
|
Packit |
db3073 |
allocator'. See the g_slice documentation for more details.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* A new type, GInitiallyUnowned, has been introduced, which is
|
|
Packit |
db3073 |
intended to serve as a common implementation of the 'floating reference'
|
|
Packit |
db3073 |
concept that is e.g. used by GtkObject. Note that changing the
|
|
Packit |
db3073 |
inheritance hierarchy of a type can cause problems for language
|
|
Packit |
db3073 |
bindings and other code which needs to work closely with the type
|
|
Packit |
db3073 |
system. Therefore, switching to GInitiallyUnowned should be done
|
|
Packit |
db3073 |
carefully. g_object_compat_control() has been added to GLib 2.8.5
|
|
Packit |
db3073 |
to help with the transition.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
Notes about GLib 2.6.0
|
|
Packit |
db3073 |
======================
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* GLib 2.6 introduces the concept of 'GLib filename encoding', which is the
|
|
Packit |
db3073 |
on-disk encoding on Unix, but UTF-8 on Windows. All GLib functions
|
|
Packit |
db3073 |
returning or accepting pathnames have been changed to expect
|
|
Packit |
db3073 |
filenames in this encoding, and the common POSIX functions dealing
|
|
Packit |
db3073 |
with pathnames have been wrapped. These wrappers are declared in the
|
|
Packit |
db3073 |
header <glib/gstdio.h> which must be included explicitly; it is not
|
|
Packit |
db3073 |
included through <glib.h>.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
On current (NT-based) Windows versions, where the on-disk file names
|
|
Packit |
db3073 |
are Unicode, these wrappers use the wide-character API in the C
|
|
Packit |
db3073 |
library. Thus applications can handle file names containing any
|
|
Packit |
db3073 |
Unicode characters through GLib's own API and its POSIX wrappers,
|
|
Packit |
db3073 |
not just file names restricted to characters in the system codepage.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
To keep binary compatibility with applications compiled against
|
|
Packit |
db3073 |
older versions of GLib, the Windows DLL still provides entry points
|
|
Packit |
db3073 |
with the old semantics using the old names, and applications
|
|
Packit |
db3073 |
compiled against GLib 2.6 will actually use new names for the
|
|
Packit |
db3073 |
functions. This is transparent to the programmer.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
When compiling against GLib 2.6, applications intended to be
|
|
Packit |
db3073 |
portable to Windows must take the UTF-8 file name encoding into
|
|
Packit |
db3073 |
consideration, and use the gstdio wrappers to access files whose
|
|
Packit |
db3073 |
names have been constructed from strings returned from GLib.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* Likewise, g_get_user_name() and g_get_real_name() have been changed
|
|
Packit |
db3073 |
to return UTF-8 on Windows, while keeping the old semantics for
|
|
Packit |
db3073 |
applications compiled against older versions of GLib.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* The GLib uses an '_' prefix to indicate private symbols that
|
|
Packit |
db3073 |
must not be used by applications. On some platforms, symbols beginning
|
|
Packit |
db3073 |
with prefixes such as _g will be exported from the library, on others not.
|
|
Packit |
db3073 |
In no case can applications use these private symbols. In addition to that,
|
|
Packit |
db3073 |
GLib+ 2.6 makes several symbols private which were not in any installed
|
|
Packit |
db3073 |
header files and were never intended to be exported.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* To reduce code size and improve efficiency, GLib, when compiled
|
|
Packit |
db3073 |
with the GNU toolchain, has separate internal and external entry
|
|
Packit |
db3073 |
points for exported functions. The internal names, which begin with
|
|
Packit |
db3073 |
IA__, may be seen when debugging a GLib program.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* On Windows, GLib no longer opens a console window when printing
|
|
Packit |
db3073 |
warning messages if stdout or stderr are invalid, as they are in
|
|
Packit |
db3073 |
"Windows subsystem" (GUI) applications. Simply redirect stdout or
|
|
Packit |
db3073 |
stderr if you need to see them.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* The child watch functionality tends to reveal a bug in many
|
|
Packit |
db3073 |
thread implementations (in particular the older LinuxThreads
|
|
Packit |
db3073 |
implementation on Linux) where it's not possible to call waitpid()
|
|
Packit |
db3073 |
for a child created in a different thread. For this reason, for
|
|
Packit |
db3073 |
maximum portability, you should structure your code to fork all
|
|
Packit |
db3073 |
child processes that you want to wait for from the main thread.
|
|
Packit |
db3073 |
|
|
Packit |
db3073 |
* A problem was recently discovered with g_signal_connect_object();
|
|
Packit |
db3073 |
it doesn't actually disconnect the signal handler once the object being
|
|
Packit |
db3073 |
connected to dies, just disables it. See the API docs for the function
|
|
Packit |
db3073 |
for further details and the correct workaround that will continue to
|
|
Packit |
db3073 |
work with future versions of GLib.
|