mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2026-05-15 11:08:10 +02:00
glib: Update snapshot to 2.32.2
A libelf pkg-config check creeped in, but it's only used in gio so we can remove the libelf check completely.
This commit is contained in:
parent
bde0ffb444
commit
b32156ab2b
42 changed files with 370 additions and 234 deletions
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/glib/configure.ac b/glib/configure.ac
|
||||
index 41780cd..4cfd8fa 100644
|
||||
index 3bba0fd..d551832 100644
|
||||
--- a/glib/configure.ac
|
||||
+++ b/glib/configure.ac
|
||||
@@ -277,8 +277,6 @@ AC_PROG_INSTALL
|
||||
@@ -294,8 +294,6 @@ AC_PROG_INSTALL
|
||||
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
|
|
@ -11,7 +11,7 @@ index 41780cd..4cfd8fa 100644
|
|||
if test "x$enable_debug" = "xyes"; then
|
||||
if test x$cflags_set != xset ; then
|
||||
case " $CFLAGS " in
|
||||
@@ -437,23 +435,6 @@ AC_MSG_RESULT($enable_iconv_cache)
|
||||
@@ -454,23 +452,6 @@ AC_MSG_RESULT($enable_iconv_cache)
|
||||
|
||||
|
||||
dnl
|
||||
|
|
@ -35,7 +35,36 @@ index 41780cd..4cfd8fa 100644
|
|||
dnl gettext support
|
||||
dnl
|
||||
|
||||
@@ -3312,12 +3293,7 @@ AC_CHECK_ALIGNOF([unsigned long])
|
||||
@@ -1799,28 +1780,6 @@ dnl failure. try libattr
|
||||
fi
|
||||
AC_SUBST(XATTR_LIBS)
|
||||
|
||||
-dnl ************************
|
||||
-dnl *** check for libelf ***
|
||||
-dnl ************************
|
||||
-
|
||||
-PKG_CHECK_MODULES([LIBELF], [libelf], [have_libelf=yes], [have_libelf=maybe])
|
||||
-
|
||||
-if test $have_libelf = maybe; then
|
||||
- AC_CHECK_LIB([elf], [elf_begin], , [have_libelf=no])
|
||||
- AC_CHECK_LIB([elf], [elf_getshdrstrndx], , [have_libelf=no])
|
||||
- AC_CHECK_LIB([elf], [elf_getshdrnum], , [have_libelf=no])
|
||||
- AC_CHECK_HEADER([libelf.h], , [have_libelf=no])
|
||||
-
|
||||
- if test $have_libelf != no; then
|
||||
- LIBELF_LIBS=-lelf
|
||||
- have_libelf = yes
|
||||
- fi
|
||||
-fi
|
||||
-
|
||||
-if test $have_libelf = yes; then
|
||||
- AC_DEFINE(HAVE_LIBELF, 1, [Define if libelf is available])
|
||||
-fi
|
||||
-
|
||||
dnl ****************************************
|
||||
dnl *** platform dependent source checks ***
|
||||
dnl ****************************************
|
||||
@@ -3355,12 +3314,7 @@ AC_CHECK_ALIGNOF([unsigned long])
|
||||
# Check for libdbus1 - Optional - is only used in the GDBus test cases
|
||||
#
|
||||
# 1.2.14 required for dbus_message_set_serial
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ GIT=${GIT-git}
|
|||
PATCH=${PATCH-patch}
|
||||
SED=${SED-sed}
|
||||
repo=
|
||||
tag=2.32.0
|
||||
tag=2.32.2
|
||||
commit=n
|
||||
|
||||
usage()
|
||||
|
|
|
|||
99
glib/NEWS
99
glib/NEWS
|
|
@ -1,3 +1,102 @@
|
|||
Overview of changes from GLib 2.32.2 to 2.32.2
|
||||
==============================================
|
||||
|
||||
* GApplication: can now have a NULL application ID
|
||||
|
||||
* g_clear_object: fix warnings when using it on C++ (due to lack of
|
||||
ability to implicitly cast void*)
|
||||
|
||||
* GDBus:
|
||||
- add our own implementation of the message bus for use on Windows only
|
||||
- fix up a few bugs that use of this bus uncovered in GDBus
|
||||
- escape nonce files in dbus addressess (think 'c:\')
|
||||
- support initial underscores in dbus codegen namespace (for private)
|
||||
|
||||
* Fix misdetection of GNUstep as Cocoa (for the MacOS GSettings backend)
|
||||
|
||||
* make sure configure fails if AC_CHECK_ALIGNOF cannot detect the alignment
|
||||
|
||||
* GAppInfo: overwrite the DISPLAY only if it is set in the launch context
|
||||
|
||||
* glib/tests/date: force US locale running the GDateTime tests
|
||||
|
||||
* GSocketControlMessage: Don't warn about unknown messages
|
||||
|
||||
* Resources:
|
||||
- fix broken use of GVDB on big endian machines
|
||||
- set a 'display name' so that pretty file names appear in Gtk CSS
|
||||
warning messages
|
||||
|
||||
* GMainContext:
|
||||
- block child sources when blocking the parent
|
||||
- introduce more testcases for child sources
|
||||
|
||||
* Translations updates:
|
||||
Brazilian Portuguese
|
||||
French
|
||||
Galician
|
||||
Italian
|
||||
Lithuanian
|
||||
Polish
|
||||
Polish
|
||||
Serbian
|
||||
Simplified Chinese
|
||||
Spanish
|
||||
|
||||
* Bug fixed:
|
||||
619026 avoid warning in gutils.h when using gcc with -Wconversion
|
||||
669260 Open/Save dialog hangs waiting for data with libsoup
|
||||
671249 GApplication: Allow a null application_id?
|
||||
672786 goa-daemon: action in notification doesn't work
|
||||
673409 g_resource_lookup_data may return stale data pointer
|
||||
674172 glib-2.32.1 misdetects GNUstep as Cocoa
|
||||
674345 cssprovider: Make sure to print out file name in css warnings
|
||||
674483 broken configure results when cross-compiling with gcc >= 4.5
|
||||
|
||||
Overview of changes from GLib 2.32.0 to 2.32.1
|
||||
==============================================
|
||||
|
||||
* Bugs fixed:
|
||||
670254 glib-2.30.2: Fails /GDateTime/new_from_unix test
|
||||
672541 glib-compile-resources prepends --sourcedir to absolute paths
|
||||
673139 URL to mailing lists in README incorrect
|
||||
673174 g_input_stream_read[_finish]: document returning 0 on EOF
|
||||
673191 glib/gchecksum.c warning: dereferencing type-punned pointer...
|
||||
673216 [W32] gtestutils does not use path separators consistently
|
||||
673439 Properly deprecate g_value_{set,get}_char
|
||||
673612 Fails to decode dictionaries wrapped in two layers of array
|
||||
673803 gclosure: Support return values of GVariants
|
||||
669285 glib/tests/markup-parse fails under non-english locale
|
||||
673911 gio-2.0.pc lists full path to executables, breaking cross com..
|
||||
673762 gnextstepsettingsbackend.c:343: error: parse error before 'in'
|
||||
|
||||
* Updated translations:
|
||||
Belarusian
|
||||
British English
|
||||
Bulgarian
|
||||
Catalan
|
||||
Czech
|
||||
French
|
||||
German
|
||||
Hebrew
|
||||
Hindi
|
||||
Hungarian
|
||||
Italian
|
||||
Japanese
|
||||
Kannada
|
||||
Latvian
|
||||
Lithuanian
|
||||
Marathi
|
||||
Norwegian bokmål
|
||||
Odia
|
||||
Polish
|
||||
Serbian
|
||||
Slovenian
|
||||
Spanish
|
||||
Swedish
|
||||
Telugu
|
||||
|
||||
|
||||
Overview of changes from GLib 2.31.22 to 2.32.0
|
||||
===============================================
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ The official web site is:
|
|||
http://www.gtk.org/
|
||||
|
||||
Information about mailing lists can be found at
|
||||
http://www.gtk.org/mailing-lists.html
|
||||
http://www.gtk.org/mailing-lists.php
|
||||
|
||||
To subscribe, send mail to gtk-list-request@gnome.org
|
||||
with the subject "subscribe".
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ m4_define(glib_configure_ac)
|
|||
|
||||
m4_define([glib_major_version], [2])
|
||||
m4_define([glib_minor_version], [32])
|
||||
m4_define([glib_micro_version], [0])
|
||||
m4_define([glib_interface_age], [0])
|
||||
m4_define([glib_micro_version], [2])
|
||||
m4_define([glib_interface_age], [2])
|
||||
m4_define([glib_binary_age],
|
||||
[m4_eval(100 * glib_minor_version + glib_micro_version)])
|
||||
m4_define([glib_version],
|
||||
|
|
@ -175,11 +175,23 @@ AC_TRY_CPP([
|
|||
|
||||
AC_MSG_RESULT([$glib_have_carbon])
|
||||
|
||||
glib_have_cocoa=no
|
||||
AC_MSG_CHECKING([for Mac OS X Cocoa support])
|
||||
AC_TRY_CPP([
|
||||
#include <Cocoa/Cocoa.h>
|
||||
#ifdef GNUSTEP_BASE_VERSION
|
||||
#error "Detected GNUstep, not Cocoa"
|
||||
#endif
|
||||
], glib_have_cocoa=yes)
|
||||
|
||||
AC_MSG_RESULT([$glib_have_cocoa])
|
||||
|
||||
AM_CONDITIONAL(OS_WIN32, [test "$glib_native_win32" = "yes"])
|
||||
AM_CONDITIONAL(OS_WIN32_X64, [test "$LIB_EXE_MACHINE_FLAG" = "X64"])
|
||||
AM_CONDITIONAL(OS_UNIX, [test "$glib_native_win32" != "yes"])
|
||||
AM_CONDITIONAL(OS_LINUX, [test "$glib_os_linux" = "yes"])
|
||||
AM_CONDITIONAL(OS_CARBON, [test "$glib_have_carbon" = "yes"])
|
||||
AM_CONDITIONAL(OS_COCOA, [test "$glib_have_cocoa" = "yes"])
|
||||
|
||||
if test "$glib_native_win32" = "yes"; then
|
||||
AC_CHECK_TOOL(WINDRES, windres, no)
|
||||
|
|
@ -210,6 +222,11 @@ if test "x$glib_have_carbon" = "xyes"; then
|
|||
LDFLAGS="$LDFLAGS -framework Carbon"
|
||||
fi
|
||||
|
||||
if test "x$glib_have_cocoa" = "xyes"; then
|
||||
AC_DEFINE(HAVE_COCOA, 1, [define to 1 if Cocoa is available])
|
||||
LDFLAGS="$LDFLAGS -framework Foundation"
|
||||
fi
|
||||
|
||||
gl_GLIBC21
|
||||
if test "x$GLIBC21" = "xyes"; then
|
||||
AC_DEFINE([_GNU_SOURCE], 1, [Make all glibc extensions visible])
|
||||
|
|
@ -1763,17 +1780,6 @@ dnl failure. try libattr
|
|||
fi
|
||||
AC_SUBST(XATTR_LIBS)
|
||||
|
||||
dnl ************************
|
||||
dnl *** check for libelf ***
|
||||
dnl ************************
|
||||
|
||||
AC_CHECK_LIB([elf], [elf_begin], have_libelf=yes, have_libelf=no)
|
||||
if test $have_libelf = yes; then
|
||||
AC_DEFINE(HAVE_LIBELF, 1, [Define if libelf is available])
|
||||
ELF_LIBS=-lelf
|
||||
fi
|
||||
AC_SUBST(ELF_LIBS)
|
||||
|
||||
dnl ****************************************
|
||||
dnl *** platform dependent source checks ***
|
||||
dnl ****************************************
|
||||
|
|
@ -3214,7 +3220,17 @@ g_pollhup=$glib_cv_value_POLLHUP
|
|||
g_pollerr=$glib_cv_value_POLLERR
|
||||
g_pollnval=$glib_cv_value_POLLNVAL
|
||||
|
||||
g_af_unix=$glib_cv_value_AF_UNIX
|
||||
# If a family is not found on the system, define that family to
|
||||
# a negative value, picking a different one for each undefined
|
||||
# family (-1 for AF_UNIX, -2 for the next one, -3 ...)
|
||||
# This is needed because glib-mkenums doesn't handle optional
|
||||
# values in enums, and thus we have to have all existing values
|
||||
# defined in the enum.
|
||||
if test "x$glib_cv_value_AF_UNIX" != "x"; then
|
||||
g_af_unix=$glib_cv_value_AF_UNIX
|
||||
else
|
||||
g_af_unix=-1
|
||||
fi
|
||||
g_af_inet=$glib_cv_value_AF_INET
|
||||
g_af_inet6=$glib_cv_value_AF_INET6
|
||||
|
||||
|
|
@ -3286,8 +3302,13 @@ $ac_cv_sizeof___int64)
|
|||
;;
|
||||
esac
|
||||
|
||||
AC_CHECK_ALIGNOF([guint32], [typedef unsigned $gint32 guint32;])
|
||||
AC_CHECK_ALIGNOF([guint64], typedef unsigned $gint64 guint64;)
|
||||
AC_CHECK_TYPE([guint32],,,[typedef unsigned $gint32 guint32;])
|
||||
AC_CHECK_ALIGNOF([guint32], [AC_INCLUDES_DEFAULT
|
||||
typedef unsigned $gint32 guint32;])
|
||||
AC_CHECK_TYPE([guint64],,,[typedef unsigned $gint64 guint64;])
|
||||
AC_CHECK_ALIGNOF([guint64], [AC_INCLUDES_DEFAULT
|
||||
typedef unsigned $gint64 guint64;])
|
||||
AC_CHECK_TYPE([unsigned long])
|
||||
AC_CHECK_ALIGNOF([unsigned long])
|
||||
|
||||
# Check for libdbus1 - Optional - is only used in the GDBus test cases
|
||||
|
|
|
|||
|
|
@ -897,7 +897,7 @@ g_ptr_array_sized_new (guint reserved_size)
|
|||
|
||||
/**
|
||||
* g_ptr_array_new_with_free_func:
|
||||
* @element_free_func: A function to free elements with destroy @array or %NULL.
|
||||
* @element_free_func: (allow-none): A function to free elements with destroy @array or %NULL.
|
||||
*
|
||||
* Creates a new #GPtrArray with a reference count of 1 and use @element_free_func
|
||||
* for freeing each element when the array is destroyed either via
|
||||
|
|
@ -921,7 +921,7 @@ g_ptr_array_new_with_free_func (GDestroyNotify element_free_func)
|
|||
/**
|
||||
* g_ptr_array_new_full:
|
||||
* @reserved_size: number of pointers preallocated.
|
||||
* @element_free_func: A function to free elements with destroy @array or %NULL.
|
||||
* @element_free_func: (allow-none): A function to free elements with destroy @array or %NULL.
|
||||
*
|
||||
* Creates a new #GPtrArray with @reserved_size pointers preallocated
|
||||
* and a reference count of 1. This avoids frequent reallocation, if
|
||||
|
|
@ -949,7 +949,7 @@ g_ptr_array_new_full (guint reserved_size,
|
|||
/**
|
||||
* g_ptr_array_set_free_func:
|
||||
* @array: A #GPtrArray.
|
||||
* @element_free_func: A function to free elements with destroy @array or %NULL.
|
||||
* @element_free_func: (allow-none): A function to free elements with destroy @array or %NULL.
|
||||
*
|
||||
* Sets a function for freeing each element when @array is destroyed
|
||||
* either via g_ptr_array_unref(), when g_ptr_array_free() is called
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ g_async_queue_ref (GAsyncQueue *queue)
|
|||
*
|
||||
* Increases the reference count of the asynchronous @queue by 1.
|
||||
*
|
||||
* @Deprecated: Since 2.8, reference counting is done atomically
|
||||
* Deprecated: 2.8: Reference counting is done atomically.
|
||||
* so g_async_queue_ref() can be used regardless of the @queue's
|
||||
* lock.
|
||||
*/
|
||||
|
|
@ -197,7 +197,7 @@ g_async_queue_ref_unlocked (GAsyncQueue *queue)
|
|||
* the @queue's lock. If the reference count went to 0, the @queue
|
||||
* will be destroyed and the memory allocated will be freed.
|
||||
*
|
||||
* @Deprecated: Since 2.8, reference counting is done atomically
|
||||
* Deprecated: 2.8: Reference counting is done atomically.
|
||||
* so g_async_queue_unref() can be used regardless of the @queue's
|
||||
* lock.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1816,7 +1816,7 @@ find_file_in_data_dirs (const gchar *file,
|
|||
* g_bookmark_file_load_from_data_dirs:
|
||||
* @bookmark: a #GBookmarkFile
|
||||
* @file: a relative path to a filename to open and parse
|
||||
* @full_path: return location for a string containing the full path
|
||||
* @full_path: (allow-none): return location for a string containing the full path
|
||||
* of the file, or %NULL
|
||||
* @error: return location for a #GError, or %NULL
|
||||
*
|
||||
|
|
@ -1897,7 +1897,7 @@ g_bookmark_file_load_from_data_dirs (GBookmarkFile *bookmark,
|
|||
/**
|
||||
* g_bookmark_file_to_data:
|
||||
* @bookmark: a #GBookmarkFile
|
||||
* @length: return location for the length of the returned string, or %NULL
|
||||
* @length: (allow-none): return location for the length of the returned string, or %NULL
|
||||
* @error: return location for a #GError, or %NULL
|
||||
*
|
||||
* This function outputs @bookmark as a string.
|
||||
|
|
@ -2087,7 +2087,7 @@ g_bookmark_file_has_item (GBookmarkFile *bookmark,
|
|||
/**
|
||||
* g_bookmark_file_get_uris:
|
||||
* @bookmark: a #GBookmarkFile
|
||||
* @length: return location for the number of returned URIs, or %NULL
|
||||
* @length: (allow-none): return location for the number of returned URIs, or %NULL
|
||||
*
|
||||
* Returns all URIs of the bookmarks in the bookmark file @bookmark.
|
||||
* The array of returned URIs will be %NULL-terminated, so @length may
|
||||
|
|
@ -2131,7 +2131,7 @@ g_bookmark_file_get_uris (GBookmarkFile *bookmark,
|
|||
/**
|
||||
* g_bookmark_file_set_title:
|
||||
* @bookmark: a #GBookmarkFile
|
||||
* @uri: a valid URI or %NULL
|
||||
* @uri: (allow-none): a valid URI or %NULL
|
||||
* @title: a UTF-8 encoded string
|
||||
*
|
||||
* Sets @title as the title of the bookmark for @uri inside the
|
||||
|
|
@ -2176,7 +2176,7 @@ g_bookmark_file_set_title (GBookmarkFile *bookmark,
|
|||
/**
|
||||
* g_bookmark_file_get_title:
|
||||
* @bookmark: a #GBookmarkFile
|
||||
* @uri: a valid URI or %NULL
|
||||
* @uri: (allow-none): a valid URI or %NULL
|
||||
* @error: return location for a #GError, or %NULL
|
||||
*
|
||||
* Returns the title of the bookmark for @uri.
|
||||
|
|
@ -2219,7 +2219,7 @@ g_bookmark_file_get_title (GBookmarkFile *bookmark,
|
|||
/**
|
||||
* g_bookmark_file_set_description:
|
||||
* @bookmark: a #GBookmarkFile
|
||||
* @uri: a valid URI or %NULL
|
||||
* @uri: (allow-none): a valid URI or %NULL
|
||||
* @description: a string
|
||||
*
|
||||
* Sets @description as the description of the bookmark for @uri.
|
||||
|
|
@ -2872,7 +2872,7 @@ g_bookmark_file_remove_group (GBookmarkFile *bookmark,
|
|||
* g_bookmark_file_set_groups:
|
||||
* @bookmark: a #GBookmarkFile
|
||||
* @uri: an item's URI
|
||||
* @groups: an array of group names, or %NULL to remove all groups
|
||||
* @groups: (allow-none): an array of group names, or %NULL to remove all groups
|
||||
* @length: number of group name values in @groups
|
||||
*
|
||||
* Sets a list of group names for the item with URI @uri. Each previously
|
||||
|
|
@ -2922,7 +2922,7 @@ g_bookmark_file_set_groups (GBookmarkFile *bookmark,
|
|||
* g_bookmark_file_get_groups:
|
||||
* @bookmark: a #GBookmarkFile
|
||||
* @uri: a valid URI
|
||||
* @length: return location for the length of the returned string, or %NULL
|
||||
* @length: (allow-none): return location for the length of the returned string, or %NULL
|
||||
* @error: return location for a #GError, or %NULL
|
||||
*
|
||||
* Retrieves the list of group names of the bookmark for @uri.
|
||||
|
|
@ -2994,9 +2994,9 @@ g_bookmark_file_get_groups (GBookmarkFile *bookmark,
|
|||
* g_bookmark_file_add_application:
|
||||
* @bookmark: a #GBookmarkFile
|
||||
* @uri: a valid URI
|
||||
* @name: the name of the application registering the bookmark
|
||||
* @name: (allow-none): the name of the application registering the bookmark
|
||||
* or %NULL
|
||||
* @exec: command line to be used to launch the bookmark or %NULL
|
||||
* @exec: (allow-none): command line to be used to launch the bookmark or %NULL
|
||||
*
|
||||
* Adds the application with @name and @exec to the list of
|
||||
* applications that have registered a bookmark for @uri into
|
||||
|
|
@ -3344,9 +3344,9 @@ expand_exec_line (const gchar *exec_fmt,
|
|||
* @bookmark: a #GBookmarkFile
|
||||
* @uri: a valid URI
|
||||
* @name: an application's name
|
||||
* @exec: location for the command line of the application, or %NULL
|
||||
* @count: return location for the registration count, or %NULL
|
||||
* @stamp: return location for the last registration time, or %NULL
|
||||
* @exec: (allow-none): location for the command line of the application, or %NULL
|
||||
* @count: (allow-none): return location for the registration count, or %NULL
|
||||
* @stamp: (allow-none): return location for the last registration time, or %NULL
|
||||
* @error: return location for a #GError, or %NULL
|
||||
*
|
||||
* Gets the registration informations of @app_name for the bookmark for
|
||||
|
|
@ -3444,7 +3444,7 @@ g_bookmark_file_get_app_info (GBookmarkFile *bookmark,
|
|||
* g_bookmark_file_get_applications:
|
||||
* @bookmark: a #GBookmarkFile
|
||||
* @uri: a valid URI
|
||||
* @length: return location of the length of the returned list, or %NULL
|
||||
* @length: (allow-none): return location of the length of the returned list, or %NULL
|
||||
* @error: return location for a #GError, or %NULL
|
||||
*
|
||||
* Retrieves the names of the applications that have registered the
|
||||
|
|
@ -3536,7 +3536,7 @@ g_bookmark_file_get_size (GBookmarkFile *bookmark)
|
|||
* g_bookmark_file_move_item:
|
||||
* @bookmark: a #GBookmarkFile
|
||||
* @old_uri: a valid URI
|
||||
* @new_uri: a valid URI, or %NULL
|
||||
* @new_uri: (allow-none): a valid URI, or %NULL
|
||||
* @error: return location for a #GError or %NULL
|
||||
*
|
||||
* Changes the URI of a bookmark item from @old_uri to @new_uri. Any
|
||||
|
|
@ -3615,7 +3615,7 @@ g_bookmark_file_move_item (GBookmarkFile *bookmark,
|
|||
* g_bookmark_file_set_icon:
|
||||
* @bookmark: a #GBookmarkFile
|
||||
* @uri: a valid URI
|
||||
* @href: the URI of the icon for the bookmark, or %NULL
|
||||
* @href: (allow-none): the URI of the icon for the bookmark, or %NULL
|
||||
* @mime_type: the MIME type of the icon for the bookmark
|
||||
*
|
||||
* Sets the icon for the bookmark for @uri. If @href is %NULL, unsets
|
||||
|
|
@ -3664,8 +3664,8 @@ g_bookmark_file_set_icon (GBookmarkFile *bookmark,
|
|||
* g_bookmark_file_get_icon:
|
||||
* @bookmark: a #GBookmarkFile
|
||||
* @uri: a valid URI
|
||||
* @href: return location for the icon's location or %NULL
|
||||
* @mime_type: return location for the icon's MIME type or %NULL
|
||||
* @href: (allow-none): return location for the icon's location or %NULL
|
||||
* @mime_type: (allow-none): return location for the icon's MIME type or %NULL
|
||||
* @error: return location for a #GError or %NULL
|
||||
*
|
||||
* Gets the icon of the bookmark for @uri.
|
||||
|
|
|
|||
|
|
@ -21,6 +21,10 @@
|
|||
* Stef Walter <stefw@collabora.co.uk>
|
||||
*/
|
||||
|
||||
#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __G_BYTES_H__
|
||||
#define __G_BYTES_H__
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,10 @@ typedef struct
|
|||
guint32 buf[4];
|
||||
guint32 bits[2];
|
||||
|
||||
guchar data[MD5_DATASIZE];
|
||||
union {
|
||||
guchar data[MD5_DATASIZE];
|
||||
guint32 data32[MD5_DATASIZE / 4];
|
||||
} u;
|
||||
|
||||
guchar digest[MD5_DIGEST_LEN];
|
||||
} Md5sum;
|
||||
|
|
@ -329,13 +332,13 @@ md5_sum_update (Md5sum *md5,
|
|||
|
||||
md5->bits[1] += length >> 29;
|
||||
|
||||
/* bytes already in Md5sum->data */
|
||||
/* bytes already in Md5sum->u.data */
|
||||
bit = (bit >> 3) & 0x3f;
|
||||
|
||||
/* handle any leading odd-sized chunks */
|
||||
if (bit)
|
||||
{
|
||||
guchar *p = (guchar *) md5->data + bit;
|
||||
guchar *p = md5->u.data + bit;
|
||||
|
||||
bit = MD5_DATASIZE - bit;
|
||||
if (length < bit)
|
||||
|
|
@ -346,8 +349,8 @@ md5_sum_update (Md5sum *md5,
|
|||
|
||||
memcpy (p, data, bit);
|
||||
|
||||
md5_byte_reverse (md5->data, 16);
|
||||
md5_transform (md5->buf, (guint32 *) md5->data);
|
||||
md5_byte_reverse (md5->u.data, 16);
|
||||
md5_transform (md5->buf, md5->u.data32);
|
||||
|
||||
data += bit;
|
||||
length -= bit;
|
||||
|
|
@ -356,17 +359,17 @@ md5_sum_update (Md5sum *md5,
|
|||
/* process data in 64-byte chunks */
|
||||
while (length >= MD5_DATASIZE)
|
||||
{
|
||||
memcpy (md5->data, data, MD5_DATASIZE);
|
||||
memcpy (md5->u.data, data, MD5_DATASIZE);
|
||||
|
||||
md5_byte_reverse (md5->data, 16);
|
||||
md5_transform (md5->buf, (guint32 *) md5->data);
|
||||
md5_byte_reverse (md5->u.data, 16);
|
||||
md5_transform (md5->buf, md5->u.data32);
|
||||
|
||||
data += MD5_DATASIZE;
|
||||
length -= MD5_DATASIZE;
|
||||
}
|
||||
|
||||
/* handle any remaining bytes of data */
|
||||
memcpy (md5->data, data, length);
|
||||
memcpy (md5->u.data, data, length);
|
||||
}
|
||||
|
||||
/* closes a checksum */
|
||||
|
|
@ -382,7 +385,7 @@ md5_sum_close (Md5sum *md5)
|
|||
/* Set the first char of padding to 0x80.
|
||||
* This is safe since there is always at least one byte free
|
||||
*/
|
||||
p = md5->data + count;
|
||||
p = md5->u.data + count;
|
||||
*p++ = 0x80;
|
||||
|
||||
/* Bytes of padding needed to make 64 bytes */
|
||||
|
|
@ -394,11 +397,11 @@ md5_sum_close (Md5sum *md5)
|
|||
/* Two lots of padding: Pad the first block to 64 bytes */
|
||||
memset (p, 0, count);
|
||||
|
||||
md5_byte_reverse (md5->data, 16);
|
||||
md5_transform (md5->buf, (guint32 *) md5->data);
|
||||
md5_byte_reverse (md5->u.data, 16);
|
||||
md5_transform (md5->buf, md5->u.data32);
|
||||
|
||||
/* Now fill the next block with 56 bytes */
|
||||
memset (md5->data, 0, MD5_DATASIZE - 8);
|
||||
memset (md5->u.data, 0, MD5_DATASIZE - 8);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -406,20 +409,20 @@ md5_sum_close (Md5sum *md5)
|
|||
memset (p, 0, count - 8);
|
||||
}
|
||||
|
||||
md5_byte_reverse (md5->data, 14);
|
||||
md5_byte_reverse (md5->u.data, 14);
|
||||
|
||||
/* Append length in bits and transform */
|
||||
((guint32 *) md5->data)[14] = md5->bits[0];
|
||||
((guint32 *) md5->data)[15] = md5->bits[1];
|
||||
md5->u.data32[14] = md5->bits[0];
|
||||
md5->u.data32[15] = md5->bits[1];
|
||||
|
||||
md5_transform (md5->buf, (guint32 *) md5->data);
|
||||
md5_transform (md5->buf, md5->u.data32);
|
||||
md5_byte_reverse ((guchar *) md5->buf, 4);
|
||||
|
||||
memcpy (md5->digest, md5->buf, 16);
|
||||
|
||||
/* Reset buffers in case they contain sensitive data */
|
||||
memset (md5->buf, 0, sizeof (md5->buf));
|
||||
memset (md5->data, 0, sizeof (md5->data));
|
||||
memset (md5->u.data, 0, sizeof (md5->u.data));
|
||||
}
|
||||
|
||||
static gchar *
|
||||
|
|
|
|||
|
|
@ -1838,7 +1838,7 @@ hostname_validate (const char *hostname)
|
|||
/**
|
||||
* g_filename_from_uri:
|
||||
* @uri: a uri describing a filename (escaped, encoded in ASCII).
|
||||
* @hostname: Location to store hostname for the URI, or %NULL.
|
||||
* @hostname: (allow-none): Location to store hostname for the URI, or %NULL.
|
||||
* If there is no hostname in the URI, %NULL will be
|
||||
* stored in this location.
|
||||
* @error: location to store the error occurring, or %NULL to ignore
|
||||
|
|
|
|||
|
|
@ -598,7 +598,7 @@ g_dataset_id_set_data_full (gconstpointer dataset_location,
|
|||
* g_datalist_id_set_data_full:
|
||||
* @datalist: a datalist.
|
||||
* @key_id: the #GQuark to identify the data element.
|
||||
* @data: the data element or %NULL to remove any previous element
|
||||
* @data: (allow-none): the data element or %NULL to remove any previous element
|
||||
* corresponding to @key_id.
|
||||
* @destroy_func: the function to call when the data element is
|
||||
* removed. This function will be called with the data
|
||||
|
|
@ -615,7 +615,7 @@ g_dataset_id_set_data_full (gconstpointer dataset_location,
|
|||
* g_datalist_set_data_full:
|
||||
* @dl: a datalist.
|
||||
* @k: the string to identify the data element.
|
||||
* @d: the data element, or %NULL to remove any previous element
|
||||
* @d: (allow-none): the data element, or %NULL to remove any previous element
|
||||
* corresponding to @k.
|
||||
* @f: the function to call when the data element is removed. This
|
||||
* function will be called with the data element and can be used to
|
||||
|
|
@ -629,7 +629,7 @@ g_dataset_id_set_data_full (gconstpointer dataset_location,
|
|||
* g_datalist_id_set_data:
|
||||
* @dl: a datalist.
|
||||
* @q: the #GQuark to identify the data element.
|
||||
* @d: the data element, or %NULL to remove any previous element
|
||||
* @d: (allow-none): the data element, or %NULL to remove any previous element
|
||||
* corresponding to @q.
|
||||
*
|
||||
* Sets the data corresponding to the given #GQuark id. Any previous
|
||||
|
|
@ -640,7 +640,7 @@ g_dataset_id_set_data_full (gconstpointer dataset_location,
|
|||
* g_datalist_set_data:
|
||||
* @dl: a datalist.
|
||||
* @k: the string to identify the data element.
|
||||
* @d: the data element, or %NULL to remove any previous element
|
||||
* @d: (allow-none): the data element, or %NULL to remove any previous element
|
||||
* corresponding to @k.
|
||||
*
|
||||
* Sets the data element corresponding to the given string identifier.
|
||||
|
|
|
|||
|
|
@ -1449,9 +1449,9 @@ g_date_time_equal (gconstpointer dt1,
|
|||
/**
|
||||
* g_date_time_get_ymd:
|
||||
* @datetime: a #GDateTime.
|
||||
* @year: (out): the return location for the gregorian year, or %NULL.
|
||||
* @month: (out): the return location for the month of the year, or %NULL.
|
||||
* @day: (out): the return location for the day of the month, or %NULL.
|
||||
* @year: (out) (allow-none): the return location for the gregorian year, or %NULL.
|
||||
* @month: (out) (allow-none): the return location for the month of the year, or %NULL.
|
||||
* @day: (out) (allow-none): the return location for the day of the month, or %NULL.
|
||||
*
|
||||
* Retrieves the Gregorian day, month, and year of a given #GDateTime.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -507,7 +507,7 @@ g_error_copy (const GError *error)
|
|||
|
||||
/**
|
||||
* g_error_matches:
|
||||
* @error: a #GError or %NULL
|
||||
* @error: (allow-none): a #GError or %NULL
|
||||
* @domain: an error domain
|
||||
* @code: an error code
|
||||
*
|
||||
|
|
@ -533,7 +533,7 @@ g_error_matches (const GError *error,
|
|||
|
||||
/**
|
||||
* g_set_error:
|
||||
* @err: a return location for a #GError, or %NULL
|
||||
* @err: (allow-none): a return location for a #GError, or %NULL
|
||||
* @domain: error domain
|
||||
* @code: error code
|
||||
* @format: printf()-style format
|
||||
|
|
@ -568,7 +568,7 @@ g_set_error (GError **err,
|
|||
|
||||
/**
|
||||
* g_set_error_literal:
|
||||
* @err: a return location for a #GError, or %NULL
|
||||
* @err: (allow-none): a return location for a #GError, or %NULL
|
||||
* @domain: error domain
|
||||
* @code: error code
|
||||
* @message: error message
|
||||
|
|
@ -662,7 +662,7 @@ g_error_add_prefix (gchar **string,
|
|||
|
||||
/**
|
||||
* g_prefix_error:
|
||||
* @err: a return location for a #GError, or %NULL
|
||||
* @err: (allow-none): a return location for a #GError, or %NULL
|
||||
* @format: printf()-style format string
|
||||
* @...: arguments to @format
|
||||
*
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ g_strip_context (const gchar *msgid,
|
|||
|
||||
/**
|
||||
* g_dpgettext:
|
||||
* @domain: the translation domain to use, or %NULL to use
|
||||
* @domain: (allow-none): the translation domain to use, or %NULL to use
|
||||
* the domain set with textdomain()
|
||||
* @msgctxtid: a combined message context and message id, separated
|
||||
* by a \004 character
|
||||
|
|
@ -248,7 +248,7 @@ g_dpgettext (const gchar *domain,
|
|||
*/
|
||||
/**
|
||||
* g_dpgettext2:
|
||||
* @domain: the translation domain to use, or %NULL to use
|
||||
* @domain: (allow-none): the translation domain to use, or %NULL to use
|
||||
* the domain set with textdomain()
|
||||
* @context: the message context
|
||||
* @msgid: the message
|
||||
|
|
@ -350,7 +350,7 @@ _g_dgettext_should_translate (void)
|
|||
|
||||
/**
|
||||
* g_dgettext:
|
||||
* @domain: the translation domain to use, or %NULL to use
|
||||
* @domain: (allow-none): the translation domain to use, or %NULL to use
|
||||
* the domain set with textdomain()
|
||||
* @msgid: message to translate
|
||||
*
|
||||
|
|
@ -428,7 +428,7 @@ g_dcgettext (const gchar *domain,
|
|||
|
||||
/**
|
||||
* g_dngettext:
|
||||
* @domain: the translation domain to use, or %NULL to use
|
||||
* @domain: (allow-none): the translation domain to use, or %NULL to use
|
||||
* the domain set with textdomain()
|
||||
* @msgid: message to translate
|
||||
* @msgid_plural: plural form of the message
|
||||
|
|
|
|||
|
|
@ -664,10 +664,10 @@ g_hash_table_new (GHashFunc hash_func,
|
|||
* g_hash_table_new_full:
|
||||
* @hash_func: a function to create a hash value from a key
|
||||
* @key_equal_func: a function to check two keys for equality
|
||||
* @key_destroy_func: a function to free the memory allocated for the key
|
||||
* @key_destroy_func: (allow-none): a function to free the memory allocated for the key
|
||||
* used when removing the entry from the #GHashTable, or %NULL
|
||||
* if you don't want to supply such a function.
|
||||
* @value_destroy_func: a function to free the memory allocated for the
|
||||
* @value_destroy_func: (allow-none): a function to free the memory allocated for the
|
||||
* value used when removing the entry from the #GHashTable, or %NULL
|
||||
* if you don't want to supply such a function.
|
||||
*
|
||||
|
|
@ -745,8 +745,8 @@ g_hash_table_iter_init (GHashTableIter *iter,
|
|||
/**
|
||||
* g_hash_table_iter_next:
|
||||
* @iter: an initialized #GHashTableIter
|
||||
* @key: a location to store the key, or %NULL
|
||||
* @value: a location to store the value, or %NULL
|
||||
* @key: (allow-none): a location to store the key, or %NULL
|
||||
* @value: (allow-none): a location to store the value, or %NULL
|
||||
*
|
||||
* Advances @iter and retrieves the key and/or value that are now
|
||||
* pointed to as a result of this advancement. If %FALSE is returned,
|
||||
|
|
@ -855,7 +855,7 @@ g_hash_table_iter_remove (GHashTableIter *iter)
|
|||
* @hash_table: our #GHashTable
|
||||
* @node_index: pointer to node to insert/replace
|
||||
* @key_hash: key hash
|
||||
* @key: key to replace with, or %NULL
|
||||
* @key: (allow-none): key to replace with, or %NULL
|
||||
* @value: value to replace with
|
||||
* @keep_new_key: whether to replace the key in the node with @key
|
||||
* @reusing_key: whether @key was taken out of the existing node
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@
|
|||
* various functions such as g_io_channel_write_chars() to
|
||||
* write raw bytes to the channel. Encoding and buffering
|
||||
* issues are dealt with at a higher level.
|
||||
* @io_seek: (optional) seeks the channel. This is called from
|
||||
* @io_seek: (optional) seeks the channel. This is called from
|
||||
* g_io_channel_seek() on channels that support it.
|
||||
* @io_close: closes the channel. This is called from
|
||||
* g_io_channel_close() after flushing the buffers.
|
||||
|
|
@ -1653,8 +1653,8 @@ reencode:
|
|||
* line terminator. This data should be freed with g_free()
|
||||
* when no longer needed. This is a nul-terminated string.
|
||||
* If a @length of zero is returned, this will be %NULL instead.
|
||||
* @length: location to store length of the read data, or %NULL
|
||||
* @terminator_pos: location to store position of line terminator, or %NULL
|
||||
* @length: (allow-none): location to store length of the read data, or %NULL
|
||||
* @terminator_pos: (allow-none): location to store position of line terminator, or %NULL
|
||||
* @error: A location to return an error of type #GConvertError
|
||||
* or #GIOChannelError
|
||||
*
|
||||
|
|
@ -1704,7 +1704,7 @@ g_io_channel_read_line (GIOChannel *channel,
|
|||
* @buffer: a #GString into which the line will be written.
|
||||
* If @buffer already contains data, the old data will
|
||||
* be overwritten.
|
||||
* @terminator_pos: location to store position of line terminator, or %NULL
|
||||
* @terminator_pos: (allow-none): location to store position of line terminator, or %NULL
|
||||
* @error: a location to store an error of type #GConvertError
|
||||
* or #GIOChannelError
|
||||
*
|
||||
|
|
|
|||
|
|
@ -920,7 +920,7 @@ g_key_file_load_from_data (GKeyFile *key_file,
|
|||
* @key_file: an empty #GKeyFile struct
|
||||
* @file: (type filename): a relative path to a filename to open and parse
|
||||
* @search_dirs: (array zero-terminated=1) (element-type filename): %NULL-terminated array of directories to search
|
||||
* @full_path: (out) (type filename): return location for a string containing the full path
|
||||
* @full_path: (out) (type filename) (allow-none): return location for a string containing the full path
|
||||
* of the file, or %NULL
|
||||
* @flags: flags from #GKeyFileFlags
|
||||
* @error: return location for a #GError, or %NULL
|
||||
|
|
@ -993,7 +993,7 @@ g_key_file_load_from_dirs (GKeyFile *key_file,
|
|||
* g_key_file_load_from_data_dirs:
|
||||
* @key_file: an empty #GKeyFile struct
|
||||
* @file: (type filename): a relative path to a filename to open and parse
|
||||
* @full_path: (out) (type filename): return location for a string containing the full path
|
||||
* @full_path: (out) (type filename) (allow-none): return location for a string containing the full path
|
||||
* of the file, or %NULL
|
||||
* @flags: flags from #GKeyFileFlags
|
||||
* @error: return location for a #GError, or %NULL
|
||||
|
|
@ -1504,7 +1504,7 @@ g_key_file_to_data (GKeyFile *key_file,
|
|||
* g_key_file_get_keys:
|
||||
* @key_file: a #GKeyFile
|
||||
* @group_name: a group name
|
||||
* @length: (out): return location for the number of keys returned, or %NULL
|
||||
* @length: (out) (allow-none): return location for the number of keys returned, or %NULL
|
||||
* @error: return location for a #GError, or %NULL
|
||||
*
|
||||
* Returns all keys for the group name @group_name. The array of
|
||||
|
|
@ -3439,7 +3439,7 @@ g_key_file_get_top_comment (GKeyFile *key_file,
|
|||
/**
|
||||
* g_key_file_get_comment:
|
||||
* @key_file: a #GKeyFile
|
||||
* @group_name: a group name, or %NULL
|
||||
* @group_name: (allow-none): a group name, or %NULL
|
||||
* @key: a key
|
||||
* @error: return location for a #GError
|
||||
*
|
||||
|
|
|
|||
|
|
@ -191,7 +191,8 @@ typedef struct _GSourceCallback GSourceCallback;
|
|||
typedef enum
|
||||
{
|
||||
G_SOURCE_READY = 1 << G_HOOK_FLAG_USER_SHIFT,
|
||||
G_SOURCE_CAN_RECURSE = 1 << (G_HOOK_FLAG_USER_SHIFT + 1)
|
||||
G_SOURCE_CAN_RECURSE = 1 << (G_HOOK_FLAG_USER_SHIFT + 1),
|
||||
G_SOURCE_BLOCKED = 1 << (G_HOOK_FLAG_USER_SHIFT + 2)
|
||||
} GSourceFlags;
|
||||
|
||||
typedef struct _GMainWaiter GMainWaiter;
|
||||
|
|
@ -313,8 +314,7 @@ struct _GSourcePrivate
|
|||
#define G_THREAD_SELF g_thread_self ()
|
||||
|
||||
#define SOURCE_DESTROYED(source) (((source)->flags & G_HOOK_FLAG_ACTIVE) == 0)
|
||||
#define SOURCE_BLOCKED(source) (((source)->flags & G_HOOK_FLAG_IN_CALL) != 0 && \
|
||||
((source)->flags & G_SOURCE_CAN_RECURSE) == 0)
|
||||
#define SOURCE_BLOCKED(source) (((source)->flags & G_SOURCE_BLOCKED) != 0)
|
||||
|
||||
#define SOURCE_UNREF(source, context) \
|
||||
G_STMT_START { \
|
||||
|
|
@ -618,7 +618,7 @@ static GPrivate thread_context_stack = G_PRIVATE_INIT (free_context_stack);
|
|||
|
||||
/**
|
||||
* g_main_context_push_thread_default:
|
||||
* @context: a #GMainContext, or %NULL for the global default context
|
||||
* @context: (allow-none): a #GMainContext, or %NULL for the global default context
|
||||
*
|
||||
* Acquires @context and sets it as the thread-default context for the
|
||||
* current thread. This will cause certain asynchronous operations
|
||||
|
|
@ -677,7 +677,7 @@ g_main_context_push_thread_default (GMainContext *context)
|
|||
|
||||
/**
|
||||
* g_main_context_pop_thread_default:
|
||||
* @context: a #GMainContext object, or %NULL
|
||||
* @context: (allow-none): a #GMainContext object, or %NULL
|
||||
*
|
||||
* Pops @context off the thread-default context stack (verifying that
|
||||
* it was on the top of the stack).
|
||||
|
|
@ -1049,7 +1049,7 @@ g_source_get_id (GSource *source)
|
|||
* Gets the #GMainContext with which the source is associated.
|
||||
* Calling this function on a destroyed source is an error.
|
||||
*
|
||||
* Return value: (transfer none): the #GMainContext with which the
|
||||
* Return value: (transfer none) (allow-none): the #GMainContext with which the
|
||||
* source is associated, or %NULL if the context has not
|
||||
* yet been added to a source.
|
||||
**/
|
||||
|
|
@ -1313,7 +1313,7 @@ static GSourceCallbackFuncs g_source_callback_funcs = {
|
|||
* @source: the source
|
||||
* @func: a callback function
|
||||
* @data: the data to pass to callback function
|
||||
* @notify: a function to call when @data is no longer in use, or %NULL.
|
||||
* @notify: (allow-none): a function to call when @data is no longer in use, or %NULL.
|
||||
*
|
||||
* Sets the callback function for a source. The callback for a source is
|
||||
* called from the source's dispatch function.
|
||||
|
|
@ -1699,7 +1699,7 @@ g_source_unref (GSource *source)
|
|||
|
||||
/**
|
||||
* g_main_context_find_source_by_id:
|
||||
* @context: a #GMainContext (if %NULL, the default context will be used)
|
||||
* @context: (allow-none): a #GMainContext (if %NULL, the default context will be used)
|
||||
* @source_id: the source ID, as returned by g_source_get_id().
|
||||
*
|
||||
* Finds a #GSource given a pair of context and ID.
|
||||
|
|
@ -1735,7 +1735,7 @@ g_main_context_find_source_by_id (GMainContext *context,
|
|||
|
||||
/**
|
||||
* g_main_context_find_source_by_funcs_user_data:
|
||||
* @context: a #GMainContext (if %NULL, the default context will be used).
|
||||
* @context: (allow-none): a #GMainContext (if %NULL, the default context will be used).
|
||||
* @funcs: the @source_funcs passed to g_source_new().
|
||||
* @user_data: the user data from the callback.
|
||||
*
|
||||
|
|
@ -2067,7 +2067,7 @@ g_get_monotonic_time (void)
|
|||
* 32bit msec counter, updated each ~15msec, wraps in ~50 days
|
||||
* - GetTickCount64 (GTC64)
|
||||
* Same as GetTickCount, but extended to 64bit, so no wrap
|
||||
* Only availible in Vista or later
|
||||
* Only available in Vista or later
|
||||
* - timeGetTime (TGT)
|
||||
* similar to GetTickCount by default: 15msec, 50 day wrap.
|
||||
* available in winmm.dll (thus known as the multimedia timers)
|
||||
|
|
@ -2094,7 +2094,7 @@ g_get_monotonic_time (void)
|
|||
* However this seems quite complicated, so we're not doing this right now.
|
||||
*
|
||||
* The approach we take instead is to use the TGT timer, extending it to 64bit
|
||||
* either by using the GTC64 value, or if that is not availible, a process local
|
||||
* either by using the GTC64 value, or if that is not available, a process local
|
||||
* time epoch that we increment when we detect a timer wrap (assumes that we read
|
||||
* the time at least once every 50 days).
|
||||
*
|
||||
|
|
@ -2426,12 +2426,24 @@ block_source (GSource *source)
|
|||
|
||||
g_return_if_fail (!SOURCE_BLOCKED (source));
|
||||
|
||||
source->flags |= G_SOURCE_BLOCKED;
|
||||
|
||||
tmp_list = source->poll_fds;
|
||||
while (tmp_list)
|
||||
{
|
||||
g_main_context_remove_poll_unlocked (source->context, tmp_list->data);
|
||||
tmp_list = tmp_list->next;
|
||||
}
|
||||
|
||||
if (source->priv && source->priv->child_sources)
|
||||
{
|
||||
tmp_list = source->priv->child_sources;
|
||||
while (tmp_list)
|
||||
{
|
||||
block_source (tmp_list->data);
|
||||
tmp_list = tmp_list->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* HOLDS: source->context's lock */
|
||||
|
|
@ -2440,15 +2452,27 @@ unblock_source (GSource *source)
|
|||
{
|
||||
GSList *tmp_list;
|
||||
|
||||
g_return_if_fail (!SOURCE_BLOCKED (source)); /* Source already unblocked */
|
||||
g_return_if_fail (SOURCE_BLOCKED (source)); /* Source already unblocked */
|
||||
g_return_if_fail (!SOURCE_DESTROYED (source));
|
||||
|
||||
source->flags &= ~G_SOURCE_BLOCKED;
|
||||
|
||||
tmp_list = source->poll_fds;
|
||||
while (tmp_list)
|
||||
{
|
||||
g_main_context_add_poll_unlocked (source->context, source->priority, tmp_list->data);
|
||||
tmp_list = tmp_list->next;
|
||||
}
|
||||
|
||||
if (source->priv && source->priv->child_sources)
|
||||
{
|
||||
tmp_list = source->priv->child_sources;
|
||||
while (tmp_list)
|
||||
{
|
||||
unblock_source (tmp_list->data);
|
||||
tmp_list = tmp_list->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* HOLDS: context's lock */
|
||||
|
|
@ -2527,8 +2551,7 @@ g_main_dispatch (GMainContext *context)
|
|||
if (!was_in_call)
|
||||
source->flags &= ~G_HOOK_FLAG_IN_CALL;
|
||||
|
||||
if ((source->flags & G_SOURCE_CAN_RECURSE) == 0 &&
|
||||
!SOURCE_DESTROYED (source))
|
||||
if (SOURCE_BLOCKED (source) && !SOURCE_DESTROYED (source))
|
||||
unblock_source (source);
|
||||
|
||||
/* Note: this depends on the fact that we can't switch
|
||||
|
|
@ -3131,7 +3154,7 @@ g_main_context_iterate (GMainContext *context,
|
|||
|
||||
/**
|
||||
* g_main_context_pending:
|
||||
* @context: a #GMainContext (if %NULL, the default context will be used)
|
||||
* @context: (allow-none): a #GMainContext (if %NULL, the default context will be used)
|
||||
*
|
||||
* Checks if any sources have pending events for the given context.
|
||||
*
|
||||
|
|
@ -3154,7 +3177,7 @@ g_main_context_pending (GMainContext *context)
|
|||
|
||||
/**
|
||||
* g_main_context_iteration:
|
||||
* @context: a #GMainContext (if %NULL, the default context will be used)
|
||||
* @context: (allow-none): a #GMainContext (if %NULL, the default context will be used)
|
||||
* @may_block: whether the call may block.
|
||||
*
|
||||
* Runs a single iteration for the given main loop. This involves
|
||||
|
|
@ -3474,7 +3497,7 @@ g_main_context_poll (GMainContext *context,
|
|||
|
||||
/**
|
||||
* g_main_context_add_poll:
|
||||
* @context: a #GMainContext (or %NULL for the default context)
|
||||
* @context: (allow-none): a #GMainContext (or %NULL for the default context)
|
||||
* @fd: a #GPollFD structure holding information about a file
|
||||
* descriptor to watch.
|
||||
* @priority: the priority for this file descriptor which should be
|
||||
|
|
@ -3934,7 +3957,7 @@ g_timeout_source_new_seconds (guint interval)
|
|||
* (1/1000ths of a second)
|
||||
* @function: function to call
|
||||
* @data: data to pass to @function
|
||||
* @notify: function to call when the timeout is removed, or %NULL
|
||||
* @notify: (allow-none): function to call when the timeout is removed, or %NULL
|
||||
*
|
||||
* Sets a function to be called at regular intervals, with the given
|
||||
* priority. The function is called repeatedly until it returns
|
||||
|
|
@ -4032,7 +4055,7 @@ g_timeout_add (guint32 interval,
|
|||
* @interval: the time between calls to the function, in seconds
|
||||
* @function: function to call
|
||||
* @data: data to pass to @function
|
||||
* @notify: function to call when the timeout is removed, or %NULL
|
||||
* @notify: (allow-none): function to call when the timeout is removed, or %NULL
|
||||
*
|
||||
* Sets a function to be called at regular intervals, with @priority.
|
||||
* The function is called repeatedly until it returns %FALSE, at which
|
||||
|
|
@ -4513,7 +4536,7 @@ g_child_watch_source_new (GPid pid)
|
|||
* Windows a handle for a process (which doesn't have to be a child).
|
||||
* @function: function to call
|
||||
* @data: data to pass to @function
|
||||
* @notify: function to call when the idle is removed, or %NULL
|
||||
* @notify: (allow-none): function to call when the idle is removed, or %NULL
|
||||
*
|
||||
* Sets a function to be called when the child indicated by @pid
|
||||
* exits, at the priority @priority.
|
||||
|
|
@ -4664,7 +4687,7 @@ g_idle_source_new (void)
|
|||
* range between #G_PRIORITY_DEFAULT_IDLE and #G_PRIORITY_HIGH_IDLE.
|
||||
* @function: function to call
|
||||
* @data: data to pass to @function
|
||||
* @notify: function to call when the idle is removed, or %NULL
|
||||
* @notify: (allow-none): function to call when the idle is removed, or %NULL
|
||||
*
|
||||
* Adds a function to be called whenever there are no higher priority
|
||||
* events pending. If the function returns %FALSE it is automatically
|
||||
|
|
@ -4784,7 +4807,7 @@ g_main_context_invoke (GMainContext *context,
|
|||
* @priority: the priority at which to run @function
|
||||
* @function: function to call
|
||||
* @data: data to pass to @function
|
||||
* @notify: a function to call when @data is no longer in use, or %NULL.
|
||||
* @notify: (allow-none): a function to call when @data is no longer in use, or %NULL.
|
||||
*
|
||||
* Invokes a function in such a way that @context is owned during the
|
||||
* invocation of @function.
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ g_try_malloc0 (gsize n_bytes)
|
|||
|
||||
/**
|
||||
* g_try_realloc:
|
||||
* @mem: previously-allocated memory, or %NULL.
|
||||
* @mem: (allow-none): previously-allocated memory, or %NULL.
|
||||
* @n_bytes: number of bytes to allocate.
|
||||
*
|
||||
* Attempts to realloc @mem to a new size, @n_bytes, and returns %NULL
|
||||
|
|
@ -455,7 +455,7 @@ g_try_malloc0_n (gsize n_blocks,
|
|||
|
||||
/**
|
||||
* g_try_realloc_n:
|
||||
* @mem: previously-allocated memory, or %NULL.
|
||||
* @mem: (allow-none): previously-allocated memory, or %NULL.
|
||||
* @n_blocks: the number of blocks to allocate
|
||||
* @n_block_bytes: the size of each block in bytes
|
||||
*
|
||||
|
|
@ -494,7 +494,7 @@ fallback_calloc (gsize n_blocks,
|
|||
static gboolean vtable_set = FALSE;
|
||||
|
||||
/**
|
||||
* g_mem_is_system_malloc
|
||||
* g_mem_is_system_malloc:
|
||||
*
|
||||
* Checks whether the allocator used by g_malloc() is the system's
|
||||
* malloc implementation. If it returns %TRUE memory allocated with
|
||||
|
|
@ -659,7 +659,6 @@ profile_print_locked (guint *local_data,
|
|||
|
||||
/**
|
||||
* g_mem_profile:
|
||||
* @void:
|
||||
*
|
||||
* Outputs a summary of memory usage.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -448,7 +448,7 @@ g_log_set_fatal_mask (const gchar *log_domain,
|
|||
|
||||
/**
|
||||
* g_log_set_handler:
|
||||
* @log_domain: the log domain, or %NULL for the default ""
|
||||
* @log_domain: (allow-none): the log domain, or %NULL for the default ""
|
||||
* application domain
|
||||
* @log_levels: the log levels to apply the log handler for.
|
||||
* To handle fatal and recursive messages as well, combine
|
||||
|
|
|
|||
|
|
@ -258,36 +258,16 @@ _g_unichar_get_width (gunichar c)
|
|||
}
|
||||
|
||||
static glong
|
||||
_g_utf8_strwidth (const gchar *p,
|
||||
gssize max)
|
||||
_g_utf8_strwidth (const gchar *p)
|
||||
{
|
||||
glong len = 0;
|
||||
const gchar *start = p;
|
||||
g_return_val_if_fail (p != NULL || max == 0, 0);
|
||||
g_return_val_if_fail (p != NULL, 0);
|
||||
|
||||
if (max < 0)
|
||||
while (*p)
|
||||
{
|
||||
while (*p)
|
||||
{
|
||||
len += _g_unichar_get_width (g_utf8_get_char (p));
|
||||
p = g_utf8_next_char (p);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (max == 0 || !*p)
|
||||
return 0;
|
||||
|
||||
/* this case may not be quite correct */
|
||||
|
||||
len += _g_unichar_get_width (g_utf8_get_char (p));
|
||||
p = g_utf8_next_char (p);
|
||||
|
||||
while (p - start < max && *p)
|
||||
{
|
||||
len += _g_unichar_get_width (g_utf8_get_char (p));
|
||||
p = g_utf8_next_char (p);
|
||||
}
|
||||
}
|
||||
|
||||
return len;
|
||||
|
|
@ -559,7 +539,7 @@ g_option_context_get_main_group (GOptionContext *context)
|
|||
* g_option_context_add_main_entries:
|
||||
* @context: a #GOptionContext
|
||||
* @entries: a %NULL-terminated array of #GOptionEntry<!-- -->s
|
||||
* @translation_domain: a translation domain to use for translating
|
||||
* @translation_domain: (allow-none): a translation domain to use for translating
|
||||
* the <option>--help</option> output for the options in @entries
|
||||
* with gettext(), or %NULL
|
||||
*
|
||||
|
|
@ -597,13 +577,13 @@ calculate_max_length (GOptionGroup *group)
|
|||
if (entry->flags & G_OPTION_FLAG_HIDDEN)
|
||||
continue;
|
||||
|
||||
len = _g_utf8_strwidth (entry->long_name, -1);
|
||||
len = _g_utf8_strwidth (entry->long_name);
|
||||
|
||||
if (entry->short_name)
|
||||
len += 4;
|
||||
|
||||
if (!NO_ARG (entry) && entry->arg_description)
|
||||
len += 1 + _g_utf8_strwidth (TRANSLATE (group, entry->arg_description), -1);
|
||||
len += 1 + _g_utf8_strwidth (TRANSLATE (group, entry->arg_description));
|
||||
|
||||
max_length = MAX (max_length, len);
|
||||
}
|
||||
|
|
@ -636,7 +616,7 @@ print_entry (GOptionGroup *group,
|
|||
g_string_append_printf (str, "=%s", TRANSLATE (group, entry->arg_description));
|
||||
|
||||
g_string_append_printf (string, "%s%*s %s\n", str->str,
|
||||
(int) (max_length + 4 - _g_utf8_strwidth (str->str, -1)), "",
|
||||
(int) (max_length + 4 - _g_utf8_strwidth (str->str)), "",
|
||||
entry->description ? TRANSLATE (group, entry->description) : "");
|
||||
g_string_free (str, TRUE);
|
||||
}
|
||||
|
|
@ -716,7 +696,7 @@ context_has_h_entry (GOptionContext *context)
|
|||
* g_option_context_get_help:
|
||||
* @context: a #GOptionContext
|
||||
* @main_help: if %TRUE, only include the main group
|
||||
* @group: the #GOptionGroup to create help for, or %NULL
|
||||
* @group: (allow-none): the #GOptionGroup to create help for, or %NULL
|
||||
*
|
||||
* Returns a formatted, translated help text for the given context.
|
||||
* To obtain the text produced by <option>--help</option>, call
|
||||
|
|
@ -830,11 +810,11 @@ g_option_context_get_help (GOptionContext *context,
|
|||
|
||||
list = context->groups;
|
||||
|
||||
max_length = _g_utf8_strwidth ("-?, --help", -1);
|
||||
max_length = _g_utf8_strwidth ("-?, --help");
|
||||
|
||||
if (list)
|
||||
{
|
||||
len = _g_utf8_strwidth ("--help-all", -1);
|
||||
len = _g_utf8_strwidth ("--help-all");
|
||||
max_length = MAX (max_length, len);
|
||||
}
|
||||
|
||||
|
|
@ -849,7 +829,7 @@ g_option_context_get_help (GOptionContext *context,
|
|||
GOptionGroup *g = list->data;
|
||||
|
||||
/* First, we check the --help-<groupname> options */
|
||||
len = _g_utf8_strwidth ("--help-", -1) + _g_utf8_strwidth (g->name, -1);
|
||||
len = _g_utf8_strwidth ("--help-") + _g_utf8_strwidth (g->name);
|
||||
max_length = MAX (max_length, len);
|
||||
|
||||
/* Then we go through the entries */
|
||||
|
|
@ -2087,9 +2067,9 @@ g_option_context_parse (GOptionContext *context,
|
|||
* @help_description: a description for the <option>--help-</option>@name option.
|
||||
* This string is translated using the translation domain or translation function
|
||||
* of the group
|
||||
* @user_data: user data that will be passed to the pre- and post-parse hooks,
|
||||
* @user_data: (allow-none): user data that will be passed to the pre- and post-parse hooks,
|
||||
* the error hook and to callbacks of %G_OPTION_ARG_CALLBACK options, or %NULL
|
||||
* @destroy: a function that will be called to free @user_data, or %NULL
|
||||
* @destroy: (allow-none): a function that will be called to free @user_data, or %NULL
|
||||
*
|
||||
* Creates a new #GOptionGroup.
|
||||
*
|
||||
|
|
@ -2208,8 +2188,8 @@ g_option_group_add_entries (GOptionGroup *group,
|
|||
/**
|
||||
* g_option_group_set_parse_hooks:
|
||||
* @group: a #GOptionGroup
|
||||
* @pre_parse_func: a function to call before parsing, or %NULL
|
||||
* @post_parse_func: a function to call after parsing, or %NULL
|
||||
* @pre_parse_func: (allow-none): a function to call before parsing, or %NULL
|
||||
* @post_parse_func: (allow-none): a function to call after parsing, or %NULL
|
||||
*
|
||||
* Associates two functions with @group which will be called
|
||||
* from g_option_context_parse() before the first option is parsed
|
||||
|
|
@ -2258,9 +2238,9 @@ g_option_group_set_error_hook (GOptionGroup *group,
|
|||
/**
|
||||
* g_option_group_set_translate_func:
|
||||
* @group: a #GOptionGroup
|
||||
* @func: the #GTranslateFunc, or %NULL
|
||||
* @data: user data to pass to @func, or %NULL
|
||||
* @destroy_notify: a function which gets called to free @data, or %NULL
|
||||
* @func: (allow-none): the #GTranslateFunc, or %NULL
|
||||
* @data: (allow-none): user data to pass to @func, or %NULL
|
||||
* @destroy_notify: (allow-none): a function which gets called to free @data, or %NULL
|
||||
*
|
||||
* Sets the function which is used to translate user-visible
|
||||
* strings, for <option>--help</option> output. Different
|
||||
|
|
@ -2320,9 +2300,9 @@ g_option_group_set_translation_domain (GOptionGroup *group,
|
|||
/**
|
||||
* g_option_context_set_translate_func:
|
||||
* @context: a #GOptionContext
|
||||
* @func: the #GTranslateFunc, or %NULL
|
||||
* @data: user data to pass to @func, or %NULL
|
||||
* @destroy_notify: a function which gets called to free @data, or %NULL
|
||||
* @func: (allow-none): the #GTranslateFunc, or %NULL
|
||||
* @data: (allow-none): user data to pass to @func, or %NULL
|
||||
* @destroy_notify: (allow-none): a function which gets called to free @data, or %NULL
|
||||
*
|
||||
* Sets the function which is used to translate the contexts
|
||||
* user-visible strings, for <option>--help</option> output.
|
||||
|
|
@ -2379,7 +2359,7 @@ g_option_context_set_translation_domain (GOptionContext *context,
|
|||
/**
|
||||
* g_option_context_set_summary:
|
||||
* @context: a #GOptionContext
|
||||
* @summary: a string to be shown in <option>--help</option> output
|
||||
* @summary: (allow-none): a string to be shown in <option>--help</option> output
|
||||
* before the list of options, or %NULL
|
||||
*
|
||||
* Adds a string to be displayed in <option>--help</option> output
|
||||
|
|
@ -2424,7 +2404,7 @@ g_option_context_get_summary (GOptionContext *context)
|
|||
/**
|
||||
* g_option_context_set_description:
|
||||
* @context: a #GOptionContext
|
||||
* @description: a string to be shown in <option>--help</option> output
|
||||
* @description: (allow-none): a string to be shown in <option>--help</option> output
|
||||
* after the list of options, or %NULL
|
||||
*
|
||||
* Adds a string to be displayed in <option>--help</option> output
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ g_pattern_ph_match (const gchar *match_pattern,
|
|||
* @string_length: the length of @string (in bytes, i.e. strlen(),
|
||||
* <emphasis>not</emphasis> g_utf8_strlen())
|
||||
* @string: the UTF-8 encoded string to match
|
||||
* @string_reversed: the reverse of @string or %NULL
|
||||
* @string_reversed: (allow-none): the reverse of @string or %NULL
|
||||
* @Returns: %TRUE if @string matches @pspec
|
||||
*
|
||||
* Matches a string against a compiled pattern. Passing the correct
|
||||
|
|
|
|||
|
|
@ -794,7 +794,7 @@ g_queue_link_index (GQueue *queue,
|
|||
}
|
||||
|
||||
/**
|
||||
* g_queue_unlink
|
||||
* g_queue_unlink:
|
||||
* @queue: a #GQueue
|
||||
* @link_: a #GList link that <emphasis>must</emphasis> be part of @queue
|
||||
*
|
||||
|
|
|
|||
|
|
@ -779,7 +779,7 @@ g_match_info_is_partial_match (const GMatchInfo *match_info)
|
|||
|
||||
/**
|
||||
* g_match_info_expand_references:
|
||||
* @match_info: a #GMatchInfo or %NULL
|
||||
* @match_info: (allow-none): a #GMatchInfo or %NULL
|
||||
* @string_to_expand: the string to expand
|
||||
* @error: location to store the error occurring, or %NULL to ignore errors
|
||||
*
|
||||
|
|
|
|||
|
|
@ -659,7 +659,7 @@ g_scanner_lookup_internal (GScanner *scanner,
|
|||
}
|
||||
|
||||
/**
|
||||
* g_scanner_add_symbol
|
||||
* g_scanner_add_symbol:
|
||||
* @scanner: a #GScanner
|
||||
* @symbol: the symbol to add
|
||||
* @value: the value of the symbol
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ iter_compare (GSequenceIter *node1,
|
|||
|
||||
/**
|
||||
* g_sequence_new:
|
||||
* @data_destroy: a #GDestroyNotify function, or %NULL
|
||||
* @data_destroy: (allow-none): a #GDestroyNotify function, or %NULL
|
||||
*
|
||||
* Creates a new GSequence. The @data_destroy function, if non-%NULL will
|
||||
* be called on all items when the sequence is destroyed and on items that
|
||||
|
|
|
|||
|
|
@ -737,7 +737,7 @@ g_fopen (const gchar *filename,
|
|||
* @filename: a pathname in the GLib file name encoding (UTF-8 on Windows)
|
||||
* @mode: a string describing the mode in which the file should be
|
||||
* opened
|
||||
* @stream: an existing stream which will be reused, or %NULL
|
||||
* @stream: (allow-none): an existing stream which will be reused, or %NULL
|
||||
*
|
||||
* A wrapper for the POSIX freopen() function. The freopen() function
|
||||
* opens a file and associates it with an existing stream.
|
||||
|
|
|
|||
|
|
@ -1891,7 +1891,7 @@ g_strncasecmp (const gchar *s1,
|
|||
/**
|
||||
* g_strdelimit:
|
||||
* @string: the string to convert
|
||||
* @delimiters: a string containing the current delimiters, or %NULL
|
||||
* @delimiters: (allow-none): a string containing the current delimiters, or %NULL
|
||||
* to use the standard delimiters defined in #G_STR_DELIMITERS
|
||||
* @new_delimiter: the new delimiter character
|
||||
*
|
||||
|
|
@ -2441,7 +2441,7 @@ g_strdupv (gchar **str_array)
|
|||
|
||||
/**
|
||||
* g_strjoinv:
|
||||
* @separator: a string to insert between each of the strings, or %NULL
|
||||
* @separator: (allow-none): a string to insert between each of the strings, or %NULL
|
||||
* @str_array: a %NULL-terminated array of strings to join
|
||||
*
|
||||
* Joins a number of strings together to form one long string, with the
|
||||
|
|
@ -2493,7 +2493,7 @@ g_strjoinv (const gchar *separator,
|
|||
|
||||
/**
|
||||
* g_strjoin:
|
||||
* @separator: a string to insert between each of the strings, or %NULL
|
||||
* @separator: (allow-none): a string to insert between each of the strings, or %NULL
|
||||
* @...: a %NULL-terminated list of strings to join
|
||||
*
|
||||
* Joins a number of strings together to form one long string, with the
|
||||
|
|
|
|||
|
|
@ -1412,7 +1412,7 @@ g_test_add_vtable (const char *testpath,
|
|||
return;
|
||||
|
||||
suite = g_test_get_root();
|
||||
segments = g_strsplit (testpath, G_DIR_SEPARATOR_S, -1);
|
||||
segments = g_strsplit (testpath, "/", -1);
|
||||
for (ui = 0; segments[ui] != NULL; ui++)
|
||||
{
|
||||
const char *seg = segments[ui];
|
||||
|
|
@ -1471,7 +1471,7 @@ g_test_fail (void)
|
|||
|
||||
/**
|
||||
* g_test_add_func:
|
||||
* @testpath: Slash-separated test case path name for the test.
|
||||
* @testpath: /-separated test case path name for the test.
|
||||
* @test_func: The test function to invoke for this test.
|
||||
*
|
||||
* Create a new test case, similar to g_test_create_case(). However
|
||||
|
|
@ -1503,7 +1503,7 @@ g_test_add_func (const char *testpath,
|
|||
|
||||
/**
|
||||
* g_test_add_data_func:
|
||||
* @testpath: Slash-separated test case path name for the test.
|
||||
* @testpath: /-separated test case path name for the test.
|
||||
* @test_data: Test data argument for the test function.
|
||||
* @test_func: The test function to invoke for this test.
|
||||
*
|
||||
|
|
@ -1954,8 +1954,8 @@ g_assertion_message_error (const char *domain,
|
|||
|
||||
/**
|
||||
* g_strcmp0:
|
||||
* @str1: a C string or %NULL
|
||||
* @str2: another C string or %NULL
|
||||
* @str1: (allow-none): a C string or %NULL
|
||||
* @str2: (allow-none): another C string or %NULL
|
||||
*
|
||||
* Compares @str1 and @str2 like strcmp(). Handles %NULL
|
||||
* gracefully by sorting it before non-%NULL strings.
|
||||
|
|
@ -2482,7 +2482,7 @@ g_test_log_buffer_new (void)
|
|||
}
|
||||
|
||||
/**
|
||||
* g_test_log_buffer_free
|
||||
* g_test_log_buffer_free:
|
||||
*
|
||||
* Internal function for gtester to free test log messages, no ABI guarantees provided.
|
||||
*/
|
||||
|
|
@ -2497,7 +2497,7 @@ g_test_log_buffer_free (GTestLogBuffer *tbuffer)
|
|||
}
|
||||
|
||||
/**
|
||||
* g_test_log_buffer_push
|
||||
* g_test_log_buffer_push:
|
||||
*
|
||||
* Internal function for gtester to decode test log messages, no ABI guarantees provided.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ g_mutex_unlock (GMutex *mutex)
|
|||
gint status;
|
||||
|
||||
if G_UNLIKELY ((status = pthread_mutex_unlock (g_mutex_get_impl (mutex))) != 0)
|
||||
g_thread_abort (status, "pthread_mutex_lock");
|
||||
g_thread_abort (status, "pthread_mutex_unlock");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -685,7 +685,7 @@ g_unichar_compose (gunichar a,
|
|||
* g_unichar_fully_decompose:
|
||||
* @ch: a Unicode character.
|
||||
* @compat: whether perform canonical or compatibility decomposition
|
||||
* @result: location to store decomposed result, or %NULL
|
||||
* @result: (allow-none): location to store decomposed result, or %NULL
|
||||
* @result_len: length of @result
|
||||
*
|
||||
* Computes the canonical or compatibility decomposition of a
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ G_BEGIN_DECLS
|
|||
#define G_URI_RESERVED_CHARS_GENERIC_DELIMITERS ":/?#[]@"
|
||||
|
||||
/**
|
||||
* G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS
|
||||
* G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS:
|
||||
*
|
||||
* Subcomponent delimiter characters as defined in RFC 3986. Includes "!$&'()*+,;=".
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -696,7 +696,7 @@ g_utf8_get_char_validated (const gchar *p,
|
|||
* @str: a UTF-8 encoded string
|
||||
* @len: the maximum length of @str to use, in bytes. If @len < 0,
|
||||
* then the string is nul-terminated.
|
||||
* @items_written: location to store the number of characters in the
|
||||
* @items_written: (allow-none): location to store the number of characters in the
|
||||
* result, or %NULL.
|
||||
*
|
||||
* Convert a string from UTF-8 to a 32-bit fixed width
|
||||
|
|
@ -789,12 +789,12 @@ g_utf8_to_ucs4_fast (const gchar *str,
|
|||
* @str: a UTF-8 encoded string
|
||||
* @len: the maximum length of @str to use, in bytes. If @len < 0,
|
||||
* then the string is nul-terminated.
|
||||
* @items_read: location to store number of bytes read, or %NULL.
|
||||
* @items_read: (allow-none): location to store number of bytes read, or %NULL.
|
||||
* If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will be
|
||||
* returned in case @str contains a trailing partial
|
||||
* character. If an error occurs then the index of the
|
||||
* invalid input is stored here.
|
||||
* @items_written: location to store number of characters written or %NULL.
|
||||
* @items_written: (allow-none): location to store number of characters written or %NULL.
|
||||
* The value here stored does not include the trailing 0
|
||||
* character.
|
||||
* @error: location to store the error occurring, or %NULL to ignore
|
||||
|
|
@ -873,8 +873,8 @@ g_utf8_to_ucs4 (const gchar *str,
|
|||
* @str: a UCS-4 encoded string
|
||||
* @len: the maximum length (number of characters) of @str to use.
|
||||
* If @len < 0, then the string is nul-terminated.
|
||||
* @items_read: location to store number of characters read, or %NULL.
|
||||
* @items_written: location to store number of bytes written or %NULL.
|
||||
* @items_read: (allow-none): location to store number of characters read, or %NULL.
|
||||
* @items_written: (allow-none): location to store number of bytes written or %NULL.
|
||||
* The value here stored does not include the trailing 0
|
||||
* byte.
|
||||
* @error: location to store the error occurring, or %NULL to ignore
|
||||
|
|
@ -945,12 +945,12 @@ g_ucs4_to_utf8 (const gunichar *str,
|
|||
* @str: a UTF-16 encoded string
|
||||
* @len: the maximum length (number of <type>gunichar2</type>) of @str to use.
|
||||
* If @len < 0, then the string is nul-terminated.
|
||||
* @items_read: location to store number of words read, or %NULL.
|
||||
* @items_read: (allow-none): location to store number of words read, or %NULL.
|
||||
* If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will be
|
||||
* returned in case @str contains a trailing partial
|
||||
* character. If an error occurs then the index of the
|
||||
* invalid input is stored here.
|
||||
* @items_written: location to store number of bytes written, or %NULL.
|
||||
* @items_written: (allow-none): location to store number of bytes written, or %NULL.
|
||||
* The value stored here does not include the trailing
|
||||
* 0 byte.
|
||||
* @error: location to store the error occurring, or %NULL to ignore
|
||||
|
|
@ -1100,12 +1100,12 @@ g_utf16_to_utf8 (const gunichar2 *str,
|
|||
* @str: a UTF-16 encoded string
|
||||
* @len: the maximum length (number of <type>gunichar2</type>) of @str to use.
|
||||
* If @len < 0, then the string is nul-terminated.
|
||||
* @items_read: location to store number of words read, or %NULL.
|
||||
* @items_read: (allow-none): location to store number of words read, or %NULL.
|
||||
* If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will be
|
||||
* returned in case @str contains a trailing partial
|
||||
* character. If an error occurs then the index of the
|
||||
* invalid input is stored here.
|
||||
* @items_written: location to store number of characters written, or %NULL.
|
||||
* @items_written: (allow-none): location to store number of characters written, or %NULL.
|
||||
* The value stored here does not include the trailing
|
||||
* 0 character.
|
||||
* @error: location to store the error occurring, or %NULL to ignore
|
||||
|
|
@ -1238,12 +1238,12 @@ g_utf16_to_ucs4 (const gunichar2 *str,
|
|||
* @str: a UTF-8 encoded string
|
||||
* @len: the maximum length (number of bytes) of @str to use.
|
||||
* If @len < 0, then the string is nul-terminated.
|
||||
* @items_read: location to store number of bytes read, or %NULL.
|
||||
* @items_read: (allow-none): location to store number of bytes read, or %NULL.
|
||||
* If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will be
|
||||
* returned in case @str contains a trailing partial
|
||||
* character. If an error occurs then the index of the
|
||||
* invalid input is stored here.
|
||||
* @items_written: location to store number of <type>gunichar2</type> written,
|
||||
* @items_written: (allow-none): location to store number of <type>gunichar2</type> written,
|
||||
* or %NULL.
|
||||
* The value stored here does not include the trailing 0.
|
||||
* @error: location to store the error occurring, or %NULL to ignore
|
||||
|
|
@ -1355,10 +1355,10 @@ g_utf8_to_utf16 (const gchar *str,
|
|||
* @str: a UCS-4 encoded string
|
||||
* @len: the maximum length (number of characters) of @str to use.
|
||||
* If @len < 0, then the string is nul-terminated.
|
||||
* @items_read: location to store number of bytes read, or %NULL.
|
||||
* @items_read: (allow-none): location to store number of bytes read, or %NULL.
|
||||
* If an error occurs then the index of the invalid input
|
||||
* is stored here.
|
||||
* @items_written: location to store number of <type>gunichar2</type>
|
||||
* @items_written: (allow-none): location to store number of <type>gunichar2</type>
|
||||
* written, or %NULL. The value stored here does not
|
||||
* include the trailing 0.
|
||||
* @error: location to store the error occurring, or %NULL to ignore
|
||||
|
|
|
|||
|
|
@ -304,7 +304,7 @@ g_bit_storage (gulong number)
|
|||
{
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 4) && defined(__OPTIMIZE__)
|
||||
return G_LIKELY (number) ?
|
||||
((GLIB_SIZEOF_LONG * 8U - 1) ^ __builtin_clzl(number)) + 1 : 1;
|
||||
((GLIB_SIZEOF_LONG * 8U - 1) ^ (guint) __builtin_clzl(number)) + 1 : 1;
|
||||
#else
|
||||
register guint n_bits = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -2306,11 +2306,11 @@ parse (TokenStream *stream,
|
|||
|
||||
/**
|
||||
* g_variant_parse:
|
||||
* @type: a #GVariantType, or %NULL
|
||||
* @type: (allow-none): a #GVariantType, or %NULL
|
||||
* @text: a string containing a GVariant in text form
|
||||
* @limit: a pointer to the end of @text, or %NULL
|
||||
* @endptr: a location to store the end pointer, or %NULL
|
||||
* @error: a pointer to a %NULL #GError pointer, or %NULL
|
||||
* @limit: (allow-none): a pointer to the end of @text, or %NULL
|
||||
* @endptr: (allow-none): a location to store the end pointer, or %NULL
|
||||
* @error: (allow-none): a pointer to a %NULL #GError pointer, or %NULL
|
||||
* @Returns: a reference to a #GVariant, or %NULL
|
||||
*
|
||||
* Parses a #GVariant from a text representation.
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@
|
|||
/* < private >
|
||||
* GVariantSerialised:
|
||||
* @type_info: the #GVariantTypeInfo of this value
|
||||
* @data: the serialised data of this value, or %NULL
|
||||
* @data: (allow-none): the serialised data of this value, or %NULL
|
||||
* @size: the size of this value
|
||||
*
|
||||
* A structure representing a GVariant in serialised form. This
|
||||
|
|
|
|||
|
|
@ -1812,8 +1812,8 @@ g_variant_get_bytestring (GVariant *value)
|
|||
*
|
||||
* The return value must be freed using g_free().
|
||||
*
|
||||
* Returns: (transfer full) (array zero-terminated=1 length=length)
|
||||
* (element-type guint8): a newly allocated string
|
||||
* Returns: (transfer full) (array zero-terminated=1 length=length) (element-type guint8):
|
||||
* a newly allocated string
|
||||
*
|
||||
* Since: 2.26
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -597,7 +597,7 @@ g_variant_type_string_is_valid (const gchar *type_string)
|
|||
|
||||
/**
|
||||
* g_variant_type_free:
|
||||
* @type: a #GVariantType, or %NULL
|
||||
* @type: (allow-none): a #GVariantType, or %NULL
|
||||
*
|
||||
* Frees a #GVariantType that was allocated with
|
||||
* g_variant_type_copy(), g_variant_type_new() or one of the container
|
||||
|
|
|
|||
|
|
@ -222,8 +222,8 @@ g_variant_type_info_get_type_string (GVariantTypeInfo *info)
|
|||
/* < private >
|
||||
* g_variant_type_info_query:
|
||||
* @info: a #GVariantTypeInfo
|
||||
* @alignment: the location to store the alignment, or %NULL
|
||||
* @fixed_size: the location to store the fixed size, or %NULL
|
||||
* @alignment: (allow-none): the location to store the alignment, or %NULL
|
||||
* @fixed_size: (allow-none): the location to store the fixed size, or %NULL
|
||||
*
|
||||
* Queries @info to determine the alignment requirements and fixed size
|
||||
* (if any) of the type.
|
||||
|
|
@ -306,8 +306,8 @@ g_variant_type_info_element (GVariantTypeInfo *info)
|
|||
/* < private >
|
||||
* g_variant_type_query_element:
|
||||
* @info: a #GVariantTypeInfo for an array or maybe type
|
||||
* @alignment: the location to store the alignment, or %NULL
|
||||
* @fixed_size: the location to store the fixed size, or %NULL
|
||||
* @alignment: (allow-none): the location to store the alignment, or %NULL
|
||||
* @fixed_size: (allow-none): the location to store the fixed size, or %NULL
|
||||
*
|
||||
* Returns the alignment requires and fixed size (if any) for the
|
||||
* element type of the array. This call is a convenience wrapper around
|
||||
|
|
|
|||
|
|
@ -45,28 +45,6 @@ const gchar * glib_check_version (guint required_major,
|
|||
guint required_minor,
|
||||
guint required_micro);
|
||||
|
||||
/**
|
||||
* GLIB_CHECK_VERSION:
|
||||
* @major: the major version to check for
|
||||
* @minor: the minor version to check for
|
||||
* @micro: the micro version to check for
|
||||
*
|
||||
* Checks the version of the GLib library that is being compiled
|
||||
* against.
|
||||
*
|
||||
* <example>
|
||||
* <title>Checking the version of the GLib library</title>
|
||||
* <programlisting>
|
||||
* if (!GLIB_CHECK_VERSION (1, 2, 0))
|
||||
* g_error ("GLib version 1.2.0 or above is needed");
|
||||
* </programlisting>
|
||||
* </example>
|
||||
*
|
||||
* See glib_check_version() for a runtime check.
|
||||
*
|
||||
* Returns: %TRUE if the version of the GLib header files
|
||||
* is the same as or newer than the passed-in version.
|
||||
*/
|
||||
#define GLIB_CHECK_VERSION(major,minor,micro) \
|
||||
(GLIB_MAJOR_VERSION > (major) || \
|
||||
(GLIB_MAJOR_VERSION == (major) && GLIB_MINOR_VERSION > (minor)) || \
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ g_win32_error_message (gint error)
|
|||
|
||||
/**
|
||||
* g_win32_get_package_installation_directory_of_module:
|
||||
* @hmodule: The Win32 handle for a DLL loaded into the current process, or %NULL
|
||||
* @hmodule: (allow-none): The Win32 handle for a DLL loaded into the current process, or %NULL
|
||||
*
|
||||
* This function tries to determine the installation directory of a
|
||||
* software package based on the location of a DLL of the software
|
||||
|
|
@ -322,8 +322,8 @@ get_package_directory_from_module (const gchar *module_name)
|
|||
|
||||
/**
|
||||
* g_win32_get_package_installation_directory:
|
||||
* @package: You should pass %NULL for this.
|
||||
* @dll_name: The name of a DLL that a package provides in UTF-8, or %NULL.
|
||||
* @package: (allow-none): You should pass %NULL for this.
|
||||
* @dll_name: (allow-none): The name of a DLL that a package provides in UTF-8, or %NULL.
|
||||
*
|
||||
* Try to determine the installation directory for a software package.
|
||||
*
|
||||
|
|
@ -428,8 +428,8 @@ g_win32_get_package_installation_directory (const gchar *package,
|
|||
|
||||
/**
|
||||
* g_win32_get_package_installation_subdirectory:
|
||||
* @package: You should pass %NULL for this.
|
||||
* @dll_name: The name of a DLL that a package provides, in UTF-8, or %NULL.
|
||||
* @package: (allow-none): You should pass %NULL for this.
|
||||
* @dll_name: (allow-none): The name of a DLL that a package provides, in UTF-8, or %NULL.
|
||||
* @subdir: A subdirectory of the package installation directory, also in UTF-8
|
||||
*
|
||||
* This function is deprecated. Use
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue