From 00be69a86301c64d693993fc4ad29f6d03f78112 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Wed, 4 Sep 2019 15:38:07 +0900 Subject: [PATCH] Imported Upstream version 2.32.1 --- .gitignore | 8 ++-- ChangeLog | 69 +++++++++++++++++++++++++++ NEWS | 20 ++++++++ configure.ac | 2 +- gio/src/application.ccg | 2 +- glib/glibmm/exceptionhandler.h | 3 +- glib/glibmm/miscutils.cc | 4 +- glib/src/checksum.hg | 2 +- glib/src/thread.ccg | 4 -- tools/gen_scripts/gio_generate_docs.sh | 13 +++-- tools/gen_scripts/gio_generate_enums.sh | 13 +++-- tools/gen_scripts/gio_generate_extra_defs.sh | 3 +- tools/gen_scripts/gio_generate_methods.sh | 13 +++-- tools/gen_scripts/glib_generate_docs.sh | 13 +++-- tools/gen_scripts/glib_generate_enums.sh | 14 +++--- tools/gen_scripts/glib_generate_extra_defs.sh | 3 +- tools/gen_scripts/glib_generate_methods.sh | 17 ++++--- 17 files changed, 141 insertions(+), 62 deletions(-) diff --git a/.gitignore b/.gitignore index ef2bba1..28f463e 100644 --- a/.gitignore +++ b/.gitignore @@ -57,9 +57,9 @@ giommconfig.h # examples/ /examples/child_watch/child_watch /examples/compose/example -/examples/dbus/busserver -/examples/dbus/peer -/examples/dbus/userbus +/examples/dbus/client_bus_listnames +/examples/dbus/server_without_bus +/examples/dbus/session_bus_service /examples/iochannel_stream/example /examples/keyfile/example /examples/markup/parser @@ -128,6 +128,8 @@ giommconfig.h /glib/glibmm/spawn.h /glib/glibmm/thread.cc /glib/glibmm/thread.h +/glib/glibmm/threads.cc +/glib/glibmm/threads.h /glib/glibmm/timezone.cc /glib/glibmm/timezone.h /glib/glibmm/unicode.cc diff --git a/ChangeLog b/ChangeLog index 9cafd98..26eafc2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,72 @@ +2.32.1: + +2012-07-10 Krzesimir Nowak + + Glib::Checksum: Fix a typo. + + * glib/src/checksum.hg: Should be *_SHOULD_*, not *_SHOUD_*. + +2012-07-01 Kjell Ahlstedt + + Update .gitignore. + + * .gitignore: Add /glib/glibmm/threads.[h|cc]. + Update examples/dbus/*. + +2012-06-19 Murray Cumming + + gen_scripts: Correct some comments/documentation. + + * tools/gen_scripts/gio_generate_extra_defs.sh: + * tools/gen_scripts/glib_generate_extra_defs.sh: + These do not need JHBUILD_SOURCES to be defined. + +2012-06-13 Murray Cumming + + Simplify the gen_scripts slightly. + + * tools/gen_scripts/gio_generate_docs.sh: + * tools/gen_scripts/gio_generate_enums.sh: + * tools/gen_scripts/gio_generate_methods.sh: + * tools/gen_scripts/glib_generate_docs.sh: + * tools/gen_scripts/glib_generate_enums.sh: + * tools/gen_scripts/glib_generate_methods.sh: + Do not require changes to PATH. + +2012-06-08 Michał Wróbel + + Thread::RecMutex: Don't initialize this as a GStaticMutex. + + The previous code (removed here) depended on an implementation + detail of GStaticRecMutex, which was changed in this glib commit: + http://git.gnome.org/browse/glib/commit/?id=2b281e40f32b7916d856dcc95e6f8fe625fcff03 + + This change avoids a deadlock with that version of glib. + Note that Thread::* is deprecated anyway, which is lucky because we do not + know for sure that this fix is enough. + Bug #677291 + +2012-06-04 Kjell Ahlstedt + + Glib::add_exception_handler(): Fix misplaced endif. + + * glib/glibmm/exceptionhandler.h: Fix a misplaced endif, which has made + Doxygen exclude add_exception_handler() from the documentation. + +2012-05-28 Murray Cumming + + Application: Pass 0 (NULL) rather than "" to GApplication. + + * gio/src/application.ccg: It is annoying that GApplication (and other + C code) distinguishes, of course. + +2012-04-17 Krzesimir Nowak + + Miscutils: Fix typos. + + * glib/glibmm/miscutils.cc: Return early from get_system_data_dirs() + and get_system_config_dirs() when C function returns NULL. + 2.32.0: 2012-04-05 Kjell Ahlstedt diff --git a/NEWS b/NEWS index fe50299..ef95758 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,23 @@ +2.32.1 (stable): + +Gio: +* Application: + - Pass 0 (NULL) rather than "" to GApplication. + (Murray Cumming) + +Glib: +* Miscutils: get_system_data_dirs(), get_system_config_dirs(): + Return early when the C function returns NULL. + (Krzesimir Nowak) +* Thread::RecMutex: Don't initialize this as a GStaticMutex. + (Deprecated anyway) + (Michał Wróbel) Bug #677291 +* Documentation: + - Don't hide add_exception_handler() documentation. + (Kjell Ahlstedt) + - Really hide the GCheckSum type from the documentation. + (Krzesimir Nowak) + 2.32.0 (stable): Glib: diff --git a/configure.ac b/configure.ac index b462cc3..359277f 100644 --- a/configure.ac +++ b/configure.ac @@ -15,7 +15,7 @@ ## You should have received a copy of the GNU Lesser General Public License ## along with this library. If not, see . -AC_INIT([glibmm], [2.32.0], +AC_INIT([glibmm], [2.32.1], [http://bugzilla.gnome.org/enter_bug.cgi?product=glibmm], [glibmm], [http://www.gtkmm.org/]) AC_PREREQ([2.59]) diff --git a/gio/src/application.ccg b/gio/src/application.ccg index 2942d75..8913b5f 100644 --- a/gio/src/application.ccg +++ b/gio/src/application.ccg @@ -116,7 +116,7 @@ Application::Application(const Glib::ustring& application_id, ApplicationFlags f : // Mark this class as non-derived to allow C++ vfuncs to be skipped. Glib::ObjectBase(0), - Glib::Object(Glib::ConstructParams(custom_class_init(), "application_id", application_id.c_str(), "flags", ((GApplicationFlags)(flags)), static_cast(0))) + Glib::Object(Glib::ConstructParams(custom_class_init(), "application_id", (application_id.empty() ? 0 : application_id.c_str()), "flags", ((GApplicationFlags)(flags)), static_cast(0))) { } diff --git a/glib/glibmm/exceptionhandler.h b/glib/glibmm/exceptionhandler.h index 8a483c8..534ca06 100644 --- a/glib/glibmm/exceptionhandler.h +++ b/glib/glibmm/exceptionhandler.h @@ -35,10 +35,9 @@ sigc::connection add_exception_handler(const sigc::slot& slot); #ifndef DOXYGEN_SHOULD_SKIP_THIS // internal void exception_handlers_invoke() throw(); +#endif //DOXYGEN_SHOULD_SKIP_THIS } // namespace Glib -#endif //GLIBMM_EXCEPTIONS_ENABLED - #endif /* _GLIBMM_EXCEPTIONHANDLER_H */ diff --git a/glib/glibmm/miscutils.cc b/glib/glibmm/miscutils.cc index 2937ddb..95226b8 100644 --- a/glib/glibmm/miscutils.cc +++ b/glib/glibmm/miscutils.cc @@ -126,7 +126,7 @@ std::vector get_system_data_dirs() //TODO: Use a utility function: std::vector result; const char* const * cresult = g_get_system_data_dirs(); - if(cresult) + if(!cresult) return result; for(const gchar* const * iter = cresult; *iter != 0; ++iter) @@ -143,7 +143,7 @@ std::vector get_system_config_dirs() //TODO: Use a utility function: std::vector result; const char* const * cresult = g_get_system_config_dirs(); - if(cresult) + if(!cresult) return result; for(const gchar* const * iter = cresult; *iter != 0; ++iter) diff --git a/glib/src/checksum.hg b/glib/src/checksum.hg index e9f599f..fce9309 100644 --- a/glib/src/checksum.hg +++ b/glib/src/checksum.hg @@ -22,7 +22,7 @@ _DEFS(glibmm,glib) #include #include -#ifndef DOXYGEN_SHOUD_SKIP_THIS +#ifndef DOXYGEN_SHOULD_SKIP_THIS extern "C" { typedef struct _GChecksum GChecksum; } #endif diff --git a/glib/src/thread.ccg b/glib/src/thread.ccg index 990ec6b..1c32547 100644 --- a/glib/src/thread.ccg +++ b/glib/src/thread.ccg @@ -286,10 +286,6 @@ StaticRecMutex::operator RecMutex&() RecMutex::RecMutex() { g_static_rec_mutex_init(&gobject_); - - // GLib doesn't have GRecMutex, only GStaticRecMutex. Force initialization - // of the mutex now, to mimic the behaviour of a (hypothetical) GRecMutex. - g_static_mutex_get_mutex(&gobject_.mutex); } RecMutex::~RecMutex() diff --git a/tools/gen_scripts/gio_generate_docs.sh b/tools/gen_scripts/gio_generate_docs.sh index 190163a..edad682 100755 --- a/tools/gen_scripts/gio_generate_docs.sh +++ b/tools/gen_scripts/gio_generate_docs.sh @@ -1,13 +1,11 @@ #!/bin/bash -# Note that docextract_to_xml.py should be in PATH for this script to work and +# Note that # JHBUILD_SOURCES should be defined to contain the path to the root of the -# jhbuild sources. The script assumes that it resides in the tools/gen_scripts -# directory and the XML file will be placed in gio/src. +# jhbuild sources. The XML files will be placed in glib/src. -if [ -z "$JHBUILD_SOURCES" -o ! -x "`which docextract_to_xml.py`" ]; then - echo -e "JHBUILD_SOURCES must contain path to jhbuild sources and \ -docextract_to_xml.py\nneeds to be executable and in PATH." +if [ -z "$JHBUILD_SOURCES" ]; then + echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources." exit 1; fi @@ -19,4 +17,5 @@ for dir in "$PREFIX"/glib/gio; do PARAMS="$PARAMS -s $dir" done -docextract_to_xml.py $PARAMS > "$OUT_DIR"/gio_docs.xml +DOCEXTRACT_TO_XML_PY="$JHBUILD_SOURCES/glibmm/tools/defs_gen/docextract_to_xml.py" +$DOCEXTRACT_TO_XML_PY $PARAMS > "$OUT_DIR"/gio_docs.xml diff --git a/tools/gen_scripts/gio_generate_enums.sh b/tools/gen_scripts/gio_generate_enums.sh index d8c6f6d..dd6d2a4 100755 --- a/tools/gen_scripts/gio_generate_enums.sh +++ b/tools/gen_scripts/gio_generate_enums.sh @@ -1,13 +1,11 @@ #!/bin/bash -# Note that enum.pl should be in PATH for this script to work and +# Note that # JHBUILD_SOURCES should be defined to contain the path to the root of the -# jhbuild sources. The script assumes that it resides in the tools/gen_scripts -# directory and the defs files will be placed in gio/src. +# jhbuild sources. The defs files will be placed in glib/src. -if [ -z "$JHBUILD_SOURCES" -o ! -x "`which enum.pl`" ]; then - echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources and \ -enum.pl\nneeds to be executable and in PATH." +if [ -z "$JHBUILD_SOURCES" ]; then + echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources." exit 1; fi @@ -15,5 +13,6 @@ PREFIX="$JHBUILD_SOURCES/glib" ROOT_DIR="$(dirname "$0")/../.." OUT_DIR="$ROOT_DIR/gio/src" -enum.pl "$PREFIX"/gio/*.h > "$OUT_DIR"/gio_enums.defs +ENUM_PL="$JHBUILD_SOURCES/glibmm/tools/enum.pl" +$ENUM_PL "$PREFIX"/gio/*.h > "$OUT_DIR"/gio_enums.defs patch "$OUT_DIR"/gio_enums.defs "$OUT_DIR"/gio_enums.defs.patch diff --git a/tools/gen_scripts/gio_generate_extra_defs.sh b/tools/gen_scripts/gio_generate_extra_defs.sh index b57683b..b6b77e2 100755 --- a/tools/gen_scripts/gio_generate_extra_defs.sh +++ b/tools/gen_scripts/gio_generate_extra_defs.sh @@ -1,7 +1,6 @@ #!/bin/bash -# Note that JHBUILD_SOURCES should be defined to contain the path to the root -# of the jhbuild sources. The script assumes that it resides in the +# This script assumes that it resides in the # tools/gen_scripts directory and the defs files will be placed in gio/src. ROOT_DIR="$(dirname "$0")/../.." diff --git a/tools/gen_scripts/gio_generate_methods.sh b/tools/gen_scripts/gio_generate_methods.sh index 29add54..711c9c5 100755 --- a/tools/gen_scripts/gio_generate_methods.sh +++ b/tools/gen_scripts/gio_generate_methods.sh @@ -1,13 +1,11 @@ #!/bin/bash -# Note that h2def.py should be in PATH for this script to work and +# Note that # JHBUILD_SOURCES should be defined to contain the path to the root of the -# jhbuild sources. The script assumes that it resides in the tools/gen_scripts -# directory and the defs files will be placed in gio/src. +# jhbuild sources. The defs files will be placed in glib/src. -if [ -z "$JHBUILD_SOURCES" -o ! -x "`which h2def.py`" ]; then - echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources and \ -h2def.py\nneeds to be executable and in PATH." +if [ -z "$JHBUILD_SOURCES" ]; then + echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources." exit 1; fi @@ -15,5 +13,6 @@ PREFIX="$JHBUILD_SOURCES/glib" ROOT_DIR="$(dirname "$0")/../.." OUT_DIR="$ROOT_DIR/gio/src" -h2def.py "$PREFIX"/gio/*.h > "$OUT_DIR"/gio_methods.defs +H2DEF_PY="$JHBUILD_SOURCES/glibmm/tools/defs_gen/h2def.py" +$H2DEF_PY "$PREFIX"/gio/*.h > "$OUT_DIR"/gio_methods.defs #patch "$OUT_DIR"/gio_methods.defs "$OUT_DIR"/gio_methods.defs.patch diff --git a/tools/gen_scripts/glib_generate_docs.sh b/tools/gen_scripts/glib_generate_docs.sh index 3f23190..cb841cb 100755 --- a/tools/gen_scripts/glib_generate_docs.sh +++ b/tools/gen_scripts/glib_generate_docs.sh @@ -1,13 +1,11 @@ #!/bin/bash -# Note that docextract_to_xml.py should be in PATH for this script to work and +# Note that # JHBUILD_SOURCES should be defined to contain the path to the root of the -# jhbuild sources. The script assumes that it resides in the tools/gen_scripts -# directory and the XML file will be placed in glib/src. +# jhbuild sources. The XML files will be placed in glib/src. -if [ -z "$JHBUILD_SOURCES" -o ! -x "`which docextract_to_xml.py`" ]; then - echo -e "JHBUILD_SOURCES must contain path to jhbuild sources and \ -docextract_to_xml.py\nneeds to be executable and in PATH." +if [ -z "$JHBUILD_SOURCES" ]; then + echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources." exit 1; fi @@ -19,4 +17,5 @@ for dir in "$PREFIX"/glib/{glib,gmodule,gobject,gthread}; do PARAMS="$PARAMS -s $dir" done -docextract_to_xml.py $PARAMS > "$OUT_DIR/glib_docs.xml" +DOCEXTRACT_TO_XML_PY="$JHBUILD_SOURCES/glibmm/tools/defs_gen/docextract_to_xml.py" +$DOCEXTRACT_TO_XML_PY $PARAMS > "$OUT_DIR/glib_docs.xml" diff --git a/tools/gen_scripts/glib_generate_enums.sh b/tools/gen_scripts/glib_generate_enums.sh index 9cd99ee..c7bca21 100755 --- a/tools/gen_scripts/glib_generate_enums.sh +++ b/tools/gen_scripts/glib_generate_enums.sh @@ -1,13 +1,12 @@ #!/bin/bash -# Note that enum.pl should be in PATH for this script to work and +# Note that # JHBUILD_SOURCES should be defined to contain the path to the root of the # jhbuild sources. The script assumes that it resides in the tools/gen_scripts # directory and the defs files will be placed in glib/src. -if [ -z "$JHBUILD_SOURCES" -o ! -x "`which enum.pl`" ]; then - echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources and \ -enum.pl\nneeds to be executable and in PATH." +if [ -z "$JHBUILD_SOURCES" ]; then + echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources." exit 1; fi @@ -15,8 +14,9 @@ PREFIX="$JHBUILD_SOURCES/glib" ROOT_DIR="$(dirname "$0")/../.." OUT_DIR="$ROOT_DIR/glib/src" -enum.pl "$PREFIX"/glib/*.h "$PREFIX"/glib/deprecated/*.h > "$OUT_DIR"/glib_enums.defs +ENUM_PL="$JHBUILD_SOURCES/glibmm/tools/enum.pl" +$ENUM_PL "$PREFIX"/glib/*.h "$PREFIX"/glib/deprecated/*.h > "$OUT_DIR"/glib_enums.defs patch "$OUT_DIR"/glib_enums.defs "$OUT_DIR"/glib_enums.defs.patch -enum.pl "$PREFIX"/gmodule/*.h > "$OUT_DIR"/gmodule_enums.defs -enum.pl "$PREFIX"/gobject/*.h > "$OUT_DIR"/gobject_enums.defs +$ENUM_PL "$PREFIX"/gmodule/*.h > "$OUT_DIR"/gmodule_enums.defs +$ENUM_PL "$PREFIX"/gobject/*.h > "$OUT_DIR"/gobject_enums.defs diff --git a/tools/gen_scripts/glib_generate_extra_defs.sh b/tools/gen_scripts/glib_generate_extra_defs.sh index 37296b0..217d7e0 100755 --- a/tools/gen_scripts/glib_generate_extra_defs.sh +++ b/tools/gen_scripts/glib_generate_extra_defs.sh @@ -1,7 +1,6 @@ #!/bin/bash -# Note that JHBUILD_SOURCES should be defined to contain the path to the root -# of the jhbuild sources. The script assumes that it resides in the +# This script assumes that it resides in the # tools/gen_scripts directory and the defs files will be placed in glib/src. ROOT_DIR="$(dirname "$0")/../.." diff --git a/tools/gen_scripts/glib_generate_methods.sh b/tools/gen_scripts/glib_generate_methods.sh index 32f2680..e585b45 100755 --- a/tools/gen_scripts/glib_generate_methods.sh +++ b/tools/gen_scripts/glib_generate_methods.sh @@ -1,13 +1,11 @@ #!/bin/bash -# Note that h2def.py should be in PATH for this script to work and +# Note that # JHBUILD_SOURCES should be defined to contain the path to the root of the -# jhbuild sources. The script assumes that it resides in the tools/gen_scripts -# directory and the defs files will be placed in glib/src. +# jhbuild sources. The defs files will be placed in glib/src. -if [ -z "$JHBUILD_SOURCES" -o ! -x "`which h2def.py`" ]; then - echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources and \ -h2def.py\nneeds to be executable and in PATH." +if [ -z "$JHBUILD_SOURCES" ]; then + echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources." exit 1; fi @@ -15,8 +13,9 @@ PREFIX="$JHBUILD_SOURCES/glib" ROOT_DIR="$(dirname "$0")/../.." OUT_DIR="$ROOT_DIR/glib/src" -h2def.py "$PREFIX"/glib/*.h "$PREFIX"/glib/deprecated/*.h > "$OUT_DIR"/glib_functions.defs +H2DEF_PY="$JHBUILD_SOURCES/glibmm/tools/defs_gen/h2def.py" +$H2DEF_PY "$PREFIX"/glib/*.h "$PREFIX"/glib/deprecated/*.h > "$OUT_DIR"/glib_functions.defs patch "$OUT_DIR"/glib_functions.defs "$OUT_DIR"/glib_functions.defs.patch -h2def.py "$PREFIX"/gmodule/*.h > "$OUT_DIR"/gmodule_functions.defs -h2def.py "$PREFIX"/gobject/*.h > "$OUT_DIR"/gobject_functions.defs +$H2DEF_PY "$PREFIX"/gmodule/*.h > "$OUT_DIR"/gmodule_functions.defs +$H2DEF_PY "$PREFIX"/gobject/*.h > "$OUT_DIR"/gobject_functions.defs -- 2.7.4