Imported Upstream version 1.69.0 upstream/1.69.0
authorDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 2 Nov 2021 06:42:27 +0000 (15:42 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 2 Nov 2021 06:42:27 +0000 (15:42 +0900)
79 files changed:
.gitlab-ci.yml
.gitlab-ci/Dockerfile
.gitlab-ci/minimal.Dockerfile
.gitlab-ci/run-docker-minimal.sh
.gitlab-ci/run-docker.sh
.gitlab-ci/test-msvc.bat
.gitlab-ci/test-msys2-meson.sh
MSVC.README.rst
NEWS
docs/g-ir-doc-tool.1 [new file with mode: 0644]
docs/gir-1.2.rnc
docs/meson.build
docs/reference/gi-docs.xml
docs/reference/gi-sections.txt
docs/website/annotations/giannotations.rst
docs/website/goals.rst
docs/website/tools/Makefile
docs/website/tools/g-ir-doc-tool.rst [new file with mode: 0644]
docs/website/tools/index.rst
docs/website/users.rst
docs/website/writingbindableapis.rst
docs/website/writingbindings/libgirepository.rst
gir/gio-2.0.c
gir/glib-2.0.c
gir/gmodule-2.0.c
gir/gobject-2.0.c
gir/meson.build
girepository/gdump.c
girepository/gicallableinfo.c
girepository/gifunctioninfo.c
girepository/ginvoke.c
girepository/giobjectinfo.c
girepository/giobjectinfo.h
girepository/gipropertyinfo.c
girepository/gipropertyinfo.h
girepository/girnode.c
girepository/girnode.h
girepository/girparser.c
girepository/girwriter.c
girepository/gitypelib-internal.h
girepository/gitypelib.c
girepository/giversionmacros.h
girepository/meson.build
giscanner/annotationparser.py
giscanner/ast.py
giscanner/dumper.py
giscanner/gdumpparser.py
giscanner/girparser.py
giscanner/girwriter.py
giscanner/introspectablepass.py
giscanner/maintransformer.py
giscanner/meson.build
giscanner/scannerlexer.l
giscanner/scannerparser.y
giscanner/transformer.py
meson.build
subprojects/glib.wrap
subprojects/libffi.wrap
subprojects/proxy-libintl.wrap
subprojects/zlib.wrap
tests/gimarshallingtests.c
tests/gimarshallingtests.h
tests/meson.build
tests/offsets/meson.build
tests/repository/gitestrepo.c
tests/scanner/Regress-1.0-C-expected/Regress.TestObj.get_string.page [new file with mode: 0644]
tests/scanner/Regress-1.0-C-expected/Regress.TestObj.set_string.page [new file with mode: 0644]
tests/scanner/Regress-1.0-Gjs-expected/Regress.TestObj.get_string.page [new file with mode: 0644]
tests/scanner/Regress-1.0-Gjs-expected/Regress.TestObj.set_string.page [new file with mode: 0644]
tests/scanner/Regress-1.0-Python-expected/Regress.TestObj.get_string.page [new file with mode: 0644]
tests/scanner/Regress-1.0-Python-expected/Regress.TestObj.set_string.page [new file with mode: 0644]
tests/scanner/Regress-1.0-expected.gir
tests/scanner/Regress-1.0-sections-expected.txt
tests/scanner/meson.build
tests/scanner/regress.c
tests/scanner/regress.h
tools/compiler.c
tools/g-ir-tool-template.in
tools/meson.build

index 10124cb..5f455f5 100644 (file)
@@ -2,37 +2,42 @@ stages:
   - build
   - deploy
 
-image: registry.gitlab.gnome.org/gnome/gobject-introspection:v8
+image: registry.gitlab.gnome.org/gnome/gobject-introspection:v9
 
 cache:
   paths:
     - _ccache/
 
+variables:
+  COMMON_MESON_FLAGS: "--prefix /usr --libdir lib64 --buildtype=debug -Dglib:werror=false -Dcairo=enabled -Dpython=python3"
+
 example-meson:
   stage: build
+  variables:
+    EXTRA_MESON_FLAGS: "-Ddoctool=enabled -Dgtk_doc=true"
   script:
-    - python3 -m pip install --user mako markdown
-    - meson --prefix /usr --libdir /usr/lib64 --buildtype debug -Ddoctool=enabled -Dgtk_doc=true -Dcairo=enabled -Dpython=python3 _build .
-    - ninja -C _build
-    - sudo ninja -C _build install
+    - meson setup ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} _build .
+    - meson compile -C _build
+    - sudo meson install -C _build
     - g-ir-scanner --version
     - cd examples/library
-    - meson --prefix /usr --default-library both _build
-    - ninja -C _build
-    - sudo ninja -C _build install
+    - meson setup --prefix /usr --default-library=both _build .
+    - meson compile -C _build
+    - sudo meson install -C _build
     - g-ir-inspect --print-typelibs --print-shlibs GISample
     # also build a small program using libgirepository
     - cd ../girepository
-    - meson _build
-    - ninja -C _build
+    - meson setup _build
+    - meson compile -C _build
 
 example-autotools:
   stage: build
+  variables:
+    EXTRA_MESON_FLAGS: "-Ddoctool=enabled -Dgtk_doc=true"
   script:
-    - python3 -m pip install --user mako markdown
-    - meson --prefix /usr --libdir /usr/lib64 --buildtype debug -Ddoctool=enabled -Dgtk_doc=true -Dcairo=enabled -Dpython=python3 _build .
-    - ninja -C _build
-    - sudo ninja -C _build install
+    - meson setup ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} _build .
+    - meson compile -C _build
+    - sudo meson install -C _build
     - g-ir-scanner --version
     - cd examples/library
     - ./autogen.sh --prefix /usr
@@ -45,20 +50,17 @@ fedora-x86_64-meson:
   variables:
     CCACHE_BASEDIR: "${CI_PROJECT_DIR}"
     CCACHE_DIR: "${CI_PROJECT_DIR}/_ccache"
-    CFLAGS: "-Werror"
+    EXTRA_MESON_FLAGS: "-Ddoctool=enabled -Dgtk_doc=true -Dwerror=true"
   script:
-    - python3 -m pip install --user mako markdown
-    - meson --prefix /usr --libdir /usr/lib64 --buildtype debug -Ddoctool=enabled -Dgtk_doc=true -Dcairo=enabled -Dpython=python3 _build .
-    - cd _build
-    - ninja
-    - meson test --print-errorlogs --suite=gobject-introspection --no-suite=glib
-    - ninja gi-doc
-    - cd ..
+    - meson setup ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} _build .
+    - meson compile -C _build
+    - meson test -C _build --print-errorlogs --suite=gobject-introspection --no-suite=glib
+    - ninja -C _build gi-doc
     - mkdir -p public
     - mv _build/docs/reference/html/ public/girepository/
     - python3 -m pip install --user flake8 mypy==0.790
     - python3 -m flake8 --count
-    - python3 -m mypy .
+    - python3 -m mypy _build
   except:
     - tags
   artifacts:
@@ -69,16 +71,34 @@ fedora-x86_64-meson:
       - public
 
 fedora-x86_64-subprojects:
-  image: registry.gitlab.gnome.org/gnome/gobject-introspection:min-v1
+  image: registry.gitlab.gnome.org/gnome/gobject-introspection:min-v2
+  stage: build
+  variables:
+    CCACHE_BASEDIR: "${CI_PROJECT_DIR}"
+    CCACHE_DIR: "${CI_PROJECT_DIR}/_ccache"
+  script:
+    - meson setup _build .
+    - meson compile -C _build
+    - meson test -C _build --print-errorlogs --suite=gobject-introspection
+  except:
+    - tags
+  artifacts:
+    when: always
+    name: "gi-_${CI_COMMIT_REF_NAME}"
+    paths:
+      - "${CI_PROJECT_DIR}/_build/meson-logs"
+      - public
+
+fedora-x86_64-no-introspection-data:
   stage: build
   variables:
     CCACHE_BASEDIR: "${CI_PROJECT_DIR}"
     CCACHE_DIR: "${CI_PROJECT_DIR}/_ccache"
+    EXTRA_MESON_FLAGS: "-Dwerror=true"
   script:
-    - meson _build .
-    - cd _build
-    - ninja
-    - meson test --print-errorlogs --suite=gobject-introspection
+    - meson setup ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} _build .
+    - meson compile -C _build
+    - meson test -C _build --print-errorlogs --suite=gobject-introspection --no-suite=glib
   except:
     - tags
   artifacts:
@@ -95,11 +115,9 @@ fedora-x86_64-python3.6:
     CCACHE_DIR: "${CI_PROJECT_DIR}/_ccache"
     PYENV_VERSION: "3.6.12"
   script:
-    - python3 -m pip install --user mako markdown
-    - meson --prefix /usr --libdir /usr/lib64 --buildtype debug -Ddoctool=enabled -Dgtk_doc=true -Dcairo=enabled -Dpython=python3 _build .
-    - cd _build
-    - ninja
-    - meson test --print-errorlogs --suite=gobject-introspection --no-suite=glib
+    - meson setup ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} _build .
+    - meson compile -C _build
+    - meson test -C _build --print-errorlogs --suite=gobject-introspection --no-suite=glib
   except:
     - tags
   artifacts:
@@ -109,12 +127,12 @@ fedora-x86_64-python3.6:
       - "${CI_PROJECT_DIR}/_build/meson-logs"
       - public
 
-msys2-mingw32-meson:
+msys2-mingw64-meson:
   stage: build
   tags:
     - win32-ps
   variables:
-    MSYSTEM: "MINGW32"
+    MSYSTEM: "MINGW64"
     CHERE_INVOKING: "yes"
   script:
     - C:\msys64\usr\bin\pacman --noconfirm -Syyuu --ask 20
index 23cfc79..bab0528 100644 (file)
@@ -1,4 +1,4 @@
-FROM fedora:29
+FROM fedora:34
 
 RUN dnf -y install \
     autoconf \
@@ -39,6 +39,8 @@ RUN dnf -y install \
     pcre-devel \
     python3 \
     python3-devel \
+    python3-mako \
+    python3-markdown \
     python3-pip \
     python3-wheel \
     readline-devel \
@@ -49,7 +51,7 @@ RUN dnf -y install \
     zlib-devel \
  && dnf clean all
 
-RUN pip3 install meson==0.50.1
+RUN pip3 install meson==0.55.3
 
 ARG HOST_USER_ID=5555
 ENV HOST_USER_ID ${HOST_USER_ID}
index b33aa64..d9a3199 100644 (file)
@@ -1,4 +1,4 @@
-FROM fedora:29
+FROM fedora:34
 
 RUN dnf -y install \
     flex \
@@ -6,16 +6,17 @@ RUN dnf -y install \
     gcc \
     gcc-c++ \
     git \
+    libmount-devel \
     ninja-build \
+    pcre-devel \
     pkgconf \
     python3 \
     python3-devel \
     python3-pip \
     python3-wheel \
-    libmount-devel \
  && dnf clean all
 
-RUN pip3 install meson==0.52.0
+RUN pip3 install meson==0.55.3
 
 ARG HOST_USER_ID=5555
 ENV HOST_USER_ID ${HOST_USER_ID}
index 36b2d37..ffb8bf5 100755 (executable)
@@ -1,11 +1,32 @@
 #!/bin/bash
 
+if [ ! -x "$(command -v docker)" ] || [ docker --help |& grep -q podman ]; then
+        # Docker is actually implemented by podman, and its OCI output
+        # is incompatible with some of the dockerd instances on GitLab
+        # CI runners.
+        echo "Using: Podman"
+        format="--format docker"
+        CMD="podman"
+else
+        echo "Using: Docker"
+        format=""
+        CMD="sudo docker"
+fi
+
 set -e
 
-TAG="registry.gitlab.gnome.org/gnome/gobject-introspection:min-v1"
+REGISTRY="registry.gitlab.gnome.org/gnome/gobject-introspection"
+TAG="${REGISTRY}:min-v2"
+
+${CMD} build \
+        ${format} \
+        --build-arg HOST_USER_ID="$UID" \
+        --tag "${TAG}" \
+        --file "minimal.Dockerfile" .
 
-sudo docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" \
-    --file "minimal.Dockerfile" .
-sudo docker run --rm \
-    --volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \
-    --tty --interactive "${TAG}" bash
+${CMD} run \
+        --rm \
+        --volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \
+        --tty --interactive \
+        "${TAG}" \
+        bash
index ad73d3b..8c11a37 100755 (executable)
@@ -1,11 +1,31 @@
 #!/bin/bash
 
+if [ ! -x "$(command -v docker)" ] || [ docker --help |& grep -q podman ]; then
+        # Docker is actually implemented by podman, and its OCI output
+        # is incompatible with some of the dockerd instances on GitLab
+        # CI runners.
+        echo "Using: Podman"
+        format="--format docker"
+        CMD="podman"
+else
+        echo "Using: Docker"
+        format=""
+        CMD="sudo docker"
+fi
+
 set -e
 
-TAG="registry.gitlab.gnome.org/gnome/gobject-introspection:v8"
+REGISTRY="registry.gitlab.gnome.org/gnome/gobject-introspection"
+TAG="${REGISTRY}:v9"
 
-sudo docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" \
-    --file "Dockerfile" .
-sudo docker run --rm \
-    --volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \
-    --tty --interactive "${TAG}" bash
+${CMD} build \
+        ${format} \
+        --build-arg HOST_USER_ID="$UID" \
+        --tag "${TAG}" \
+        --file "Dockerfile" .
+${CMD} run \
+        --rm \
+        --volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \
+        --tty --interactive \
+        "${TAG}" \
+        bash
index 549d4fd..f9699ba 100644 (file)
@@ -9,10 +9,13 @@ py -3 -c "import urllib.request, sys; urllib.request.urlretrieve(*sys.argv[1:])"
 
 SET PATH=%CD%;%CD%\win_flex_bison;%PATH%
 
-pip3 install --upgrade --user meson==0.50.1 || goto :error
-meson _build || goto :error
-ninja -C _build || goto :error
+pip3 install --upgrade --user meson==0.55.3 || goto :error
 
+meson subprojects download glib
+meson wrap promote subprojects\glib\subprojects\libpcre.wrap
+
+meson setup _build || goto :error
+meson compile -C _build || goto :error
 meson test -C _build --suite=gobject-introspection || goto :error
 
 goto :EOF
index 56f8c9b..ead7bf7 100644 (file)
@@ -2,7 +2,6 @@
 
 set -e
 
-export PATH="/c/msys64/$MSYSTEM/bin:$PATH"
 if [[ "$MSYSTEM" == "MINGW32" ]]; then
     export MSYS2_ARCH="i686"
 else
@@ -31,7 +30,7 @@ pacman --noconfirm -S --needed \
 export CCACHE_BASEDIR="${CI_PROJECT_DIR}"
 export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
 
-pip3 install --upgrade --user meson==0.50.1 flake8 mypy==0.790
+pip3 install --upgrade --user meson==0.55.3 flake8 mypy==0.790
 export PATH="$HOME/.local/bin:$PATH"
 
 export CFLAGS="-Werror"
@@ -43,4 +42,4 @@ meson test --print-errorlogs --suite=gobject-introspection --no-suite=glib
 cd ..
 
 python3 -m flake8 --count
-python3 -m mypy .
\ No newline at end of file
+python3 -m mypy _build
index ec5ddb5..0c0dd40 100644 (file)
@@ -71,7 +71,7 @@ using Ninja or the generated Visual Studio projects.
 Additional notes for building and running against Python 3.8.x and later
 ------------------------------------------------------------------------
 Python 3.8.x and later made restrictions on where DLLs are searched for third-party
-modules, which will therefore affect how the Python tools in tools/ look for dependent
+modules, which will therefore affect how the Python tools in ``tools/`` look for dependent
 DLLs, as they rely on a C Python module, _giscanner.pyd, as the paths in %PATH% are
 no longer referred to, except for system-supplied DLLs in their designated locations
 on the system.  In order to cope with this, DLLs are being searched for in the
diff --git a/NEWS b/NEWS
index 28e21cb..1c564c4 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,19 @@
+1.69.0 - 2021-08-24
+-------------------
+
+* Fix build when gobject-introspection is a subproject :mr:`266`
+* Add more float types :issue:`384`, :mr:`269`
+* Make test suite work with cross-related options :issue:`227`
+* Fix several leaks found by Coverity :mr:`272`
+* Fix enum member c:identifier :mr:`264`
+* Add g-ir-doc-tool man page :mr:`284`
+* Export warnlib sources as variables :mr:`287`
+* Update the GLib annotations :mr:`288`
+* Add "final" class attribute :mr:`257`, :mr:`291`
+* Add option to make .gir files installation paths configurable :mr:`63`
+* Handle constructors with mismatched GTypes :issue:`399`, :mr:`292`
+* Add property accessors annotations :issue:`13`, :mr:`279`
+
 1.68.0 - 2021-03-19
 -------------------
 
diff --git a/docs/g-ir-doc-tool.1 b/docs/g-ir-doc-tool.1
new file mode 100644 (file)
index 0000000..dabec8f
--- /dev/null
@@ -0,0 +1,74 @@
+.\" Man page generated from reStructuredText.
+.
+.TH G-IR-DOC-TOOL 1 "" "" ""
+.SH NAME
+g-ir-doc-tool \- Documentation builder
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+\fBg\-ir\-doc\-tool\fP [OPTION...] GIRFILE
+.SH DESCRIPTION
+.sp
+g\-ir\-doc\-tool builds library documentation directly from .gir files. The output
+is adjusted according to which programming language you\(aqre generating docs for.
+.SH OPTIONS
+.INDENT 0.0
+.TP
+.B \-\-help
+Show help options
+.TP
+.BI \-\-output\fB= DIRECTORY
+Save the resulting output in DIRECTORY.
+.TP
+.BI \-\-format\fB= FORMAT
+Output format. One of devdocs, mallard or sections.
+.TP
+.BI \-\-language\fB= LANGUAGE
+Output language. One of c, python, or gjs.
+.TP
+.BI \-\-add\-include\-path\fB= DIRECTORY
+Adds a directory which will be used to find includes inside the GIR format.
+.TP
+.B \-\-version
+Show program\(aqs version number and exit
+.TP
+.B \-\-write\-sections\-file
+Backwards\-compatible equivalent to \-f sections.
+.UNINDENT
+.SH BUGS
+.sp
+Report bugs at \fI\%https://gitlab.gnome.org/GNOME/gobject\-introspection/issues\fP
+.SH HOMEPAGE AND CONTACT
+.sp
+\fI\%https://gi.readthedocs.io/\fP
+.SH AUTHORS
+.sp
+David King
+.\" Generated by docutils manpage writer.
+.
index a647811..64443f7 100644 (file)
@@ -170,6 +170,8 @@ grammar {
       attribute abstract { "0" | "1" }?,
       ## Binary attribute to declare the class fundamental or not (top-level class which do not derives from any other type)
       attribute glib:fundamental { "0" | "1" }?,
+      ## Binary attribute to declare the class final or not (non-derivable class in a derivable hierarchy)
+      attribute final { "0" | "1" }?,
 
       # Other elements a class can contain
       (Info.elements
@@ -345,6 +347,10 @@ grammar {
       attribute construct { "0" | "1" }?,
       ## Binary attribute, true if the property can only be set upon construction
       attribute construct-only { "0" | "1" }?,
+      ## The setter function for this property
+      attribute setter { xsd:string }?,
+      ## The getter function for this property
+      attribute getter { xsd:string }?,
       # Define the transfer of ownership of the property element
       TransferOwnership?,
 
@@ -354,20 +360,20 @@ grammar {
     }
 
   Signal =
-    ## A signal as defined in the GObject system (https://developer.gnome.org/gobject/stable/signal.html)
+    ## A signal as defined in the GObject system (https://developer-old.gnome.org/gobject/stable/signal.html)
     element glib:signal {
       Info.attrs,
       ## name of the signal
       attribute name { xsd:string },
-      ## Binary attribute, true if the signal has a detailed parameter (https://developer.gnome.org/gobject/stable/signal.html#signal-detail# and https://developer.gnome.org/gobject/unstable/gobject-Signals.html#GSignalFlags)
+      ## Binary attribute, true if the signal has a detailed parameter (https://developer-old.gnome.org/gobject/stable/signal.html#signal-detail and https://developer-old.gnome.org/gobject/stable/gobject-Signals.html#GSignalFlags)
       attribute detailed { "0" | "1" }?,
-      ## When to run the signal during the 5 steps of signal emission (https://developer.gnome.org/gobject/stable/signal.html#signal-emission and https://developer.gnome.org/gobject/unstable/gobject-Signals.html#GSignalFlags)
+      ## When to run the signal during the 5 steps of signal emission (https://developer-old.gnome.org/gobject/stable/signal.html#signal-emission and https://developer-old.gnome.org/gobject/stable/gobject-Signals.html#GSignalFlags)
       attribute when { "first" | "last" | "cleanup" }?,
-      ## Binary attribute, true if the signal can be freely emitted on alive objects from user code (https://developer.gnome.org/gobject/unstable/gobject-Signals.html#GSignalFlags)
+      ## Binary attribute, true if the signal can be freely emitted on alive objects from user code (https://developer-old.gnome.org/gobject/stable/gobject-Signals.html#GSignalFlags)
       attribute action { "0" | "1" }?,
-      ## Binary attribute, true if no emission hooks are supported for this signal (https://developer.gnome.org/gobject/unstable/gobject-Signals.html#GSignalFlags) 
+      ## Binary attribute, true if no emission hooks are supported for this signal (https://developer-old.gnome.org/gobject/stable/gobject-Signals.html#GSignalFlags) 
       attribute no-hooks { "0" | "1" }?,
-      ## Binary attribute, true if signals emitted for an object while currently being in emission for this very object will not be emitted recursively, but instead cause the first emission to be restarted (https://developer.gnome.org/gobject/unstable/gobject-Signals.html#GSignalFlags)
+      ## Binary attribute, true if signals emitted for an object while currently being in emission for this very object will not be emitted recursively, but instead cause the first emission to be restarted (https://developer-old.gnome.org/gobject/stable/gobject-Signals.html#GSignalFlags)
       attribute no-recurse { "0" | "1" }?,
 
       # Other elements a property can contain
@@ -591,6 +597,11 @@ grammar {
     element method {
       Callable.attrs,
 
+      ## The GObject property that is set by this method
+      attribute glib:set-property { xsd:string }?,
+      ## The GObject property that is retrieved by this method
+      attribute glib:get-property { xsd:string }?,
+
       (Info.elements
        & Callable.params?
        & Callable.return?)
@@ -679,8 +690,10 @@ grammar {
       attribute value { xsd:string },
       ## corresponding C type of the member
       attribute c:identifier { xsd:string },
-      ## short nickname of the member
+      ## short nickname of the member (from GEnumValue/GFlagsValue)
       attribute glib:nick { xsd:string }?,
+      ## name of the member (from GEnumValue/GFlagsValue)
+      attribute glib:name { xsd:string }?,
 
       Info.elements
     }
index 6c33587..84cae8c 100644 (file)
@@ -1,4 +1,4 @@
-install_man('g-ir-compiler.1', 'g-ir-generate.1', 'g-ir-scanner.1')
+install_man('g-ir-compiler.1', 'g-ir-doc-tool.1', 'g-ir-generate.1', 'g-ir-scanner.1')
 install_data('gir-1.2.rnc', install_dir: join_paths(get_option('datadir'), 'gir-1.0'))
 
 if get_option('gtk_doc')
index 741023d..abaedf2 100644 (file)
@@ -11,7 +11,7 @@
     <releaseinfo>
       This document is for libgirepository version &version;.
       The latest version of this documentation can be found on-line at
-      <ulink type="http" url="https://developer.gnome.org/gi/unstable/">https://developer.gnome.org/gi/unstable/</ulink>.
+      <ulink type="http" url="https://developer-old.gnome.org/gi/unstable/">https://developer-old.gnome.org/gi/unstable/</ulink>.
       <para>
         For more information on how to build libgirepository, for how to build
         bindings with it and for information on GObject Introspection in
index 0ba40c8..38e1a77 100644 (file)
@@ -248,6 +248,7 @@ GI_IS_OBJECT_INFO
 GIObjectInfo
 g_object_info_get_abstract
 g_object_info_get_fundamental
+g_object_info_get_final
 g_object_info_get_parent
 g_object_info_get_type_name
 g_object_info_get_type_init
@@ -300,6 +301,8 @@ GIPropertyInfo
 g_property_info_get_flags
 g_property_info_get_ownership_transfer
 g_property_info_get_type
+g_property_info_get_getter
+g_property_info_get_setter
 </SECTION>
 
 <SECTION>
index cacc20d..b37262f 100644 (file)
@@ -97,6 +97,34 @@ Support for GObject objects
     - This function is the invoker for a virtual method.
     - :commit:`v0.6.3 <fdbe3cc3>`
       :bzbug:`557383`
+  * - ``(set-property NAME)``
+    - identifier (only applies to methods)
+    - This function is the setter method for the given GObject property.
+      A setter function is defined as being the public function that is
+      called by the ``GObjectClass.set_property`` implementation in a
+      class.
+    - :issue:`13`
+  * - ``(get-property NAME)``
+    - identifier (only applies to methods)
+    - This function is the getter method for the given GObject property.
+      A getter function is defined as being the public function that is
+      called by the ``GObjectClass.get_property`` implementation in a
+      class.
+    - :issue:`13`
+  * - ``(setter SYMBOL)``
+    - identifier (only applies to properties)
+    - This GObject property is accessed by the given setter function.
+      A setter function is defined as being the public function that is
+      called by the ``GObjectClass.set_property`` implementation in a
+      class.
+    - :issue:`13`
+  * - ``(getter SYMBOL)``
+    - identifier (only applies to properties)
+    - This GObject property is accessed by the given getter function.
+      A getter function is defined as being the public function that is
+      called by the ``GObjectClass.get_property`` implementation in a
+      class.
+    - :issue:`13`
 
 
 Support for GObject closures
index a8ebe92..7fb73d6 100644 (file)
@@ -23,7 +23,7 @@ application logic such as configuration, layout, dialogs, etc.
 
   To achieve this goal you need to write your code using GObject convention.
   For more information about that, see the `GObject tutorial
-  <https://developer.gnome.org/gobject/stable/pt02.html>`__
+  <https://developer-old.gnome.org/gobject/stable/pt02.html>`__
 
 Thus, one of the major goals of the GObject introspection project is to be a
 convenient bridge between these two worlds, and allow you to choose the right
index 6fb8baf..eb352ee 100644 (file)
@@ -1,6 +1,6 @@
 # update man pages
 
-all: ../../g-ir-compiler.1 ../../g-ir-generate.1 ../../g-ir-scanner.1
+all: ../../g-ir-compiler.1 ../../g-ir-doc-tool.1 ../../g-ir-generate.1 ../../g-ir-scanner.1
 
 ../../%.1:%.rst
        rst2man $< > $@
@@ -8,4 +8,4 @@ all: ../../g-ir-compiler.1 ../../g-ir-generate.1 ../../g-ir-scanner.1
 .PHONY: clean
 
 clean:
-       rm -f ../../g-ir-compiler.1 ../../g-ir-generate.1 ../../g-ir-scanner.1
+       rm -f ../../g-ir-compiler.1 ../../g-ir-doc-tool.1 ../../g-ir-generate.1 ../../g-ir-scanner.1
diff --git a/docs/website/tools/g-ir-doc-tool.rst b/docs/website/tools/g-ir-doc-tool.rst
new file mode 100644 (file)
index 0000000..535ca05
--- /dev/null
@@ -0,0 +1,65 @@
+=============
+g-ir-doc-tool
+=============
+
+---------------------
+Documentation builder
+---------------------
+
+:Manual section: 1
+
+
+SYNOPSIS
+========
+
+**g-ir-doc-tool** [OPTION...] GIRFILE
+
+
+DESCRIPTION
+===========
+
+g-ir-doc-tool builds library documentation directly from .gir files. The output
+is adjusted according to which programming language you're generating docs for.
+
+
+OPTIONS
+=======
+
+--help
+    Show help options
+
+--output=DIRECTORY
+    Save the resulting output in DIRECTORY.
+
+--format=FORMAT
+    Output format. One of devdocs, mallard or sections.
+
+--language=LANGUAGE
+    Output language. One of c, python, or gjs.
+
+--add-include-path=DIRECTORY
+    Adds a directory which will be used to find includes inside the GIR format.
+
+--version
+    Show program's version number and exit
+
+--write-sections-file
+    Backwards-compatible equivalent to -f sections.
+
+
+BUGS
+====
+
+Report bugs at https://gitlab.gnome.org/GNOME/gobject-introspection/issues
+
+
+HOMEPAGE and CONTACT
+====================
+
+https://gi.readthedocs.io/
+
+
+AUTHORS
+=======
+
+David King
index 44897b6..df56e80 100644 (file)
@@ -8,12 +8,16 @@ Command Line Tools
   :maxdepth: 1
 
   g-ir-compiler
+  g-ir-doc-tool
   g-ir-generate
   g-ir-scanner
 
 :doc:`g-ir-compiler`
   Typelib compiler
 
+:doc:`g-ir-doc-tool`
+  Documentation builder
+
 :doc:`g-ir-generate`
   Typelib generator
 
index c2faf51..e355a22 100644 (file)
@@ -34,6 +34,7 @@ Bindings based on GObject-Introspection
 * `PLGI <https://github.com/keriharris/plgi>`__ - Prolog bindings (runtime)
 * `hbgi <https://github.com/tuffnatty/hbgi>`__ - Harbour bindings for GObject Introspection (runtime)
 * `cppgir <https://www.gitlab.com/mnauw/cppgir>`__ - C++ bindings (compile time, using typelib)
+* `crystal-gobject <https://github.com/jhass/crystal-gobject>`__ - gobject-introspection for Crystal (compile time)
 
 Projects using GObject Introspection
 ------------------------------------
index 70d3bbc..b9b0894 100644 (file)
@@ -10,12 +10,12 @@ Structures with custom memory management
 
 Avoid creating C structures with custom memory management unless they are
 registered as a `boxed type
-<https://developer.gnome.org/gobject/unstable/gobject-Boxed-Types.html>`__.
+<https://developer-old.gnome.org/gobject/stable/gobject-Boxed-Types.html>`__.
 If you don't register them as a boxed type bindings will fall back to
 simple memory copying, which might not be what you want.
 
 Also consider using a full `GObject
-<https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html>`__
+<https://developer-old.gnome.org/gobject/stable/gobject-The-Base-Object-Type.html>`__
 as that allows bindings to better integrate those objects with the binding
 language, like for example preserve user defined state across language
 boundaries.
index 86a3558..408956f 100644 (file)
@@ -7,7 +7,7 @@ typelib data and for interacting with the corresponding GObject based
 libraries.
 
 For more information about libgirepository see the `API documentation
-<https://developer.gnome.org/gi/stable>`__.
+<https://developer-old.gnome.org/gi/stable>`__.
 
 The following example shows how to call the ``g_assertion_message()`` function
 from libglib-2.0:
index c1ffdd0..eec568c 100644 (file)
  * of the other peer here after the connection has been successfully
  * initialized.
  *
+ * Note that the
+ * [D-Bus specification](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses)
+ * uses the term ‘UUID’ to refer to this, whereas GLib consistently uses the
+ * term ‘GUID’ for historical reasons.
+ *
+ * Despite its name, the format of #GDBusConnection:guid does not follow
+ * [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122) or the Microsoft
+ * GUID format.
+ *
  * Since: 2.26
  */
 
 /**
  * GDBusServer:guid:
  *
- * The guid of the server.
+ * The GUID of the server.
+ *
+ * See #GDBusConnection:guid for more details.
  *
  * Since: 2.26
  */
 
 
 /**
- * GDataOutputStream:byte-order:
+ * GDataInputStream:byte-order:
  *
- * Determines the byte ordering that is used when writing
- * multi-byte entities (such as integers) to the stream.
+ * The :byte-order property determines the byte ordering that
+ * is used when reading multi-byte entities (such as integers)
+ * from the stream.
  */
 
 
 /**
- * GDataStream:byte-order:
+ * GDataInputStream:newline-type:
  *
- * The ::byte-order property determines the byte ordering that
- * is used when reading multi-byte entities (such as integers)
- * from the stream.
+ * The :newline-type property determines what is considered
+ * as a line ending when reading complete lines from the stream.
  */
 
 
 /**
- * GDataStream:newline-type:
+ * GDataOutputStream:byte-order:
  *
- * The :newline-type property determines what is considered
- * as a line ending when reading complete lines from the stream.
+ * Determines the byte ordering that is used when writing
+ * multi-byte entities (such as integers) to the stream.
  */
 
 
 
 
 /**
+ * GDtlsConnection:ciphersuite-name: (nullable)
+ *
+ * The name of the DTLS ciphersuite in use. See g_dtls_connection_get_ciphersuite_name().
+ *
+ * Since: 2.70
+ */
+
+
+/**
  * GDtlsConnection:database: (nullable)
  *
  * The certificate database to use when verifying this TLS connection.
 
 
 /**
+ * GDtlsConnection:protocol-version:
+ *
+ * The DTLS protocol version in use. See g_dtls_connection_get_protocol_version().
+ *
+ * Since: 2.70
+ */
+
+
+/**
  * GDtlsConnection:rehandshake-mode:
  *
  * The rehandshaking mode. See
 
 
 /**
+ * GPowerProfileMonitor:
+ *
+ * #GPowerProfileMonitor monitors system power profile and notifies on
+ * changes.
+ *
+ * Since: 2.70
+ */
+
+
+/**
+ * GPowerProfileMonitor:power-saver-enabled:
+ *
+ * Whether “Power Saver” mode is enabled on the system.
+ *
+ * Since: 2.70
+ */
+
+
+/**
+ * GPowerProfileMonitorInterface:
+ * @g_iface: The parent interface.
+ *
+ * The virtual function table for #GPowerProfileMonitor.
+ *
+ * Since: 2.70
+ */
+
+
+/**
  * GPropertyAction:
  *
  * This type is opaque.
 
 
 /**
+ * GTlsCertificate:dns-names: (nullable) (element-type GBytes) (transfer container)
+ *
+ * The DNS names from the certificate's Subject Alternative Names (SANs),
+ * %NULL if unavailable.
+ *
+ * Since: 2.70
+ */
+
+
+/**
+ * GTlsCertificate:ip-addresses: (nullable) (element-type GInetAddress) (transfer container)
+ *
+ * The IP addresses from the certificate's Subject Alternative Names (SANs),
+ * %NULL if unavailable.
+ *
+ * Since: 2.70
+ */
+
+
+/**
  * GTlsCertificate:issuer:
  *
  * A #GTlsCertificate representing the entity that issued this
  * self-signed, or else the certificate of the issuer is not
  * available.
  *
+ * Beware the issuer certificate may not be the same as the
+ * certificate that would actually be used to construct a valid
+ * certification path during certificate verification.
+ * [RFC 4158](https://datatracker.ietf.org/doc/html/rfc4158) explains
+ * why an issuer certificate cannot be naively assumed to be part of the
+ * the certification path (though GLib's TLS backends may not follow the
+ * path building strategies outlined in this RFC). Due to the complexity
+ * of certification path building, GLib does not provide any way to know
+ * which certification path will actually be used. Accordingly, this
+ * property cannot be used to make security-related decisions. Only
+ * GLib itself should make security decisions about TLS certificates.
+ *
  * Since: 2.28
  */
 
 
 /**
+ * GTlsCertificate:issuer-name: (nullable)
+ *
+ * The issuer from the certificate,
+ * %NULL if unavailable.
+ *
+ * Since: 2.70
+ */
+
+
+/**
+ * GTlsCertificate:not-valid-after: (nullable)
+ *
+ * The time at which this cert is no longer valid,
+ * %NULL if unavailable.
+ *
+ * Since: 2.70
+ */
+
+
+/**
+ * GTlsCertificate:not-valid-before: (nullable)
+ *
+ * The time at which this cert is considered to be valid,
+ * %NULL if unavailable.
+ *
+ * Since: 2.70
+ */
+
+
+/**
  * GTlsCertificate:pkcs11-uri: (nullable)
  *
- * A URI referencing the PKCS \#11 objects containing an X.509 certificate
- * and optionally a private key.
+ * A URI referencing the [PKCS \#11](https://docs.oasis-open.org/pkcs11/pkcs11-base/v3.0/os/pkcs11-base-v3.0-os.html)
+ * objects containing an X.509 certificate and optionally a private key.
  *
- * If %NULL the certificate is either not backed by PKCS \#11 or the
+ * If %NULL, the certificate is either not backed by PKCS \#11 or the
  * #GTlsBackend does not support PKCS \#11.
  *
  * Since: 2.68
 
 
 /**
- * GTlsCertificate:private-key:
+ * GTlsCertificate:private-key: (nullable)
  *
  * The DER (binary) encoded representation of the certificate's
- * private key, in either PKCS#1 format or unencrypted PKCS#8
- * format. This property (or the #GTlsCertificate:private-key-pem
- * property) can be set when constructing a key (eg, from a file),
- * but cannot be read.
- *
- * PKCS#8 format is supported since 2.32; earlier releases only
- * support PKCS#1. You can use the `openssl rsa`
- * tool to convert PKCS#8 keys to PKCS#1.
+ * private key, in either [PKCS \#1 format](https://datatracker.ietf.org/doc/html/rfc8017)
+ * or unencrypted [PKCS \#8 format.](https://datatracker.ietf.org/doc/html/rfc5208)
+ * PKCS \#8 format is supported since 2.32; earlier releases only
+ * support PKCS \#1. You can use the `openssl rsa` tool to convert
+ * PKCS \#8 keys to PKCS \#1.
+ *
+ * This property (or the #GTlsCertificate:private-key-pem property)
+ * can be set when constructing a key (for example, from a file).
+ * Since GLib 2.70, it is now also readable; however, be aware that if
+ * the private key is backed by a PKCS \#11 URI – for example, if it
+ * is stored on a smartcard – then this property will be %NULL. If so,
+ * the private key must be referenced via its PKCS \#11 URI,
+ * #GTlsCertificate:private-key-pkcs11-uri. You must check both
+ * properties to see if the certificate really has a private key.
+ * When this property is read, the output format will be unencrypted
+ * PKCS \#8.
  *
  * Since: 2.28
  */
 
 
 /**
- * GTlsCertificate:private-key-pem:
+ * GTlsCertificate:private-key-pem: (nullable)
  *
  * The PEM (ASCII) encoded representation of the certificate's
- * private key in either PKCS#1 format ("`BEGIN RSA PRIVATE
- * KEY`") or unencrypted PKCS#8 format ("`BEGIN
- * PRIVATE KEY`"). This property (or the
- * #GTlsCertificate:private-key property) can be set when
- * constructing a key (eg, from a file), but cannot be read.
- *
- * PKCS#8 format is supported since 2.32; earlier releases only
- * support PKCS#1. You can use the `openssl rsa`
- * tool to convert PKCS#8 keys to PKCS#1.
+ * private key in either [PKCS \#1 format](https://datatracker.ietf.org/doc/html/rfc8017)
+ * ("`BEGIN RSA PRIVATE KEY`") or unencrypted
+ * [PKCS \#8 format](https://datatracker.ietf.org/doc/html/rfc5208)
+ * ("`BEGIN PRIVATE KEY`"). PKCS \#8 format is supported since 2.32;
+ * earlier releases only support PKCS \#1. You can use the `openssl rsa`
+ * tool to convert PKCS \#8 keys to PKCS \#1.
+ *
+ * This property (or the #GTlsCertificate:private-key property)
+ * can be set when constructing a key (for example, from a file).
+ * Since GLib 2.70, it is now also readable; however, be aware that if
+ * the private key is backed by a PKCS \#11 URI - for example, if it
+ * is stored on a smartcard - then this property will be %NULL. If so,
+ * the private key must be referenced via its PKCS \#11 URI,
+ * #GTlsCertificate:private-key-pkcs11-uri. You must check both
+ * properties to see if the certificate really has a private key.
+ * When this property is read, the output format will be unencrypted
+ * PKCS \#8.
  *
  * Since: 2.28
  */
 /**
  * GTlsCertificate:private-key-pkcs11-uri: (nullable)
  *
- * A URI referencing a PKCS \#11 object containing a private key.
+ * A URI referencing a [PKCS \#11](https://docs.oasis-open.org/pkcs11/pkcs11-base/v3.0/os/pkcs11-base-v3.0-os.html)
+ * object containing a private key.
  *
  * Since: 2.68
  */
 
 
 /**
+ * GTlsCertificate:subject-name: (nullable)
+ *
+ * The subject from the cert,
+ * %NULL if unavailable.
+ *
+ * Since: 2.70
+ */
+
+
+/**
  * GTlsClientConnection:
  *
  * Abstract base class for the backend-specific client connection
 
 
 /**
+ * GTlsConnection:ciphersuite-name: (nullable)
+ *
+ * The name of the TLS ciphersuite in use. See g_tls_connection_get_ciphersuite_name().
+ *
+ * Since: 2.70
+ */
+
+
+/**
  * GTlsConnection:database: (nullable)
  *
  * The certificate database to use when verifying this TLS connection.
 
 
 /**
+ * GTlsConnection:protocol-version:
+ *
+ * The TLS protocol version in use. See g_tls_connection_get_protocol_version().
+ *
+ * Since: 2.70
+ */
+
+
+/**
  * GTlsConnection:rehandshake-mode:
  *
  * The rehandshaking mode. See
  * respectively.
  *
  * For an example of opening files with a GApplication, see
- * [gapplication-example-open.c](https://git.gnome.org/browse/glib/tree/gio/tests/gapplication-example-open.c).
+ * [gapplication-example-open.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gapplication-example-open.c).
  *
  * For an example of using actions with GApplication, see
- * [gapplication-example-actions.c](https://git.gnome.org/browse/glib/tree/gio/tests/gapplication-example-actions.c).
+ * [gapplication-example-actions.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gapplication-example-actions.c).
  *
  * For an example of using extra D-Bus hooks with GApplication, see
- * [gapplication-example-dbushooks.c](https://git.gnome.org/browse/glib/tree/gio/tests/gapplication-example-dbushooks.c).
+ * [gapplication-example-dbushooks.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gapplication-example-dbushooks.c).
  */
 
 
  * }
  * ]|
  * The complete example can be found here:
- * [gapplication-example-cmdline.c](https://git.gnome.org/browse/glib/tree/gio/tests/gapplication-example-cmdline.c)
+ * [gapplication-example-cmdline.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gapplication-example-cmdline.c)
  *
  * In more complicated cases, the handling of the comandline can be
  * split between the launcher and the primary instance.
  * instance.
  *
  * The complete example can be found here:
- * [gapplication-example-cmdline2.c](https://git.gnome.org/browse/glib/tree/gio/tests/gapplication-example-cmdline2.c)
+ * [gapplication-example-cmdline2.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gapplication-example-cmdline2.c)
  *
  * If handling the commandline requires a lot of work, it may
  * be better to defer it.
  * hold the application until you are done with the commandline.
  *
  * The complete example can be found here:
- * [gapplication-example-cmdline3.c](https://git.gnome.org/browse/glib/tree/gio/tests/gapplication-example-cmdline3.c)
+ * [gapplication-example-cmdline3.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gapplication-example-cmdline3.c)
  */
 
 
  * ## An example D-Bus server # {#gdbus-server}
  *
  * Here is an example for a D-Bus server:
- * [gdbus-example-server.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-server.c)
+ * [gdbus-example-server.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gdbus-example-server.c)
  *
  * ## An example for exporting a subtree # {#gdbus-subtree-server}
  *
  * Here is an example for exporting a subtree:
- * [gdbus-example-subtree.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-subtree.c)
+ * [gdbus-example-subtree.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gdbus-example-subtree.c)
  *
  * ## An example for file descriptor passing # {#gdbus-unix-fd-client}
  *
  * Here is an example for passing UNIX file descriptors:
- * [gdbus-unix-fd-client.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-unix-fd-client.c)
+ * [gdbus-unix-fd-client.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gdbus-example-unix-fd-client.c)
  *
  * ## An example for exporting a GObject # {#gdbus-export}
  *
  * Here is an example for exporting a #GObject:
- * [gdbus-example-export.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-export.c)
+ * [gdbus-example-export.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gdbus-example-export.c)
  */
 
 
  * Convenience API for owning bus names.
  *
  * A simple example for owning a name can be found in
- * [gdbus-example-own-name.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-own-name.c)
+ * [gdbus-example-own-name.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gdbus-example-own-name.c)
  */
 
 
  * Convenience API for watching bus names.
  *
  * A simple example for watching a name can be found in
- * [gdbus-example-watch-name.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-watch-name.c)
+ * [gdbus-example-watch-name.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gdbus-example-watch-name.c)
  */
 
 
  * the message bus launching an owner (unless
  * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START is set).
  *
+ * If the proxy is for a stateless D-Bus service, where the name owner may
+ * be started and stopped between calls, the #GDBusProxy:g-name-owner tracking
+ * of #GDBusProxy will cause the proxy to drop signal and property changes from
+ * the service after it has restarted for the first time. When interacting
+ * with a stateless D-Bus service, do not use #GDBusProxy — use direct D-Bus
+ * method calls and signal connections.
+ *
  * The generic #GDBusProxy::g-properties-changed and
  * #GDBusProxy::g-signal signals are not very convenient to work with.
  * Therefore, the recommended way of working with proxies is to subclass
  * of the thread where the instance was constructed.
  *
  * An example using a proxy for a well-known name can be found in
- * [gdbus-example-watch-proxy.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-watch-proxy.c)
+ * [gdbus-example-watch-proxy.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gdbus-example-watch-proxy.c)
  */
 
 
  * session or system bus, you should instead use g_bus_own_name().
  *
  * An example of peer-to-peer communication with GDBus can be found
- * in [gdbus-example-peer.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-peer.c).
+ * in [gdbus-example-peer.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gdbus-example-peer.c).
  *
  * Note that a minimal #GDBusServer will accept connections from any
  * peer. In many use-cases it will be necessary to add a #GDBusAuthObserver
  * g_file_query_writable_namespaces() to discover the settable attributes
  * of a particular file at runtime.
  *
+ * The direct accessors, such as g_file_info_get_name(), are slightly more
+ * optimized than the generic attribute accessors, such as
+ * g_file_info_get_attribute_byte_string().This optimization will matter
+ * only if calling the API in a tight loop.
+ *
  * #GFileAttributeMatcher allows for searching through a #GFileInfo for
  * attributes.
  */
  * There is also an implementation for use inside Flatpak sandboxes.
  *
  * Possible actions to take when the signal is received are:
- * - Free caches
- * - Save files that haven't been looked at in a while to disk, ready to be reopened when needed
- * - Run a garbage collection cycle
- * - Try and compress fragmented allocations
- * - Exit on idle if the process has no reason to stay around
- * - Call [`malloc_trim(3)`](man:malloc_trim) to return cached heap pages to
- *   the kernel (if supported by your libc)
+ *
+ *  - Free caches
+ *  - Save files that haven't been looked at in a while to disk, ready to be reopened when needed
+ *  - Run a garbage collection cycle
+ *  - Try and compress fragmented allocations
+ *  - Exit on idle if the process has no reason to stay around
+ *  - Call [`malloc_trim(3)`](man:malloc_trim) to return cached heap pages to
+ *    the kernel (if supported by your libc)
  *
  * Note that some actions may not always improve system performance, and so
  * should be profiled for your application. `malloc_trim()`, for example, may
  * not running, applications using #GNotification should be able to be
  * started as a D-Bus service, using #GApplication.
  *
+ * In order for #GNotification to work, the application must have installed
+ * a `.desktop` file. For example:
+ * |[
+ *  [Desktop Entry]
+ *   Name=Test Application
+ *   Comment=Description of what Test Application does
+ *   Exec=gnome-test-application
+ *   Icon=org.gnome.TestApplication
+ *   Terminal=false
+ *   Type=Application
+ *   Categories=GNOME;GTK;TestApplication Category;
+ *   StartupNotify=true
+ *   DBusActivatable=true
+ *   X-GNOME-UsesNotifications=true
+ * ]|
+ *
+ * The `X-GNOME-UsesNotifications` key indicates to GNOME Control Center
+ * that this application uses notifications, so it can be listed in the
+ * Control Center’s ‘Notifications’ panel.
+ *
+ * The `.desktop` file must be named as `org.gnome.TestApplication.desktop`,
+ * where `org.gnome.TestApplication` is the ID passed to g_application_new().
+ *
  * User interaction with a notification (either the default action, or
  * buttons) must be associated with actions on the application (ie:
  * "app." actions).  It is not possible to route user interaction
 
 
 /**
+ * SECTION:gpowerprofilemonitor
+ * @title: GPowerProfileMonitor
+ * @short_description: Power profile monitor
+ * @include: gio/gio.h
+ *
+ * #GPowerProfileMonitor makes it possible for applications as well as OS components
+ * to monitor system power profiles and act upon them. It currently only exports
+ * whether the system is in “Power Saver” mode (known as “Low Power” mode on
+ * some systems).
+ *
+ * When in “Low Power” mode, it is recommended that applications:
+ * - disabling automatic downloads
+ * - reduce the rate of refresh from online sources such as calendar or
+ *   email synchronisation
+ * - if the application has expensive visual effects, reduce them
+ *
+ * It is also likely that OS components providing services to applications will
+ * lower their own background activity, for the sake of the system.
+ *
+ * There are a variety of tools that exist for power consumption analysis, but those
+ * usually depend on the OS and hardware used. On Linux, one could use `upower` to
+ * monitor the battery discharge rate, `powertop` to check on the background activity
+ * or activity at all), `sysprof` to inspect CPU usage, and `intel_gpu_time` to
+ * profile GPU usage.
+ *
+ * Don't forget to disconnect the #GPowerProfileMonitor::notify::power-saver-enabled
+ * signal, and unref the #GPowerProfileMonitor itself when exiting.
+ *
+ * Since: 2.70
+ */
+
+
+/**
  * SECTION:gpropertyaction
  * @title: GPropertyAction
  * @short_description: A GAction reflecting a GObject property
  * utility. The input is a schema description in an XML format.
  *
  * A DTD for the gschema XML format can be found here:
- * [gschema.dtd](https://git.gnome.org/browse/glib/tree/gio/gschema.dtd)
+ * [gschema.dtd](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/gschema.dtd)
  *
  * The [glib-compile-schemas][glib-compile-schemas] tool expects schema
  * files to have the extension `.gschema.xml`.
  *
  * An example of a test fixture for D-Bus services can be found
  * here:
- * [gdbus-test-fixture.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-test-fixture.c)
+ * [gdbus-test-fixture.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gdbus-test-fixture.c)
  *
  * Note that these examples only deal with isolating the D-Bus aspect of your
  * service. To successfully run isolated unit tests on your service you may need
 
 
 /**
- * SECTION:gzcompressor
+ * SECTION:gzlibcompressor
  * @short_description: Zlib compressor
  * @include: gio/gio.h
  *
 
 
 /**
- * SECTION:gzdecompressor
+ * SECTION:gzlibdecompressor
  * @short_description: Zlib decompressor
  * @include: gio/gio.h
  *
  *
  * To cancel the busy indication, use g_application_unmark_busy().
  *
+ * The application must be registered before calling this function.
+ *
  * Since: 2.38
  */
 
  * and override local_command_line(). In this case, you most likely want
  * to return %TRUE from your local_command_line() implementation to
  * suppress the default handling. See
- * [gapplication-example-cmdline2.c][gapplication-example-cmdline2]
+ * [gapplication-example-cmdline2.c][https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gapplication-example-cmdline2.c]
  * for an example.
  *
  * If, after the above is done, the use count of the application is zero
  * If @info is statically allocated does nothing. Otherwise increases
  * the reference count.
  *
- * Returns: The same @info.
+ * Returns: (not nullable): The same @info.
  * Since: 2.26
  */
 
  * If @info is statically allocated does nothing. Otherwise increases
  * the reference count.
  *
- * Returns: The same @info.
+ * Returns: (not nullable): The same @info.
  * Since: 2.26
  */
 
  * g_dbus_connection_signal_subscribe() is called, in order to avoid memory
  * leaks through callbacks queued on the #GMainContext after it’s stopped being
  * iterated.
+ * Alternatively, any idle source with a priority lower than %G_PRIORITY_DEFAULT
+ * that was scheduled after unsubscription, also indicates that all resources
+ * of this subscription are released.
  *
  * Since: 2.26
  */
  * Generate a D-Bus GUID that can be used with
  * e.g. g_dbus_connection_new().
  *
- * See the D-Bus specification regarding what strings are valid D-Bus
- * GUID (for example, D-Bus GUIDs are not RFC-4122 compliant).
+ * See the
+ * [D-Bus specification](https://dbus.freedesktop.org/doc/dbus-specification.html#uuids)
+ * regarding what strings are valid D-Bus GUIDs. The specification refers to
+ * these as ‘UUIDs’ whereas GLib (for historical reasons) refers to them as
+ * ‘GUIDs’. The terms are interchangeable.
+ *
+ * Note that D-Bus GUIDs do not follow
+ * [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122).
  *
  * Returns: A valid D-Bus GUID. Free with g_free().
  * Since: 2.26
  * If @info is statically allocated does nothing. Otherwise increases
  * the reference count.
  *
- * Returns: The same @info.
+ * Returns: (not nullable): The same @info.
  * Since: 2.26
  */
 
 
 
 /**
+ * g_dbus_is_error_name:
+ * @string: The string to check.
+ *
+ * Check whether @string is a valid D-Bus error name.
+ *
+ * This function returns the same result as g_dbus_is_interface_name(),
+ * because D-Bus error names are defined to have exactly the
+ * same syntax as interface names.
+ *
+ * Returns: %TRUE if valid, %FALSE otherwise.
+ * Since: 2.70
+ */
+
+
+/**
  * g_dbus_is_guid:
  * @string: The string to check.
  *
  * Checks if @string is a D-Bus GUID.
  *
- * See the D-Bus specification regarding what strings are valid D-Bus
- * GUID (for example, D-Bus GUIDs are not RFC-4122 compliant).
+ * See the documentation for g_dbus_generate_guid() for more information about
+ * the format of a GUID.
  *
- * Returns: %TRUE if @string is a guid, %FALSE otherwise.
+ * Returns: %TRUE if @string is a GUID, %FALSE otherwise.
  * Since: 2.26
  */
 
  *
  * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.
  *
- * Returns: The value.
+ * This will always be non-%NULL, but may be an empty string.
+ *
+ * Returns: (not nullable): The value.
  * Since: 2.26
  */
 
  *   fd 12: dev=0:10,mode=020620,ino=5,uid=500,gid=5,rdev=136:2,size=0,atime=1273085037,mtime=1273085851,ctime=1272982635
  * ]|
  *
- * Returns: A string that should be freed with g_free().
+ * Returns: (not nullable): A string that should be freed with g_free().
  * Since: 2.26
  */
 
  * If @info is statically allocated does nothing. Otherwise increases
  * the reference count.
  *
- * Returns: The same @info.
+ * Returns: (not nullable): The same @info.
  * Since: 2.26
  */
 
  * If @info is statically allocated does nothing. Otherwise increases
  * the reference count.
  *
- * Returns: The same @info.
+ * Returns: (not nullable): The same @info.
  * Since: 2.26
  */
 
  * Gets the interface proxy for @interface_name at @object_path, if
  * any.
  *
- * Returns: (transfer full): A #GDBusInterface instance or %NULL. Free
+ * Returns: (transfer full) (nullable): A #GDBusInterface instance or %NULL. Free
  *   with g_object_unref().
  * Since: 2.30
  */
  *
  * Gets the #GDBusObjectProxy at @object_path, if any.
  *
- * Returns: (transfer full): A #GDBusObject or %NULL. Free with
+ * Returns: (transfer full) (nullable): A #GDBusObject or %NULL. Free with
  *   g_object_unref().
  * Since: 2.30
  */
  *
  * Gets the #GDBusConnection used by @manager.
  *
- * Returns: (transfer full): A #GDBusConnection object or %NULL if
+ * Returns: (transfer full) (nullable): A #GDBusConnection object or %NULL if
  *   @manager isn't exported on a connection. The returned object should
  *   be freed with g_object_unref().
  * Since: 2.30
  * If @info is statically allocated does nothing. Otherwise increases
  * the reference count.
  *
- * Returns: The same @info.
+ * Returns: (not nullable): The same @info.
  * Since: 2.26
  */
 
  *
  * Gets the connection @proxy is for.
  *
- * Returns: (transfer none): A #GDBusConnection owned by @proxy. Do not free.
+ * Returns: (transfer none) (not nullable): A #GDBusConnection owned by @proxy. Do not free.
  * Since: 2.26
  */
 
  *
  * Gets the D-Bus interface name @proxy is for.
  *
- * Returns: A string owned by @proxy. Do not free.
+ * Returns: (not nullable): A string owned by @proxy. Do not free.
  * Since: 2.26
  */
 
  *
  * Gets the name that @proxy was constructed for.
  *
- * Returns: A string owned by @proxy. Do not free.
+ * When connected to a message bus, this will usually be non-%NULL.
+ * However, it may be %NULL for a proxy that communicates using a peer-to-peer
+ * pattern.
+ *
+ * Returns: (nullable): A string owned by @proxy. Do not free.
  * Since: 2.26
  */
 
  *
  * Gets the object path @proxy is for.
  *
- * Returns: A string owned by @proxy. Do not free.
+ * Returns: (not nullable): A string owned by @proxy. Do not free.
  * Since: 2.26
  */
 
  * [D-Bus address](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses)
  * string that can be used by clients to connect to @server.
  *
- * Returns: A D-Bus address string. Do not free, the string is owned
+ * This is valid and non-empty if initializing the #GDBusServer succeeded.
+ *
+ * Returns: (not nullable): A D-Bus address string. Do not free, the string is owned
  * by @server.
  * Since: 2.26
  */
  * g_dbus_server_get_guid:
  * @server: A #GDBusServer.
  *
- * Gets the GUID for @server.
+ * Gets the GUID for @server, as provided to g_dbus_server_new_sync().
  *
- * Returns: A D-Bus GUID. Do not free this string, it is owned by @server.
+ * Returns: (not nullable): A D-Bus GUID. Do not free this string, it is owned by @server.
  * Since: 2.26
  */
 
  * If @info is statically allocated does nothing. Otherwise increases
  * the reference count.
  *
- * Returns: The same @info.
+ * Returns: (not nullable): The same @info.
  * Since: 2.26
  */
 
 
 
 /**
+ * g_dtls_connection_get_ciphersuite_name:
+ * @conn: a #GDTlsConnection
+ *
+ * Returns the name of the current DTLS ciphersuite, or %NULL if the
+ * connection has not handshaked or has been closed. Beware that the TLS
+ * backend may use any of multiple different naming conventions, because
+ * OpenSSL and GnuTLS have their own ciphersuite naming conventions that
+ * are different from each other and different from the standard, IANA-
+ * registered ciphersuite names. The ciphersuite name is intended to be
+ * displayed to the user for informative purposes only, and parsing it
+ * is not recommended.
+ *
+ * Returns: (nullable): The name of the current DTLS ciphersuite, or %NULL
+ * Since: 2.70
+ */
+
+
+/**
  * g_dtls_connection_get_database:
  * @conn: a #GDtlsConnection
  *
 
 
 /**
+ * g_dtls_connection_get_protocol_version:
+ * @conn: a #GDTlsConnection
+ *
+ * Returns the current DTLS protocol version, which may be
+ * %G_TLS_PROTOCOL_VERSION_UNKNOWN if the connection has not handshaked, or
+ * has been closed, or if the TLS backend has implemented a protocol version
+ * that is not a recognized #GTlsProtocolVersion.
+ *
+ * Returns: The current DTLS protocol version
+ * Since: 2.70
+ */
+
+
+/**
  * g_dtls_connection_get_rehandshake_mode:
  * @conn: a #GDtlsConnection
  *
 
 
 /**
+ * g_file_info_get_access_date_time:
+ * @info: a #GFileInfo.
+ *
+ * Gets the access time of the current @info and returns it as a
+ * #GDateTime.
+ *
+ * This requires the %G_FILE_ATTRIBUTE_TIME_ACCESS attribute. If
+ * %G_FILE_ATTRIBUTE_TIME_ACCESS_USEC is provided, the resulting #GDateTime
+ * will have microsecond precision.
+ *
+ * Returns: (transfer full) (nullable): access time, or %NULL if unknown
+ * Since: 2.70
+ */
+
+
+/**
  * g_file_info_get_attribute_as_string:
  * @info: a #GFileInfo.
  * @attribute: a file attribute key.
 
 
 /**
+ * g_file_info_get_creation_date_time:
+ * @info: a #GFileInfo.
+ *
+ * Gets the creation time of the current @info and returns it as a
+ * #GDateTime.
+ *
+ * This requires the %G_FILE_ATTRIBUTE_TIME_CREATED attribute. If
+ * %G_FILE_ATTRIBUTE_TIME_CREATED_USEC is provided, the resulting #GDateTime
+ * will have microsecond precision.
+ *
+ * Returns: (transfer full) (nullable): creation time, or %NULL if unknown
+ * Since: 2.70
+ */
+
+
+/**
  * g_file_info_get_deletion_date:
  * @info: a #GFileInfo.
  *
 
 
 /**
+ * g_file_info_set_access_date_time:
+ * @info: a #GFileInfo.
+ * @atime: (not nullable): a #GDateTime.
+ *
+ * Sets the %G_FILE_ATTRIBUTE_TIME_ACCESS and
+ * %G_FILE_ATTRIBUTE_TIME_ACCESS_USEC attributes in the file info to the
+ * given date/time value.
+ *
+ * Since: 2.70
+ */
+
+
+/**
  * g_file_info_set_attribute:
  * @info: a #GFileInfo.
  * @attribute: a file attribute key.
 
 
 /**
+ * g_file_info_set_creation_date_time:
+ * @info: a #GFileInfo.
+ * @creation_time: (not nullable): a #GDateTime.
+ *
+ * Sets the %G_FILE_ATTRIBUTE_TIME_CREATED and
+ * %G_FILE_ATTRIBUTE_TIME_CREATED_USEC attributes in the file info to the
+ * given date/time value.
+ *
+ * Since: 2.70
+ */
+
+
+/**
  * g_file_info_set_display_name:
  * @info: a #GFileInfo.
  * @display_name: a string containing a display name.
  * @stream: a #GInputStream.
  * @buffer: (array length=count) (element-type guint8) (out caller-allocates):
  *     a buffer to read data into (which should be at least count bytes long).
- * @count: the number of bytes that will be read from the stream
+ * @count: (in): the number of bytes that will be read from the stream
  * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
  * @error: location to store the error occurring, or %NULL to ignore
  *
  * @stream: a #GInputStream.
  * @buffer: (array length=count) (element-type guint8) (out caller-allocates):
  *     a buffer to read data into (which should be at least count bytes long).
- * @count: the number of bytes that will be read from the stream
+ * @count: (in): the number of bytes that will be read from the stream
  * @bytes_read: (out): location to store the number of bytes that was read from the stream
  * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
  * @error: location to store the error occurring, or %NULL to ignore
  * @stream: A #GInputStream
  * @buffer: (array length=count) (element-type guint8) (out caller-allocates):
  *     a buffer to read data into (which should be at least count bytes long)
- * @count: the number of bytes that will be read from the stream
+ * @count: (in): the number of bytes that will be read from the stream
  * @io_priority: the [I/O priority][io-priority] of the request
  * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore
  * @callback: (scope async): callback to call when the request is satisfied
  * @stream: A #GInputStream.
  * @buffer: (array length=count) (element-type guint8) (out caller-allocates):
  *     a buffer to read data into (which should be at least count bytes long).
- * @count: the number of bytes that will be read from the stream
+ * @count: (in): the number of bytes that will be read from the stream
  * @io_priority: the [I/O priority][io-priority]
  * of the request.
  * @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
 
 
 /**
+ * g_notification_set_category:
+ * @notification: a #GNotification
+ * @category: (nullable): the category for @notification, or %NULL for no category
+ *
+ * Sets the type of @notification to @category. Categories have a main
+ * type like `email`, `im` or `device` and can have a detail separated
+ * by a `.`, e.g. `im.received` or `email.arrived`. Setting the category
+ * helps the notification server to select proper feedback to the user.
+ *
+ * Standard categories are [listed in the specification](https://specifications.freedesktop.org/notification-spec/latest/ar01s06.html).
+ *
+ * Since: 2.70
+ */
+
+
+/**
  * g_notification_set_default_action:
  * @notification: a #GNotification
  * @detailed_action: a detailed action name
 /**
  * g_pollable_input_stream_read_nonblocking: (virtual read_nonblocking)
  * @stream: a #GPollableInputStream
- * @buffer: (array length=count) (element-type guint8): a buffer to
- *     read data into (which should be at least @count bytes long).
- * @count: the number of bytes you want to read
+ * @buffer: (array length=count) (element-type guint8) (out caller-allocates): a
+ *     buffer to read data into (which should be at least @count bytes long).
+ * @count: (in): the number of bytes you want to read
  * @cancellable: (nullable): a #GCancellable, or %NULL
  * @error: #GError for error reporting, or %NULL to ignore.
  *
 
 
 /**
+ * g_power_profile_monitor_dup_default:
+ *
+ * Gets a reference to the default #GPowerProfileMonitor for the system.
+ *
+ * Returns: (not nullable) (transfer full): a new reference to the default #GPowerProfileMonitor
+ * Since: 2.70
+ */
+
+
+/**
+ * g_power_profile_monitor_get_power_saver_enabled:
+ * @monitor: a #GPowerProfileMonitor
+ *
+ * Gets whether the system is in “Power Saver” mode.
+ *
+ * You are expected to listen to the
+ * #GPowerProfileMonitor::notify::power-saver-enabled signal to know when the profile has
+ * changed.
+ *
+ * Returns: Whether the system is in “Power Saver” mode.
+ * Since: 2.70
+ */
+
+
+/**
  * g_property_action_new:
  * @name: the name of the action to create
  * @object: (type GObject.Object): the object that has the property
  *
  * Tells the current position within the stream.
  *
- * Returns: the offset from the beginning of the buffer.
+ * Returns: the (positive or zero) offset from the beginning of the
+ * buffer, zero if the target is not seekable.
  */
 
 
  * This is the asynchronous version of g_socket_listener_accept().
  *
  * When the operation is finished @callback will be
- * called. You can then call g_socket_listener_accept_socket()
+ * called. You can then call g_socket_listener_accept_finish()
  * to get the result of the operation.
  *
  * Since: 2.22
  *
  * This value has no particular meaning, but it can be used with the
  * macros defined by the system headers such as WIFEXITED.  It can also
- * be used with g_spawn_check_exit_status().
+ * be used with g_spawn_check_wait_status().
  *
  * It is more likely that you want to use g_subprocess_get_if_exited()
  * followed by g_subprocess_get_exit_status().
  * @cancellable: a #GCancellable
  * @error: a #GError
  *
- * Combines g_subprocess_wait() with g_spawn_check_exit_status().
+ * Combines g_subprocess_wait() with g_spawn_check_wait_status().
  *
  * Returns: %TRUE on success, %FALSE if process exited abnormally, or
  * @cancellable was cancelled
  * @callback: a #GAsyncReadyCallback to call when the operation is complete
  * @user_data: user_data for @callback
  *
- * Combines g_subprocess_wait_async() with g_spawn_check_exit_status().
+ * Combines g_subprocess_wait_async() with g_spawn_check_wait_status().
  *
  * This is the asynchronous version of g_subprocess_wait_check().
  *
  *
  * Although GLib currently rate-limits the tasks queued via
  * g_task_run_in_thread(), you should not assume that it will always
- * do this. If you have a very large number of tasks to run, but don't
- * want them to all run at once, you should only queue a limited
- * number of them at a time.
+ * do this. If you have a very large number of tasks to run (several tens of
+ * tasks), but don't want them to all run at once, you should only queue a
+ * limited number of them (around ten) at a time.
  *
  * Since: 2.36
  */
 
 
 /**
+ * g_tls_certificate_get_dns_names:
+ * @cert: a #GTlsCertificate
+ *
+ * Gets the value of #GTlsCertificate:dns-names.
+ *
+ * Returns: (nullable) (element-type GBytes) (transfer container): A #GPtrArray of
+ * #GBytes elements, or %NULL if it's not available.
+ * Since: 2.70
+ */
+
+
+/**
+ * g_tls_certificate_get_ip_addresses:
+ * @cert: a #GTlsCertificate
+ *
+ * Gets the value of #GTlsCertificate:ip-addresses.
+ *
+ * Returns: (nullable) (element-type GInetAddress) (transfer container): A #GPtrArray
+ * of #GInetAddress elements, or %NULL if it's not available.
+ * Since: 2.70
+ */
+
+
+/**
  * g_tls_certificate_get_issuer:
  * @cert: a #GTlsCertificate
  *
 
 
 /**
+ * g_tls_certificate_get_issuer_name:
+ * @cert: a #GTlsCertificate
+ *
+ * Returns the issuer name from the certificate.
+ *
+ * Returns: (nullable) (transfer full): The issuer name, or %NULL if it's not available.
+ * Since: 2.70
+ */
+
+
+/**
+ * g_tls_certificate_get_not_valid_after:
+ * @cert: a #GTlsCertificate
+ *
+ * Returns the time at which the certificate became or will become invalid.
+ *
+ * Returns: (nullable) (transfer full): The not-valid-after date, or %NULL if it's not available.
+ * Since: 2.70
+ */
+
+
+/**
+ * g_tls_certificate_get_not_valid_before:
+ * @cert: a #GTlsCertificate
+ *
+ * Returns the time at which the certificate became or will become valid.
+ *
+ * Returns: (nullable) (transfer full): The not-valid-before date, or %NULL if it's not available.
+ * Since: 2.70
+ */
+
+
+/**
+ * g_tls_certificate_get_subject_name:
+ * @cert: a #GTlsCertificate
+ *
+ * Returns the subject name from the certificate.
+ *
+ * Returns: (nullable) (transfer full): The subject name, or %NULL if it's not available.
+ * Since: 2.70
+ */
+
+
+/**
  * g_tls_certificate_is_same:
  * @cert_one: first certificate to compare
  * @cert_two: second certificate to compare
  * @private_key_pkcs11_uri: (nullable): A PKCS \#11 URI
  * @error: #GError for error reporting, or %NULL to ignore.
  *
- * Creates a #GTlsCertificate from a PKCS \#11 URI.
+ * Creates a #GTlsCertificate from a
+ * [PKCS \#11](https://docs.oasis-open.org/pkcs11/pkcs11-base/v3.0/os/pkcs11-base-v3.0-os.html) URI.
  *
  * An example @pkcs11_uri would be `pkcs11:model=Model;manufacturer=Manufacture;serial=1;token=My%20Client%20Certificate;id=%01`
  *
  * Where the token’s layout is:
  *
- * ```
+ * |[
  * Object 0:
  *   URL: pkcs11:model=Model;manufacturer=Manufacture;serial=1;token=My%20Client%20Certificate;id=%01;object=private%20key;type=private
  *   Type: Private key (RSA-2048)
  *   URL: pkcs11:model=Model;manufacturer=Manufacture;serial=1;token=My%20Client%20Certificate;id=%01;object=Certificate%20for%20Authentication;type=cert
  *   Type: X.509 Certificate (RSA-2048)
  *   ID: 01
- * ```
+ * ]|
  *
  * In this case the certificate and private key would both be detected and used as expected.
  * @pkcs_uri may also just reference an X.509 certificate object and then optionally
  * (All other #GTlsCertificateFlags values will always be set or unset
  * as appropriate.)
  *
+ * Because TLS session context is not used, #GTlsCertificate may not
+ * perform as many checks on the certificates as #GTlsConnection would.
+ * For example, certificate constraints cannot be honored, and some
+ * revocation checks cannot be performed. The best way to verify TLS
+ * certificates used by a TLS connection is to let #GTlsConnection
+ * handle the verification.
+ *
  * Returns: the appropriate #GTlsCertificateFlags
  * Since: 2.28
  */
 
 
 /**
+ * g_tls_connection_get_ciphersuite_name:
+ * @conn: a #GTlsConnection
+ *
+ * Returns the name of the current TLS ciphersuite, or %NULL if the
+ * connection has not handshaked or has been closed. Beware that the TLS
+ * backend may use any of multiple different naming conventions, because
+ * OpenSSL and GnuTLS have their own ciphersuite naming conventions that
+ * are different from each other and different from the standard, IANA-
+ * registered ciphersuite names. The ciphersuite name is intended to be
+ * displayed to the user for informative purposes only, and parsing it
+ * is not recommended.
+ *
+ * Returns: (nullable): The name of the current TLS ciphersuite, or %NULL
+ * Since: 2.70
+ */
+
+
+/**
  * g_tls_connection_get_database:
  * @conn: a #GTlsConnection
  *
 
 
 /**
+ * g_tls_connection_get_protocol_version:
+ * @conn: a #GTlsConnection
+ *
+ * Returns the current TLS protocol version, which may be
+ * %G_TLS_PROTOCOL_VERSION_UNKNOWN if the connection has not handshaked, or
+ * has been closed, or if the TLS backend has implemented a protocol version
+ * that is not a recognized #GTlsProtocolVersion.
+ *
+ * Returns: The current TLS protocol version
+ * Since: 2.70
+ */
+
+
+/**
  * g_tls_connection_get_rehandshake_mode:
  * @conn: a #GTlsConnection
  *
  * @cancellable: (nullable): a #GCancellable, or %NULL
  * @error: (nullable): a #GError, or %NULL
  *
- * Look up the issuer of @certificate in the database.
- *
- * The #GTlsCertificate:issuer property
- * of @certificate is not modified, and the two certificates are not hooked
- * into a chain.
- *
- * This function can block, use g_tls_database_lookup_certificate_issuer_async() to perform
- * the lookup operation asynchronously.
+ * Look up the issuer of @certificate in the database. The
+ * #GTlsCertificate:issuer property of @certificate is not modified, and
+ * the two certificates are not hooked into a chain.
+ *
+ * This function can block. Use g_tls_database_lookup_certificate_issuer_async()
+ * to perform the lookup operation asynchronously.
+ *
+ * Beware this function cannot be used to build certification paths. The
+ * issuer certificate returned by this function may not be the same as
+ * the certificate that would actually be used to construct a valid
+ * certification path during certificate verification.
+ * [RFC 4158](https://datatracker.ietf.org/doc/html/rfc4158) explains
+ * why an issuer certificate cannot be naively assumed to be part of the
+ * the certification path (though GLib's TLS backends may not follow the
+ * path building strategies outlined in this RFC). Due to the complexity
+ * of certification path building, GLib does not provide any way to know
+ * which certification path will actually be used when verifying a TLS
+ * certificate. Accordingly, this function cannot be used to make
+ * security-related decisions. Only GLib itself should make security
+ * decisions about TLS certificates.
  *
  * Returns: (transfer full): a newly allocated issuer #GTlsCertificate,
  * or %NULL. Use g_object_unref() to release the certificate.
  * @cancellable: (nullable): a #GCancellable, or %NULL
  * @error: (nullable): a #GError, or %NULL
  *
- * Determines the validity of a certificate chain after looking up and
- * adding any missing certificates to the chain.
+ * Determines the validity of a certificate chain, outside the context
+ * of a TLS session.
  *
  * @chain is a chain of #GTlsCertificate objects each pointing to the next
- * certificate in the chain by its #GTlsCertificate:issuer property. The chain may initially
- * consist of one or more certificates. After the verification process is
- * complete, @chain may be modified by adding missing certificates, or removing
- * extra certificates. If a certificate anchor was found, then it is added to
- * the @chain.
+ * certificate in the chain by its #GTlsCertificate:issuer property.
  *
  * @purpose describes the purpose (or usage) for which the certificate
  * is being used. Typically @purpose will be set to #G_TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER
  * accordingly. @error is not set when @chain is successfully analyzed
  * but found to be invalid.
  *
- * This function can block, use g_tls_database_verify_chain_async() to perform
- * the verification operation asynchronously.
+ * Prior to GLib 2.48, GLib's default TLS backend modified @chain to
+ * represent the certification path built by #GTlsDatabase during
+ * certificate verification by adjusting the #GTlsCertificate:issuer
+ * property of each certificate in @chain. Since GLib 2.48, this no
+ * longer occurs, so you cannot rely on #GTlsCertificate:issuer to
+ * represent the actual certification path used during certificate
+ * verification.
+ *
+ * Because TLS session context is not used, #GTlsDatabase may not
+ * perform as many checks on the certificates as #GTlsConnection would.
+ * For example, certificate constraints cannot be honored, and some
+ * revocation checks cannot be performed. The best way to verify TLS
+ * certificates used by a TLS connection is to let #GTlsConnection
+ * handle the verification.
+ *
+ * The TLS backend may attempt to look up and add missing certificates
+ * to the chain. Since GLib 2.70, this may involve HTTP requests to
+ * download missing certificates.
+ *
+ * This function can block. Use g_tls_database_verify_chain_async() to
+ * perform the verification operation asynchronously.
  *
  * Returns: the appropriate #GTlsCertificateFlags which represents the
  * result of verification.
 
 
 /**
- * g_tls_password_get_value:
+ * g_tls_password_get_value: (virtual get_value)
  * @password: a #GTlsPassword object
- * @length: (nullable): location to place the length of the password.
+ * @length: (optional): location to place the length of the password.
  *
  * Get the password value. If @length is not %NULL then it will be
  * filled in with the length of the password value. (Note that the
  * for @length in contexts where you know the password will have a
  * certain fixed length.)
  *
- * Returns: The password value (owned by the password object).
+ * Returns: (array length=length): The password value (owned by the password object).
  * Since: 2.30
  */
 
  * If more mounts have the same mount path, the last matching mount
  * is returned.
  *
- * Returns: (transfer full): a #GUnixMountEntry.
+ * This will return %NULL if there is no mount point at @mount_path.
+ *
+ * Returns: (transfer full) (nullable): a #GUnixMountEntry.
  */
 
 
  * If more mounts have the same mount path, the last matching mount
  * is returned.
  *
- * Returns: (transfer full): a #GUnixMountEntry.
+ * This will return %NULL if looking up the mount entry fails, if
+ * @file_path doesn’t exist or there is an I/O error.
+ *
+ * Returns: (transfer full) (nullable): a #GUnixMountEntry.
  * Since: 2.52
  */
 
index 80bc0d7..5ea15d6 100644 (file)
@@ -79,9 +79,9 @@
 /**
  * GAsyncQueue:
  *
- * The GAsyncQueue struct is an opaque data structure which represents
- * an asynchronous queue. It should only be accessed through the
- * g_async_queue_* functions.
+ * An opaque data structure which represents an asynchronous queue.
+ *
+ * It should only be accessed through the `g_async_queue_*` functions.
  */
 
 
 /**
  * GData:
  *
- * The #GData struct is an opaque data structure to represent a
- * [Keyed Data List][glib-Keyed-Data-Lists]. It should only be
- * accessed via the following functions.
+ * An opaque data structure that represents a keyed data list.
+ *
+ * See also: [Keyed data lists][glib-Keyed-Data-Lists].
  */
 
 
  * @julian: this bit is set if @julian_days is valid
  * @dmy: this is set if @day, @month and @year are valid
  * @day: the day of the day-month-year representation of the date,
- *     as a number between 1 and 31
+ *   as a number between 1 and 31
  * @month: the day of the day-month-year representation of the date,
- *     as a number between 1 and 12
+ *   as a number between 1 and 12
  * @year: the day of the day-month-year representation of the date
  *
  * Represents a day between January 1, Year 1 and a few thousand years in
  * the future. None of its members should be accessed directly.
  *
- * If the #GDate-struct is obtained from g_date_new(), it will be safe
+ * If the `GDate` is obtained from g_date_new(), it will be safe
  * to mutate but invalid and thus not safe for calendrical computations.
  *
  * If it's declared on the stack, it will contain garbage so must be
  * GDateDay:
  *
  * Integer representing a day of the month; between 1 and 31.
- * #G_DATE_BAD_DAY represents an invalid day of the month.
+ *
+ * The %G_DATE_BAD_DAY value represents an invalid day of the month.
  */
 
 
  * @G_DATE_NOVEMBER: November
  * @G_DATE_DECEMBER: December
  *
- * Enumeration representing a month; values are #G_DATE_JANUARY,
- * #G_DATE_FEBRUARY, etc. #G_DATE_BAD_MONTH is the invalid value.
+ * Enumeration representing a month; values are %G_DATE_JANUARY,
+ * %G_DATE_FEBRUARY, etc. %G_DATE_BAD_MONTH is the invalid value.
  */
 
 
 /**
  * GDateYear:
  *
- * Integer representing a year; #G_DATE_BAD_YEAR is the invalid
- * value. The year must be 1 or higher; negative (BC) years are not
- * allowed. The year is represented with four digits.
+ * Integer type representing a year.
+ *
+ * The %G_DATE_BAD_YEAR value is the invalid value. The year
+ * must be 1 or higher; negative ([BCE](https://en.wikipedia.org/wiki/Common_Era))
+ * years are not allowed.
+ *
+ * The year is represented with four digits.
  */
 
 
 /**
  * GKeyFileError:
  * @G_KEY_FILE_ERROR_UNKNOWN_ENCODING: the text being parsed was in
- *     an unknown encoding
+ *   an unknown encoding
  * @G_KEY_FILE_ERROR_PARSE: document was ill-formed
  * @G_KEY_FILE_ERROR_NOT_FOUND: the file was not found
  * @G_KEY_FILE_ERROR_KEY_NOT_FOUND: a requested key was not found
  * GKeyFileFlags:
  * @G_KEY_FILE_NONE: No flags, default behaviour
  * @G_KEY_FILE_KEEP_COMMENTS: Use this flag if you plan to write the
- *     (possibly modified) contents of the key file back to a file;
- *     otherwise all comments will be lost when the key file is
- *     written back.
+ *   (possibly modified) contents of the key file back to a file;
+ *   otherwise all comments will be lost when the key file is
+ *   written back.
  * @G_KEY_FILE_KEEP_TRANSLATIONS: Use this flag if you plan to write the
- *     (possibly modified) contents of the key file back to a file;
- *     otherwise only the translations for the current language will be
- *     written back.
+ *   (possibly modified) contents of the key file back to a file;
+ *   otherwise only the translations for the current language will be
+ *   written back.
  *
  * Flags which influence the parsing.
  */
  *
  * Simply a replacement for `time_t`. It has been deprecated
  * since it is not equivalent to `time_t` on 64-bit platforms
- * with a 64-bit `time_t`. Unrelated to #GTimer.
+ * with a 64-bit `time_t`.
+ *
+ * Unrelated to #GTimer.
  *
  * Note that #GTime is defined to always be a 32-bit integer,
  * unlike `time_t` which may be 64-bit on some systems. Therefore,
  * function.
  *
  * Instead, do the following:
+ *
  * |[<!-- language="C" -->
  * time_t ttime;
  * GTime gtime;
  * @tv_usec: microseconds
  *
  * Represents a precise time, with seconds and microseconds.
- * Similar to the struct timeval returned by the gettimeofday()
+ *
+ * Similar to the struct timeval returned by the `gettimeofday()`
  * UNIX system call.
  *
  * GLib is attempting to unify around the use of 64-bit integers to
 /**
  * G_KEY_FILE_DESKTOP_KEY_ACTIONS:
  *
- * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string list
+ * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a string list
  * giving the available application actions.
  *
  * Since: 2.38
 /**
  * G_KEY_FILE_DESKTOP_KEY_CATEGORIES:
  *
- * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a list
+ * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a list
  * of strings giving the categories in which the desktop entry
  * should be shown in a menu.
  *
 /**
  * G_KEY_FILE_DESKTOP_KEY_COMMENT:
  *
- * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a localized
+ * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a localized
  * string giving the tooltip for the desktop entry.
  *
  * Since: 2.14
 /**
  * G_KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE:
  *
- * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean set to true
- * if the application is D-Bus activatable.
+ * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean
+ * set to true if the application is D-Bus activatable.
  *
  * Since: 2.38
  */
 /**
  * G_KEY_FILE_DESKTOP_KEY_EXEC:
  *
- * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string
+ * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a string
  * giving the command line to execute. It is only valid for desktop
  * entries with the `Application` type.
  *
 /**
  * G_KEY_FILE_DESKTOP_KEY_GENERIC_NAME:
  *
- * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a localized
+ * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a localized
  * string giving the generic name of the desktop entry.
  *
  * Since: 2.14
 /**
  * G_KEY_FILE_DESKTOP_KEY_HIDDEN:
  *
- * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean
+ * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean
  * stating whether the desktop entry has been deleted by the user.
  *
  * Since: 2.14
 /**
  * G_KEY_FILE_DESKTOP_KEY_ICON:
  *
- * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a localized
+ * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a localized
  * string giving the name of the icon to be displayed for the desktop
  * entry.
  *
 /**
  * G_KEY_FILE_DESKTOP_KEY_MIME_TYPE:
  *
- * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a list
+ * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a list
  * of strings giving the MIME types supported by this desktop entry.
  *
  * Since: 2.14
 /**
  * G_KEY_FILE_DESKTOP_KEY_NAME:
  *
- * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a localized
+ * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a localized
  * string giving the specific name of the desktop entry.
  *
  * Since: 2.14
 /**
  * G_KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN:
  *
- * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a list of
+ * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a list of
  * strings identifying the environments that should not display the
  * desktop entry.
  *
 /**
  * G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY:
  *
- * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean
+ * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean
  * stating whether the desktop entry should be shown in menus.
  *
  * Since: 2.14
 /**
  * G_KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN:
  *
- * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a list of
+ * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a list of
  * strings identifying the environments that should display the
  * desktop entry.
  *
 /**
  * G_KEY_FILE_DESKTOP_KEY_PATH:
  *
- * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string
+ * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a string
  * containing the working directory to run the program in. It is only
  * valid for desktop entries with the `Application` type.
  *
 /**
  * G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY:
  *
- * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean
+ * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean
  * stating whether the application supports the
  * [Startup Notification Protocol Specification](http://www.freedesktop.org/Standards/startup-notification-spec).
  *
 /**
  * G_KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS:
  *
- * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is string
+ * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is string
  * identifying the WM class or name hint of a window that the application
  * will create, which can be used to emulate Startup Notification with
  * older applications.
 /**
  * G_KEY_FILE_DESKTOP_KEY_TERMINAL:
  *
- * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean
+ * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean
  * stating whether the program should be run in a terminal window.
- * It is only valid for desktop entries with the
- * `Application` type.
+ *
+ * It is only valid for desktop entries with the `Application` type.
  *
  * Since: 2.14
  */
 /**
  * G_KEY_FILE_DESKTOP_KEY_TRY_EXEC:
  *
- * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string
+ * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a string
  * giving the file name of a binary on disk used to determine if the
  * program is actually installed. It is only valid for desktop entries
  * with the `Application` type.
 /**
  * G_KEY_FILE_DESKTOP_KEY_TYPE:
  *
- * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string
- * giving the type of the desktop entry. Usually
- * #G_KEY_FILE_DESKTOP_TYPE_APPLICATION,
- * #G_KEY_FILE_DESKTOP_TYPE_LINK, or
- * #G_KEY_FILE_DESKTOP_TYPE_DIRECTORY.
+ * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a string
+ * giving the type of the desktop entry.
+ *
+ * Usually %G_KEY_FILE_DESKTOP_TYPE_APPLICATION,
+ * %G_KEY_FILE_DESKTOP_TYPE_LINK, or
+ * %G_KEY_FILE_DESKTOP_TYPE_DIRECTORY.
  *
  * Since: 2.14
  */
 /**
  * G_KEY_FILE_DESKTOP_KEY_URL:
  *
- * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string
+ * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a string
  * giving the URL to access. It is only valid for desktop entries
  * with the `Link` type.
  *
 /**
  * G_KEY_FILE_DESKTOP_KEY_VERSION:
  *
- * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string
+ * A key under %G_KEY_FILE_DESKTOP_GROUP, whose value is a string
  * giving the version of the Desktop Entry Specification used for
  * the desktop entry file.
  *
 /**
  * G_KEY_FILE_DESKTOP_TYPE_APPLICATION:
  *
- * The value of the #G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop
+ * The value of the %G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop
  * entries representing applications.
  *
  * Since: 2.14
 /**
  * G_KEY_FILE_DESKTOP_TYPE_DIRECTORY:
  *
- * The value of the #G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop
+ * The value of the %G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop
  * entries representing directories.
  *
  * Since: 2.14
 /**
  * G_KEY_FILE_DESKTOP_TYPE_LINK:
  *
- * The value of the #G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop
+ * The value of the %G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop
  * entries representing links to documents.
  *
  * Since: 2.14
  * @name: the name of the lock
  *
  * Works like g_mutex_lock(), but for a lock defined with
- * #G_LOCK_DEFINE.
+ * %G_LOCK_DEFINE.
  */
 
 
  * G_LOCK_DEFINE:
  * @name: the name of the lock
  *
- * The #G_LOCK_ macros provide a convenient interface to #GMutex.
- * #G_LOCK_DEFINE defines a lock. It can appear in any place where
+ * The `G_LOCK_` macros provide a convenient interface to #GMutex.
+ * %G_LOCK_DEFINE defines a lock. It can appear in any place where
  * variable definitions may appear in programs, i.e. in the first block
  * of a function or outside of functions. The @name parameter will be
  * mangled to get the name of the #GMutex. This means that you
  * can use names of existing variables as the parameter - e.g. the name
  * of the variable you intend to protect with the lock. Look at our
- * give_me_next_number() example using the #G_LOCK macros:
+ * give_me_next_number() example using the `G_LOCK` macros:
+ *
+ * Here is an example for using the `G_LOCK` convenience macros:
  *
- * Here is an example for using the #G_LOCK convenience macros:
  * |[<!-- language="C" -->
  *   G_LOCK_DEFINE (current_number);
  *
  * G_LOCK_DEFINE_STATIC:
  * @name: the name of the lock
  *
- * This works like #G_LOCK_DEFINE, but it creates a static object.
+ * This works like %G_LOCK_DEFINE, but it creates a static object.
  */
 
 
  * G_LOCK_EXTERN:
  * @name: the name of the lock
  *
- * This declares a lock, that is defined with #G_LOCK_DEFINE in another
+ * This declares a lock, that is defined with %G_LOCK_DEFINE in another
  * module.
  */
 
 /**
  * G_SHELL_ERROR:
  *
- * Error domain for shell functions. Errors in this domain will be from
- * the #GShellError enumeration. See #GError for information on error
- * domains.
+ * Error domain for shell functions.
+ *
+ * Errors in this domain will be from the #GShellError enumeration.
+ *
+ * See #GError for information on error domains.
  */
 
 
  * @name: the name of the lock
  *
  * Works like g_mutex_trylock(), but for a lock defined with
- * #G_LOCK_DEFINE.
+ * %G_LOCK_DEFINE.
  *
  * Returns: %TRUE, if the lock could be locked.
  */
  * @name: the name of the lock
  *
  * Works like g_mutex_unlock(), but for a lock defined with
- * #G_LOCK_DEFINE.
+ * %G_LOCK_DEFINE.
  */
 
 
  * displaying the bookmark inside a GUI.
  *
  * Here is an example of a bookmark file:
- * [bookmarks.xbel](https://git.gnome.org/browse/glib/tree/glib/tests/bookmarks.xbel)
+ * [bookmarks.xbel](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/glib/tests/bookmarks.xbel)
  *
  * A bookmark file might contain more than one bookmark; each bookmark
  * is accessed through its URI.
  * function (the file being opened, or whatever - though in the
  * g_file_get_contents() case, the @message already contains a filename).
  *
+ * Since error messages may be displayed to the user, they need to be valid
+ * UTF-8 (all GTK widgets expect text to be UTF-8). Keep this in mind in
+ * particular when formatting error messages with filenames, which are in
+ * the 'filename encoding', and need to be turned into UTF-8 using
+ * g_filename_to_utf8(), g_filename_display_name() or g_utf8_make_valid().
+ *
  * Note, however, that many error messages are too technical to display to the
  * user in an application, so prefer to use g_error_matches() to categorize errors
  * from called functions, and build an appropriate error message for the context
  * concurrently accessed in any way from any number of threads without
  * problems.
  *
- * #GVariant is heavily optimised for dealing with data in serialised
+ * #GVariant is heavily optimised for dealing with data in serialized
  * form.  It works particularly well with data located in memory-mapped
- * files.  It can perform nearly all deserialisation operations in a
+ * files.  It can perform nearly all deserialization operations in a
  * small constant time, usually touching only a single memory page.
- * Serialised #GVariant data can also be sent over the network.
+ * Serialized #GVariant data can also be sent over the network.
  *
  * #GVariant is largely compatible with D-Bus.  Almost all types of
  * #GVariant instances can be sent over D-Bus.  See #GVariantType for
- * exceptions.  (However, #GVariant's serialisation format is not the same
- * as the serialisation format of a D-Bus message body: use #GDBusMessage,
+ * exceptions.  (However, #GVariant's serialization format is not the same
+ * as the serialization format of a D-Bus message body: use #GDBusMessage,
  * in the gio library, for those.)
  *
- * For space-efficiency, the #GVariant serialisation format does not
+ * For space-efficiency, the #GVariant serialization format does not
  * automatically include the variant's length, type or endianness,
  * which must either be implied from context (such as knowledge that a
  * particular file format always contains a little-endian
  * in the future.
  *
  * The memory allocated by #GVariant can be grouped into 4 broad
- * purposes: memory for serialised data, memory for the type
+ * purposes: memory for serialized data, memory for the type
  * information cache, buffer management memory and memory for the
  * #GVariant structure itself.
  *
- * ## Serialised Data Memory
+ * ## Serialized Data Memory
  *
  * This is the memory that is used for storing GVariant data in
- * serialised form.  This is what would be sent over the network or
+ * serialized form.  This is what would be sent over the network or
  * what would end up on disk, not counting any indicator of the
  * endianness, or of the length or type of the top-level variant.
  *
  *
  * As an example, consider a dictionary mapping strings to variants.
  * In the case that the dictionary is empty, 0 bytes are required for
- * the serialisation.
+ * the serialization.
  *
  * If we add an item "width" that maps to the int32 value of 500 then
  * we will use 4 byte to store the int32 (so 6 for the variant
  *
  * For each GVariant type that currently exists in the program a type
  * information structure is kept in the type information cache.  The
- * type information structure is required for rapid deserialisation.
+ * type information structure is required for rapid deserialization.
  *
  * Continuing with the above example, if a #GVariant exists with the
  * type "a{sv}" then a type information struct will exist for
  * ## Buffer Management Memory
  *
  * #GVariant uses an internal buffer management structure to deal
- * with the various different possible sources of serialised data
+ * with the various different possible sources of serialized data
  * that it uses.  The buffer is responsible for ensuring that the
  * correct call is made when the data is no longer in use by
  * #GVariant.  This may involve a g_free() or a g_slice_free() or
  * even g_mapped_file_unref().
  *
  * One buffer management structure is used for each chunk of
- * serialised data.  The size of the buffer management structure
+ * serialized data.  The size of the buffer management structure
  * is 4 * (void *).  On 32-bit systems, that's 16 bytes.
  *
  * ## GVariant structure
  *
  * #GVariant structures only exist if they are explicitly created
  * with API calls.  For example, if a #GVariant is constructed out of
- * serialised data for the example given above (with the dictionary)
+ * serialized data for the example given above (with the dictionary)
  * then although there are 9 individual values that comprise the
  * entire dictionary (two keys, two values, two variants containing
  * the values, two dictionary entries, plus the dictionary itself),
  * If calls are made to start accessing the other values then
  * #GVariant instances will exist for those values only for as long
  * as they are in use (ie: until you call g_variant_unref()).  The
- * type information is shared.  The serialised data and the buffer
- * management structure for that serialised data is shared by the
+ * type information is shared.  The serialized data and the buffer
+ * management structure for that serialized data is shared by the
  * child.
  *
  * ## Summary
  * To put the entire example together, for our dictionary mapping
  * strings to variants (with two entries, as given above), we are
  * using 91 bytes of memory for type information, 29 bytes of memory
- * for the serialised data, 16 bytes for buffer management and 24
+ * for the serialized data, 16 bytes for buffer management and 24
  * bytes for the #GVariant instance, or a total of 160 bytes, plus
  * malloc overhead.  If we were to use g_variant_get_child_value() to
  * access the two dictionary entries, we would use an additional 48
  * bytes.  If we were to have other dictionaries of the same type, we
- * would use more memory for the serialised data and buffer
+ * would use more memory for the serialized data and buffer
  * management for those dictionaries, but the type information would
  * be shared.
  */
  * thread-safe.
  *
  * Each event source is assigned a priority. The default priority,
- * #G_PRIORITY_DEFAULT, is 0. Values less than 0 denote higher priorities.
+ * %G_PRIORITY_DEFAULT, is 0. Values less than 0 denote higher priorities.
  * Values greater than 0 denote lower priorities. Events from high priority
  * sources are always processed before events from lower priority sources.
  *
  *   { "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, "Be verbose", NULL },
  *   { "beep", 'b', 0, G_OPTION_ARG_NONE, &beep, "Beep when done", NULL },
  *   { "rand", 0, 0, G_OPTION_ARG_NONE, &randomize, "Randomize the data", NULL },
- *   { NULL }
+ *   G_OPTION_ENTRY_NULL
  * };
  *
  * int
  *                 gpointer user_data)
  * {
  *   g_message ("Child %" G_PID_FORMAT " exited %s", pid,
- *              g_spawn_check_exit_status (status, NULL) ? "normally" : "abnormally");
+ *              g_spawn_check_wait_status (status, NULL) ? "normally" : "abnormally");
  *
  *   // Free any resources associated with the child here, such as I/O channels
  *   // on its stdout and stderr FDs. If you have no code to put in the
  * @array: a #GArray.
  * @target: a pointer to the item to look up.
  * @compare_func: A #GCompareFunc used to locate @target.
- * @out_match_index: (optional) (out caller-allocates): return location
+ * @out_match_index: (optional) (out): return location
  *    for the index of the element, if found.
  *
  * Checks whether @target exists in @array by performing a binary
  * functions, @clear_func is expected to clear the contents of
  * the array element it is given, but not free the element itself.
  *
+ * |[<!-- language="C" -->
+ * typedef struct
+ * {
+ *   gchar *str;
+ *   GObject *obj;
+ * } ArrayElement;
+ *
+ * static void
+ * array_element_clear (ArrayElement *element)
+ * {
+ *   g_clear_pointer (&element->str, g_free);
+ *   g_clear_object (&element->obj);
+ * }
+ *
+ * // main code
+ * GArray *garray = g_array_new (FALSE, FALSE, sizeof (ArrayElement));
+ * g_array_set_clear_func (garray, (GDestroyNotify) array_element_clear);
+ * // assign data to the structure
+ * g_array_free (garray, TRUE);
+ * ]|
+ *
  * Since: 2.32
  */
 
 /**
  * g_array_steal:
  * @array: a #GArray.
- * @len: (optional) (out caller-allocates): pointer to retrieve the number of
+ * @len: (optional) (out): pointer to retrieve the number of
  *    elements of the original array
  *
  * Frees the data in the array and resets the size to zero, while
 
 /**
  * g_async_queue_new_full:
- * @item_free_func: function to free queue elements
+ * @item_free_func: (nullable): function to free queue elements
  *
  * Creates a new asynchronous queue and sets up a destroy notify
  * function that is used to free any remaining queue items when
  *
  * Atomically decreases the reference count.
  *
+ * If %TRUE is returned, the reference count reached 0. After this point, @arc
+ * is an undefined state and must be reinitialized with
+ * g_atomic_ref_count_init() to be used again.
+ *
  * Returns: %TRUE if the reference count reached 0, and %FALSE otherwise
  * Since: 2.58
  */
  * g_atomic_ref_count_init:
  * @arc: the address of an atomic reference count variable
  *
- * Initializes a reference count variable.
+ * Initializes a reference count variable to 1.
  *
  * Since: 2.58
  */
  *
  * This function accesses @address atomically.  All other accesses to
  * @address must be atomic in order for this function to work
- * reliably.
+ * reliably. While @address has a `volatile` qualifier, this is a historical
+ * artifact and the argument passed to it should not be `volatile`.
  *
  * Since: 2.24
  */
  *
  * This function accesses @address atomically.  All other accesses to
  * @address must be atomic in order for this function to work
- * reliably.
+ * reliably. While @address has a `volatile` qualifier, this is a historical
+ * artifact and the argument passed to it should not be `volatile`.
  *
  * Returns: %TRUE if the lock was acquired
  * Since: 2.24
  *
  * This function accesses @address atomically.  All other accesses to
  * @address must be atomic in order for this function to work
- * reliably.
+ * reliably. While @address has a `volatile` qualifier, this is a historical
+ * artifact and the argument passed to it should not be `volatile`.
  *
  * Since: 2.24
  */
 /**
  * g_byte_array_steal:
  * @array: a #GByteArray.
- * @len: (optional) (out caller-allocates): pointer to retrieve the number of
+ * @len: (optional) (out): pointer to retrieve the number of
  *    elements of the original array
  *
  * Frees the data in the array and resets the size to zero, while
 
 
 /**
+ * g_bytes_get_region:
+ * @bytes: a #GBytes
+ * @element_size: a non-zero element size
+ * @offset: an offset to the start of the region within the @bytes
+ * @n_elements: the number of elements in the region
+ *
+ * Gets a pointer to a region in @bytes.
+ *
+ * The region starts at @offset many bytes from the start of the data
+ * and contains @n_elements many elements of @element_size size.
+ *
+ * @n_elements may be zero, but @element_size must always be non-zero.
+ * Ideally, @element_size is a static constant (eg: sizeof a struct).
+ *
+ * This function does careful bounds checking (including checking for
+ * arithmetic overflows) and returns a non-%NULL pointer if the
+ * specified region lies entirely within the @bytes. If the region is
+ * in some way out of range, or if an overflow has occurred, then %NULL
+ * is returned.
+ *
+ * Note: it is possible to have a valid zero-size region. In this case,
+ * the returned pointer will be equal to the base pointer of the data of
+ * @bytes, plus @offset.  This will be non-%NULL except for the case
+ * where @bytes itself was a zero-sized region.  Since it is unlikely
+ * that you will be using this function to check for a zero-sized region
+ * in a zero-sized @bytes, %NULL effectively always means "error".
+ *
+ * Returns: (nullable): the requested region, or %NULL in case of an error
+ * Since: 2.70
+ */
+
+
+/**
  * g_bytes_get_size:
  * @bytes: a #GBytes
  *
 /**
  * g_child_watch_add:
  * @pid: process id to watch. On POSIX the positive pid of a child
- * process. On Windows a handle for a process (which doesn't have to be
- * a child).
+ *   process. On Windows a handle for a process (which doesn't have
+ *   to be a child).
  * @function: function to call
  * @data: data to pass to @function
  *
  * Sets a function to be called when the child indicated by @pid
- * exits, at a default priority, #G_PRIORITY_DEFAULT.
+ * exits, at a default priority, %G_PRIORITY_DEFAULT.
  *
  * If you obtain @pid from g_spawn_async() or g_spawn_async_with_pipes()
- * you will need to pass #G_SPAWN_DO_NOT_REAP_CHILD as flag to
+ * you will need to pass %G_SPAWN_DO_NOT_REAP_CHILD as flag to
  * the spawn function for the child watching to work.
  *
  * Note that on platforms where #GPid must be explicitly closed
 /**
  * g_child_watch_add_full: (rename-to g_child_watch_add)
  * @priority: the priority of the idle source. Typically this will be in the
- *            range between #G_PRIORITY_DEFAULT_IDLE and #G_PRIORITY_HIGH_IDLE.
+ *   range between %G_PRIORITY_DEFAULT_IDLE and %G_PRIORITY_HIGH_IDLE.
  * @pid: process to watch. On POSIX the positive pid of a child process. On
  * Windows a handle for a process (which doesn't have to be a child).
  * @function: function to call
  * exits, at the priority @priority.
  *
  * If you obtain @pid from g_spawn_async() or g_spawn_async_with_pipes()
- * you will need to pass #G_SPAWN_DO_NOT_REAP_CHILD as flag to
+ * you will need to pass %G_SPAWN_DO_NOT_REAP_CHILD as flag to
  * the spawn function for the child watching to work.
  *
- * In many programs, you will want to call g_spawn_check_exit_status()
+ * In many programs, you will want to call g_spawn_check_wait_status()
  * in the callback to determine whether or not the child exited
  * successfully.
  *
  * @...: format string, followed by parameters to insert
  *     into the format string (as with printf())
  *
- * Logs a "critical warning" (#G_LOG_LEVEL_CRITICAL).
+ * Logs a "critical warning" (%G_LOG_LEVEL_CRITICAL).
  *
  * Critical warnings are intended to be used in the event of an error
  * that originated in the current process (a programmer error).
  * @err_no: an "errno" value
  *
  * Gets a #GFileError constant based on the passed-in @err_no.
+ *
  * For example, if you pass in `EEXIST` this function returns
- * #G_FILE_ERROR_EXIST. Unlike `errno` values, you can portably
+ * %G_FILE_ERROR_EXIST. Unlike `errno` values, you can portably
  * assume that all #GFileError values will exist.
  *
  * Normally a #GFileError value goes into a #GError returned
  * from a function that manipulates files. So you would use
  * g_file_error_from_errno() when constructing a #GError.
  *
- * Returns: #GFileError corresponding to the given @errno
+ * Returns: #GFileError corresponding to the given @err_no
  */
 
 
  * This folder is used for application data
  * that is not user specific. For example, an application can store
  * a spell-check dictionary, a database of clip art, or a log file in the
- * CSIDL_COMMON_APPDATA folder. This information will not roam and is available
+ * FOLDERID_ProgramData folder. This information will not roam and is available
  * to anyone using the computer.
  *
  * The return value is cached and modifying it at runtime is not supported, as
  * the first elements in the list are the Application Data
  * and Documents folders for All Users. (These can be determined only
  * on Windows 2000 or later and are not present in the list on other
- * Windows versions.) See documentation for CSIDL_COMMON_APPDATA and
- * CSIDL_COMMON_DOCUMENTS.
+ * Windows versions.) See documentation for FOLDERID_ProgramData and
+ * FOLDERID_PublicDocuments.
  *
  * Then follows the "share" subfolder in the installation folder for
  * the package containing the DLL that calls this function, if it can
  * If `XDG_CACHE_HOME` is undefined, the directory that serves as a common
  * repository for temporary Internet files is used instead. A typical path is
  * `C:\Documents and Settings\username\Local Settings\Temporary Internet Files`.
- * See the [documentation for `CSIDL_INTERNET_CACHE`](https://msdn.microsoft.com/en-us/library/windows/desktop/bb762494%28v=vs.85%29.aspx#csidl_internet_cache).
+ * See the [documentation for `FOLDERID_InternetCache`](https://docs.microsoft.com/en-us/windows/win32/shell/knownfolderid).
  *
  * The return value is cached and modifying it at runtime is not supported, as
  * it’s not thread-safe to modify environment variables at runtime.
  * On Windows it follows XDG Base Directory Specification if `XDG_CONFIG_HOME` is defined.
  * If `XDG_CONFIG_HOME` is undefined, the folder to use for local (as opposed
  * to roaming) application data is used instead. See the
- * [documentation for `CSIDL_LOCAL_APPDATA`](https://msdn.microsoft.com/en-us/library/windows/desktop/bb762494%28v=vs.85%29.aspx#csidl_local_appdata).
+ * [documentation for `FOLDERID_LocalAppData`](https://docs.microsoft.com/en-us/windows/win32/shell/knownfolderid).
  * Note that in this case on Windows it will be  the same
  * as what g_get_user_data_dir() returns.
  *
  * On Windows it follows XDG Base Directory Specification if `XDG_DATA_HOME`
  * is defined. If `XDG_DATA_HOME` is undefined, the folder to use for local (as
  * opposed to roaming) application data is used instead. See the
- * [documentation for `CSIDL_LOCAL_APPDATA`](https://msdn.microsoft.com/en-us/library/windows/desktop/bb762494%28v=vs.85%29.aspx#csidl_local_appdata).
+ * [documentation for `FOLDERID_LocalAppData`](https://docs.microsoft.com/en-us/windows/win32/shell/knownfolderid).
  * Note that in this case on Windows it will be the same
  * as what g_get_user_config_dir() returns.
  *
 /**
  * g_hash_table_get_keys_as_array:
  * @hash_table: a #GHashTable
- * @length: (out): the length of the returned array
+ * @length: (out) (optional): the length of the returned array
  *
  * Retrieves every key inside @hash_table, as an array.
  *
  *
  * Adds a function to be called whenever there are no higher priority
  * events pending to the default main loop. The function is given the
- * default idle priority, #G_PRIORITY_DEFAULT_IDLE.  If the function
+ * default idle priority, %G_PRIORITY_DEFAULT_IDLE.  If the function
  * returns %FALSE it is automatically removed from the list of event
  * sources and will not be called again.
  *
 /**
  * g_idle_add_full: (rename-to g_idle_add)
  * @priority: the priority of the idle source. Typically this will be in the
- *            range between #G_PRIORITY_DEFAULT_IDLE and #G_PRIORITY_HIGH_IDLE.
+ *   range between %G_PRIORITY_DEFAULT_IDLE and %G_PRIORITY_HIGH_IDLE.
  * @function: function to call
  * @data: data to pass to @function
  * @notify: (nullable): 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
+ * events pending.
+ *
+ * If the function returns %G_SOURCE_REMOVE or %FALSE it is automatically
  * removed from the list of event sources and will not be called again.
  *
  * See [memory management of sources][mainloop-memory-management] for details
 
 /**
  * g_log:
- * @log_domain: (nullable): the log domain, usually #G_LOG_DOMAIN, or %NULL
- * for the default
+ * @log_domain: (nullable): the log domain, usually %G_LOG_DOMAIN, or %NULL
+ *   for the default
  * @log_level: the log level, either from #GLogLevelFlags
- *     or a user-defined level
- * @format: the message format. See the printf() documentation
+ *   or a user-defined level
+ * @format: the message format. See the `printf()` documentation
  * @...: the parameters to insert into the format string
  *
  * Logs an error or debugging message.
 /**
  * g_log_set_handler:
  * @log_domain: (nullable): the log domain, or %NULL for the default ""
- *     application domain
+ *    application domain
  * @log_levels: the log levels to apply the log handler for.
- *     To handle fatal and recursive messages as well, combine
- *     the log levels with the #G_LOG_FLAG_FATAL and
- *     #G_LOG_FLAG_RECURSION bit flags.
+ *    To handle fatal and recursive messages as well, combine
+ *    the log levels with the %G_LOG_FLAG_FATAL and
+ *    %G_LOG_FLAG_RECURSION bit flags.
  * @log_func: the log handler function
  * @user_data: data passed to the log handler
  *
  * Sets the log handler for a domain and a set of log levels.
+ *
  * To handle fatal and recursive messages the @log_levels parameter
- * must be combined with the #G_LOG_FLAG_FATAL and #G_LOG_FLAG_RECURSION
+ * must be combined with the %G_LOG_FLAG_FATAL and %G_LOG_FLAG_RECURSION
  * bit flags.
  *
- * Note that since the #G_LOG_LEVEL_ERROR log level is always fatal, if
+ * Note that since the %G_LOG_LEVEL_ERROR log level is always fatal, if
  * you want to set a handler for this log level you must combine it with
- * #G_LOG_FLAG_FATAL.
+ * %G_LOG_FLAG_FATAL.
  *
  * This has no effect if structured logging is enabled; see
  * [Using Structured Logging][using-structured-logging].
  *
  * Here is an example for adding a log handler for all warning messages
  * in the default domain:
+ *
  * |[<!-- language="C" -->
  * g_log_set_handler (NULL, G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL
  *                    | G_LOG_FLAG_RECURSION, my_log_handler, NULL);
  * ]|
  *
  * This example adds a log handler for all critical messages from GTK+:
+ *
  * |[<!-- language="C" -->
  * g_log_set_handler ("Gtk", G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL
  *                    | G_LOG_FLAG_RECURSION, my_log_handler, NULL);
  * ]|
  *
  * This example adds a log handler for all messages from GLib:
+ *
  * |[<!-- language="C" -->
  * g_log_set_handler ("GLib", G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL
  *                    | G_LOG_FLAG_RECURSION, my_log_handler, NULL);
 /**
  * g_log_set_handler_full: (rename-to g_log_set_handler)
  * @log_domain: (nullable): the log domain, or %NULL for the default ""
- *     application domain
+ *   application domain
  * @log_levels: the log levels to apply the log handler for.
- *     To handle fatal and recursive messages as well, combine
- *     the log levels with the #G_LOG_FLAG_FATAL and
- *     #G_LOG_FLAG_RECURSION bit flags.
+ *   To handle fatal and recursive messages as well, combine
+ *   the log levels with the %G_LOG_FLAG_FATAL and
+ *   %G_LOG_FLAG_RECURSION bit flags.
  * @log_func: the log handler function
  * @user_data: data passed to the log handler
  * @destroy: destroy notify for @user_data, or %NULL
  *    by the key "MESSAGE", followed by a printf()-style message format,
  *    followed by parameters to insert in the format string
  *
- * Log a message with structured data. The message will be passed through to
- * the log writer set by the application using g_log_set_writer_func(). If the
- * message is fatal (i.e. its log level is %G_LOG_LEVEL_ERROR), the program will
- * be aborted by calling G_BREAKPOINT() at the end of this function. If the log writer returns
+ * Log a message with structured data.
+ *
+ * The message will be passed through to the log writer set by the application
+ * using g_log_set_writer_func(). If the message is fatal (i.e. its log level
+ * is %G_LOG_LEVEL_ERROR), the program will be aborted by calling
+ * G_BREAKPOINT() at the end of this function. If the log writer returns
  * %G_LOG_WRITER_UNHANDLED (failure), no other fallback writers will be tried.
  * See the documentation for #GLogWriterFunc for information on chaining
  * writers.
  * Note that `CODE_FILE`, `CODE_LINE` and `CODE_FUNC` are automatically set by
  * the logging macros, G_DEBUG_HERE(), g_message(), g_warning(), g_critical(),
  * g_error(), etc, if the symbols `G_LOG_USE_STRUCTURED` is defined before including
- * glib.h.
+ * `glib.h`.
  *
  * For example:
+ *
  * |[<!-- language="C" -->
  * g_log_structured (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,
  *                   "MESSAGE_ID", "06d4df59e6c24647bfe69d2c27ef0b4e",
  * interpreted as a string.
  *
  * For example:
+ *
  * |[<!-- language="C" -->
  * const GLogField fields[] = {
  *   { "MESSAGE", "This is a debug message.", -1 },
  *
  * In any other case, an idle source is created to call @function and
  * that source is attached to @context (presumably to be run in another
- * thread).  The idle source is attached with #G_PRIORITY_DEFAULT
+ * thread).  The idle source is attached with %G_PRIORITY_DEFAULT
  * priority.  If you want a different priority, use
  * g_main_context_invoke_full().
  *
 
 
 /**
- * g_pattern_match:
+ * g_pattern_match: (skip)
  * @pspec: a #GPatternSpec
  * @string_length: the length of @string (in bytes, i.e. strlen(),
  *     not g_utf8_strlen())
  * g_utf8_strreverse() function to reverse UTF-8 encoded strings.
  *
  * Returns: %TRUE if @string matches @pspec
+ * Deprecated: 2.70: Use g_pattern_spec_match() instead
  */
 
 
 
 
 /**
- * g_pattern_match_string:
+ * g_pattern_match_string: (skip)
  * @pspec: a #GPatternSpec
  * @string: the UTF-8 encoded string to match
  *
  * g_pattern_match() instead while supplying the reversed string.
  *
  * Returns: %TRUE if @string matches @pspec
+ * Deprecated: 2.70: Use g_pattern_spec_match_string() instead
+ */
+
+
+/**
+ * g_pattern_spec_copy:
+ * @pspec: a #GPatternSpec
+ *
+ * Copies @pspec in a new #GPatternSpec.
+ *
+ * Returns: (transfer full): a copy of @pspec.
+ * Since: 2.70
  */
 
 
 
 
 /**
+ * g_pattern_spec_match:
+ * @pspec: a #GPatternSpec
+ * @string_length: the length of @string (in bytes, i.e. strlen(),
+ *     not g_utf8_strlen())
+ * @string: the UTF-8 encoded string to match
+ * @string_reversed: (nullable): the reverse of @string or %NULL
+ *
+ * Matches a string against a compiled pattern. Passing the correct
+ * length of the string given is mandatory. The reversed string can be
+ * omitted by passing %NULL, this is more efficient if the reversed
+ * version of the string to be matched is not at hand, as
+ * g_pattern_match() will only construct it if the compiled pattern
+ * requires reverse matches.
+ *
+ * Note that, if the user code will (possibly) match a string against a
+ * multitude of patterns containing wildcards, chances are high that
+ * some patterns will require a reversed string. In this case, it's
+ * more efficient to provide the reversed string to avoid multiple
+ * constructions thereof in the various calls to g_pattern_match().
+ *
+ * Note also that the reverse of a UTF-8 encoded string can in general
+ * not be obtained by g_strreverse(). This works only if the string
+ * does not contain any multibyte characters. GLib offers the
+ * g_utf8_strreverse() function to reverse UTF-8 encoded strings.
+ *
+ * Returns: %TRUE if @string matches @pspec
+ * Since: 2.70
+ */
+
+
+/**
+ * g_pattern_spec_match_string:
+ * @pspec: a #GPatternSpec
+ * @string: the UTF-8 encoded string to match
+ *
+ * Matches a string against a compiled pattern. If the string is to be
+ * matched against more than one pattern, consider using
+ * g_pattern_match() instead while supplying the reversed string.
+ *
+ * Returns: %TRUE if @string matches @pspec
+ * Since: 2.70
+ */
+
+
+/**
  * g_pattern_spec_new:
  * @pattern: a zero-terminated UTF-8 encoded string
  *
  * For portability reasons, you may only lock on the bottom 32 bits of
  * the pointer.
  *
+ * While @address has a `volatile` qualifier, this is a historical
+ * artifact and the argument passed to it should not be `volatile`.
+ *
  * Since: 2.30
  */
 
  * @address: (not nullable): a pointer to a #gpointer-sized value
  * @lock_bit: a bit value between 0 and 31
  *
- * This is equivalent to g_bit_trylock, but working on pointers (or
+ * This is equivalent to g_bit_trylock(), but working on pointers (or
  * other pointer-sized values).
  *
  * For portability reasons, you may only lock on the bottom 32 bits of
  * the pointer.
  *
+ * While @address has a `volatile` qualifier, this is a historical
+ * artifact and the argument passed to it should not be `volatile`.
+ *
  * Returns: %TRUE if the lock was acquired
  * Since: 2.30
  */
  * For portability reasons, you may only lock on the bottom 32 bits of
  * the pointer.
  *
+ * While @address has a `volatile` qualifier, this is a historical
+ * artifact and the argument passed to it should not be `volatile`.
+ *
  * Since: 2.30
  */
 
 
 
 /**
+ * g_prefix_error_literal:
+ * @err: (allow-none): a return location for a #GError, or %NULL
+ * @prefix: string to prefix @err with
+ *
+ * Prefixes @prefix to an existing error message. If @err or *@err is
+ * %NULL (i.e.: no error variable) then do nothing.
+ *
+ * Since: 2.70
+ */
+
+
+/**
  * g_print:
  * @format: the message format. See the printf() documentation
  * @...: the parameters to insert into the format string
  * g_ptr_array_find: (skip)
  * @haystack: pointer array to be searched
  * @needle: pointer to look for
- * @index_: (optional) (out caller-allocates): return location for the index of
+ * @index_: (optional) (out): return location for the index of
  *    the element, if found
  *
  * Checks whether @needle exists in @haystack. If the element is found, %TRUE is
  * @equal_func: (nullable): the function to call for each element, which should
  *    return %TRUE when the desired element is found; or %NULL to use pointer
  *    equality
- * @index_: (optional) (out caller-allocates): return location for the index of
+ * @index_: (optional) (out): return location for the index of
  *    the element, if found
  *
  * Checks whether @needle exists in @haystack, using the given @equal_func.
 /**
  * g_ptr_array_steal:
  * @array: a #GPtrArray.
- * @len: (optional) (out caller-allocates): pointer to retrieve the number of
+ * @len: (optional) (out): pointer to retrieve the number of
  *    elements of the original array
  *
  * Frees the data in the array and resets the size to zero, while
  *
  * Decreases the reference count.
  *
+ * If %TRUE is returned, the reference count reached 0. After this point, @rc
+ * is an undefined state and must be reinitialized with
+ * g_ref_count_init() to be used again.
+ *
  * Returns: %TRUE if the reference count reached 0, and %FALSE otherwise
  * Since: 2.58
  */
  * g_ref_count_init:
  * @rc: the address of a reference count variable
  *
- * Initializes a reference count variable.
+ * Initializes a reference count variable to 1.
  *
  * Since: 2.58
  */
  * Parses a command line into an argument vector, in much the same way
  * the shell would, but without many of the expansions the shell would
  * perform (variable expansion, globs, operators, filename expansion,
- * etc. are not supported). The results are defined to be the same as
- * those you would get from a UNIX98 /bin/sh, as long as the input
- * contains none of the unsupported shell expansions. If the input
- * does contain such expansions, they are passed through
- * literally. Possible errors are those from the #G_SHELL_ERROR
- * domain. Free the returned vector with g_strfreev().
+ * etc. are not supported).
+ *
+ * The results are defined to be the same as those you would get from
+ * a UNIX98 `/bin/sh`, as long as the input contains none of the
+ * unsupported shell expansions. If the input does contain such expansions,
+ * they are passed through literally.
+ *
+ * Possible errors are those from the %G_SHELL_ERROR domain.
+ *
+ * Free the returned vector with g_strfreev().
  *
  * Returns: %TRUE on success, %FALSE if error set
  */
  * @unquoted_string: (type filename): a literal string
  *
  * Quotes a string so that the shell (/bin/sh) will interpret the
- * quoted string to mean @unquoted_string. If you pass a filename to
- * the shell, for example, you should first quote it with this
- * function.  The return value must be freed with g_free(). The
- * quoting style used is undefined (single or double quotes may be
+ * quoted string to mean @unquoted_string.
+ *
+ * If you pass a filename to the shell, for example, you should first
+ * quote it with this function.
+ *
+ * The return value must be freed with g_free().
+ *
+ * The quoting style used is undefined (single or double quotes may be
  * used).
  *
- * Returns: (type filename): quoted string
+ * Returns: (type filename) (transfer full): quoted string
  */
 
 
  * @quoted_string: (type filename): shell-quoted string
  * @error: error return location or NULL
  *
- * Unquotes a string as the shell (/bin/sh) would. Only handles
- * quotes; if a string contains file globs, arithmetic operators,
- * variables, backticks, redirections, or other special-to-the-shell
- * features, the result will be different from the result a real shell
- * would produce (the variables, backticks, etc. will be passed
- * through literally instead of being expanded). This function is
- * guaranteed to succeed if applied to the result of
+ * Unquotes a string as the shell (/bin/sh) would.
+ *
+ * This function only handles quotes; if a string contains file globs,
+ * arithmetic operators, variables, backticks, redirections, or other
+ * special-to-the-shell features, the result will be different from the
+ * result a real shell would produce (the variables, backticks, etc.
+ * will be passed through literally instead of being expanded).
+ *
+ * This function is guaranteed to succeed if applied to the result of
  * g_shell_quote(). If it fails, it returns %NULL and sets the
- * error. The @quoted_string need not actually contain quoted or
- * escaped text; g_shell_unquote() simply goes through the string and
- * unquotes/unescapes anything that the shell would. Both single and
- * double quotes are handled, as are escapes including escaped
- * newlines. The return value must be freed with g_free(). Possible
- * errors are in the #G_SHELL_ERROR domain.
+ * error.
+ *
+ * The @quoted_string need not actually contain quoted or escaped text;
+ * g_shell_unquote() simply goes through the string and unquotes/unescapes
+ * anything that the shell would. Both single and double quotes are
+ * handled, as are escapes including escaped newlines.
+ *
+ * The return value must be freed with g_free().
+ *
+ * Possible errors are in the %G_SHELL_ERROR domain.
  *
  * Shell quoting rules are a bit strange. Single quotes preserve the
  * literal string exactly. escape sequences are not allowed; not even
- * \' - if you want a ' in the quoted text, you have to do something
- * like 'foo'\''bar'.  Double quotes allow $, `, ", \, and newline to
- * be escaped with backslash. Otherwise double quotes preserve things
- * literally.
+ * `\'` - if you want a `'` in the quoted text, you have to do something
+ * like `'foo'\''bar'`. Double quotes allow `$`, ```, `"`, `\`, and
+ * newline to be escaped with backslash. Otherwise double quotes
+ * preserve things literally.
  *
  * Returns: (type filename): an unquoted string
  */
  * @block_size: the number of bytes to allocate
  *
  * Allocates a block of memory from the slice allocator.
+ *
  * The block address handed out can be expected to be aligned
- * to at least 1 * sizeof (void*),
- * though in general slices are 2 * sizeof (void*) bytes aligned,
- * if a malloc() fallback implementation is used instead,
- * the alignment may be reduced in a libc dependent fashion.
+ * to at least `1 * sizeof (void*)`, though in general slices
+ * are `2 * sizeof (void*)` bytes aligned; if a `malloc()`
+ * fallback implementation is used instead, the alignment may
+ * be reduced in a libc dependent fashion.
+ *
  * Note that the underlying slice allocation mechanism can
  * be changed with the [`G_SLICE=always-malloc`][G_SLICE]
  * environment variable.
  *
- * Returns: a pointer to the allocated memory block, which will be %NULL if and
- *    only if @mem_size is 0
+ * Returns: a pointer to the allocated memory block, which will
+ *   be %NULL if and only if @mem_size is 0
  * Since: 2.10
  */
 
  * @next: the field name of the next pointer in @type
  *
  * Frees a linked list of memory blocks of structure type @type.
+ *
  * The memory blocks must be equal-sized, allocated via
  * g_slice_alloc() or g_slice_alloc0() and linked together by
  * a @next pointer (similar to #GSList). The name of the
  *
  * This function is safe to call from any thread, regardless of which thread
  * the #GMainContext is running in.
+ *
+ * If the source is currently attached to a #GMainContext, destroying it
+ * will effectively unset the callback similar to calling g_source_set_callback().
+ * This can mean, that the data's #GDestroyNotify gets called right away.
  */
 
 
  * It is safe to call this function multiple times on a source which has already
  * been attached to a context. The changes will take effect for the next time
  * the source is dispatched after this call returns.
+ *
+ * Note that g_source_destroy() for a currently attached source has the effect
+ * of also unsetting the callback.
  */
 
 
  * the value, and changing the value will free it while the other thread
  * may be attempting to use it.
  *
+ * Also see g_source_set_static_name().
+ *
  * Since: 2.26
  */
 
 
 
 /**
+ * g_source_set_static_name:
+ * @source: a #GSource
+ * @name: debug name for the source
+ *
+ * A variant of g_source_set_name() that does not
+ * duplicate the @name, and can only be used with
+ * string literals.
+ *
+ * Since: 2.70
+ */
+
+
+/**
  * g_source_unref:
  * @source: a #GSource
  *
  * @child_pid: (out) (optional): return location for child process reference, or %NULL
  * @error: return location for error
  *
+ * Executes a child program asynchronously.
+ *
  * See g_spawn_async_with_pipes() for a full description; this function
  * simply calls the g_spawn_async_with_pipes() without any pipes.
  *
  * You should call g_spawn_close_pid() on the returned child process
  * reference when you don't need it any more.
  *
- * If you are writing a GTK+ application, and the program you are spawning is a
+ * If you are writing a GTK application, and the program you are spawning is a
  * graphical application too, then to ensure that the spawned program opens its
  * windows on the right screen, you may want to use #GdkAppLaunchContext,
  * #GAppLaunchContext, or set the %DISPLAY environment variable.
  * @stderr_fd: file descriptor to use for child's stderr, or `-1`
  * @error: return location for error
  *
+ * Executes a child program asynchronously.
+ *
  * Identical to g_spawn_async_with_pipes_and_fds() but with `n_fds` set to zero,
  * so no FD assignments are used.
  *
  * @error: return location for error
  *
  * Executes a child program asynchronously (your program will not
- * block waiting for the child to exit). The child program is
- * specified by the only argument that must be provided, @argv.
- * @argv should be a %NULL-terminated array of strings, to be passed
- * as the argument vector for the child. The first string in @argv
- * is of course the name of the program to execute. By default, the
- * name of the program must be a full path. If @flags contains the
- * %G_SPAWN_SEARCH_PATH flag, the `PATH` environment variable is
- * used to search for the executable. If @flags contains the
- * %G_SPAWN_SEARCH_PATH_FROM_ENVP flag, the `PATH` variable from
- * @envp is used to search for the executable. If both the
- * %G_SPAWN_SEARCH_PATH and %G_SPAWN_SEARCH_PATH_FROM_ENVP flags
- * are set, the `PATH` variable from @envp takes precedence over
- * the environment variable.
- *
- * If the program name is not a full path and %G_SPAWN_SEARCH_PATH flag is not
- * used, then the program will be run from the current directory (or
- * @working_directory, if specified); this might be unexpected or even
+ * block waiting for the child to exit).
+ *
+ * The child program is specified by the only argument that must be
+ * provided, @argv. @argv should be a %NULL-terminated array of strings,
+ * to be passed as the argument vector for the child. The first string
+ * in @argv is of course the name of the program to execute. By default,
+ * the name of the program must be a full path. If @flags contains the
+ * %G_SPAWN_SEARCH_PATH flag, the `PATH` environment variable is used to
+ * search for the executable. If @flags contains the
+ * %G_SPAWN_SEARCH_PATH_FROM_ENVP flag, the `PATH` variable from @envp
+ * is used to search for the executable. If both the
+ * %G_SPAWN_SEARCH_PATH and %G_SPAWN_SEARCH_PATH_FROM_ENVP flags are
+ * set, the `PATH` variable from @envp takes precedence over the
+ * environment variable.
+ *
+ * If the program name is not a full path and %G_SPAWN_SEARCH_PATH flag
+ * is not used, then the program will be run from the current directory
+ * (or @working_directory, if specified); this might be unexpected or even
  * dangerous in some cases when the current directory is world-writable.
  *
  * On Windows, note that all the string or string vector arguments to
- * this function and the other g_spawn*() functions are in UTF-8, the
+ * this function and the other `g_spawn*()` functions are in UTF-8, the
  * GLib file name encoding. Unicode characters that are not part of
  * the system codepage passed in these arguments will be correctly
  * available in the spawned program only if it uses wide character API
  * to retrieve its command line. For C programs built with Microsoft's
- * tools it is enough to make the program have a wmain() instead of
- * main(). wmain() has a wide character argument vector as parameter.
+ * tools it is enough to make the program have a `wmain()` instead of
+ * `main()`. `wmain()` has a wide character argument vector as parameter.
  *
- * At least currently, mingw doesn't support wmain(), so if you use
+ * At least currently, mingw doesn't support `wmain()`, so if you use
  * mingw to develop the spawned program, it should call
  * g_win32_get_command_line() to get arguments in UTF-8.
  *
- * On Windows the low-level child process creation API CreateProcess()
+ * On Windows the low-level child process creation API `CreateProcess()`
  * doesn't use argument vectors, but a command line. The C runtime
- * library's spawn*() family of functions (which g_spawn_async_with_pipes()
+ * library's `spawn*()` family of functions (which g_spawn_async_with_pipes()
  * eventually calls) paste the argument vector elements together into
  * a command line, and the C runtime startup code does a corresponding
  * reconstruction of an argument vector from the command line, to be
- * passed to main(). Complications arise when you have argument vector
+ * passed to `main()`. Complications arise when you have argument vector
  * elements that contain spaces or double quotes. The `spawn*()` functions
  * don't do any quoting or escaping, but on the other hand the startup
  * code does do unquoting and unescaping in order to enable receiving
  * arguments with embedded spaces or double quotes. To work around this
  * asymmetry, g_spawn_async_with_pipes() will do quoting and escaping on
  * argument vector elements that need it before calling the C runtime
- * spawn() function.
+ * `spawn()` function.
  *
  * The returned @child_pid on Windows is a handle to the child
  * process, not its identifier. Process handles and process
  * free resources which may be associated with the child process. (On Unix,
  * using a child watch is equivalent to calling waitpid() or handling
  * the `SIGCHLD` signal manually. On Windows, calling g_spawn_close_pid()
- * is equivalent to calling CloseHandle() on the process handle returned
+ * is equivalent to calling `CloseHandle()` on the process handle returned
  * in @child_pid). See g_child_watch_add().
  *
  * Open UNIX file descriptors marked as `FD_CLOEXEC` will be automatically
  * closed in the child process. %G_SPAWN_LEAVE_DESCRIPTORS_OPEN means that
  * other open file descriptors will be inherited by the child; otherwise all
- * descriptors except stdin/stdout/stderr will be closed before calling exec()
+ * descriptors except stdin/stdout/stderr will be closed before calling `exec()`
  * in the child. %G_SPAWN_SEARCH_PATH means that @argv[0] need not be an
  * absolute path, it will be looked for in the `PATH` environment
  * variable. %G_SPAWN_SEARCH_PATH_FROM_ENVP means need not be an
  * @child_setup and @user_data are a function and user data. On POSIX
  * platforms, the function is called in the child after GLib has
  * performed all the setup it plans to perform (including creating
- * pipes, closing file descriptors, etc.) but before calling exec().
- * That is, @child_setup is called just before calling exec() in the
+ * pipes, closing file descriptors, etc.) but before calling `exec()`.
+ * That is, @child_setup is called just before calling `exec()` in the
  * child. Obviously actions taken in this function will only affect
  * the child, not the parent.
  *
- * On Windows, there is no separate fork() and exec() functionality.
+ * On Windows, there is no separate `fork()` and `exec()` functionality.
  * Child processes are created and run with a single API call,
- * CreateProcess(). There is no sensible thing @child_setup
+ * `CreateProcess()`. There is no sensible thing @child_setup
  * could be used for on Windows so it is ignored and not called.
  *
  * If non-%NULL, @child_pid will on Unix be filled with the child's
  * process ID. You can use the process ID to send signals to the child,
- * or to use g_child_watch_add() (or waitpid()) if you specified the
+ * or to use g_child_watch_add() (or `waitpid()`) if you specified the
  * %G_SPAWN_DO_NOT_REAP_CHILD flag. On Windows, @child_pid will be
  * filled with a handle to the child process only if you specified the
  * %G_SPAWN_DO_NOT_REAP_CHILD flag. You can then access the child
  * process using the Win32 API, for example wait for its termination
- * with the WaitFor*() functions, or examine its exit code with
- * GetExitCodeProcess(). You should close the handle with CloseHandle()
+ * with the `WaitFor*()` functions, or examine its exit code with
+ * `GetExitCodeProcess()`. You should close the handle with `CloseHandle()`
  * or g_spawn_close_pid() when you no longer need it.
  *
  * If non-%NULL, the @stdin_pipe_out, @stdout_pipe_out, @stderr_pipe_out
  * @error can be %NULL to ignore errors, or non-%NULL to report errors.
  * If an error is set, the function returns %FALSE. Errors are reported
  * even if they occur in the child (for example if the executable in
- * @argv[0] is not found). Typically the `message` field of returned
+ * `@argv[0]` is not found). Typically the `message` field of returned
  * errors should be displayed to users. Possible errors are those from
  * the #G_SPAWN_ERROR domain.
  *
  * process reference must be closed using g_spawn_close_pid().
  *
  * On modern UNIX platforms, GLib can use an efficient process launching
- * codepath driven internally by posix_spawn(). This has the advantage of
+ * codepath driven internally by `posix_spawn()`. This has the advantage of
  * avoiding the fork-time performance costs of cloning the parent process
  * address space, and avoiding associated memory overcommit checks that are
  * not relevant in the context of immediately executing a distinct process.
  * 3. %G_SPAWN_SEARCH_PATH_FROM_ENVP is not set
  * 4. @working_directory is %NULL
  * 5. @child_setup is %NULL
- * 6. The program is of a recognised binary format, or has a shebang. Otherwise, GLib will have to execute the program through the shell, which is not done using the optimized codepath.
+ * 6. The program is of a recognised binary format, or has a shebang.
+ *    Otherwise, GLib will have to execute the program through the
+ *    shell, which is not done using the optimized codepath.
  *
- * If you are writing a GTK+ application, and the program you are spawning is a
+ * If you are writing a GTK application, and the program you are spawning is a
  * graphical application too, then to ensure that the spawned program opens its
  * windows on the right screen, you may want to use #GdkAppLaunchContext,
  * #GAppLaunchContext, or set the `DISPLAY` environment variable.
 
 /**
  * g_spawn_check_exit_status:
- * @exit_status: An exit code as returned from g_spawn_sync()
+ * @wait_status: A status as returned from g_spawn_sync()
+ * @error: a #GError
+ *
+ * An old name for g_spawn_check_wait_status(), deprecated because its
+ * name is misleading.
+ *
+ * Despite the name of the function, @wait_status must be the wait status
+ * as returned by g_spawn_sync(), g_subprocess_get_status(), `waitpid()`,
+ * etc. On Unix platforms, it is incorrect for it to be the exit status
+ * as passed to `exit()` or returned by g_subprocess_get_exit_status() or
+ * `WEXITSTATUS()`.
+ *
+ * Returns: %TRUE if child exited successfully, %FALSE otherwise (and
+ *     @error will be set)
+ * Since: 2.34
+ * Deprecated: 2.70: Use g_spawn_check_wait_status() instead, and check whether your code is conflating wait and exit statuses.
+ */
+
+
+/**
+ * g_spawn_check_wait_status:
+ * @wait_status: A platform-specific wait status as returned from g_spawn_sync()
  * @error: a #GError
  *
- * Set @error if @exit_status indicates the child exited abnormally
+ * Set @error if @wait_status indicates the child exited abnormally
  * (e.g. with a nonzero exit code, or via a fatal signal).
  *
- * The g_spawn_sync() and g_child_watch_add() family of APIs return an
- * exit status for subprocesses encoded in a platform-specific way.
+ * The g_spawn_sync() and g_child_watch_add() family of APIs return the
+ * status of subprocesses encoded in a platform-specific way.
  * On Unix, this is guaranteed to be in the same format waitpid() returns,
  * and on Windows it is guaranteed to be the result of GetExitCodeProcess().
  *
  * Prior to the introduction of this function in GLib 2.34, interpreting
- * @exit_status required use of platform-specific APIs, which is problematic
+ * @wait_status required use of platform-specific APIs, which is problematic
  * for software using GLib as a cross-platform layer.
  *
  * Additionally, many programs simply want to determine whether or not
  * the child exited successfully, and either propagate a #GError or
  * print a message to standard error. In that common case, this function
  * can be used. Note that the error message in @error will contain
- * human-readable information about the exit status.
+ * human-readable information about the wait status.
  *
  * The @domain and @code of @error have special semantics in the case
  * where the process has an "exit code", as opposed to being killed by
  * a signal. On Unix, this happens if WIFEXITED() would be true of
- * @exit_status. On Windows, it is always the case.
+ * @wait_status. On Windows, it is always the case.
  *
  * The special semantics are that the actual exit code will be the
  * code set in @error, and the domain will be %G_SPAWN_EXIT_ERROR.
  * This allows you to differentiate between different exit codes.
  *
  * If the process was terminated by some means other than an exit
- * status, the domain will be %G_SPAWN_ERROR, and the code will be
- * %G_SPAWN_ERROR_FAILED.
+ * status (for example if it was killed by a signal), the domain will be
+ * %G_SPAWN_ERROR and the code will be %G_SPAWN_ERROR_FAILED.
  *
  * This function just offers convenience; you can of course also check
  * the available platform via a macro such as %G_OS_UNIX, and use
- * WIFEXITED() and WEXITSTATUS() on @exit_status directly. Do not attempt
+ * WIFEXITED() and WEXITSTATUS() on @wait_status directly. Do not attempt
  * to scan or parse the error message string; it may be translated and/or
  * change in future versions of GLib.
  *
+ * Prior to version 2.70, g_spawn_check_exit_status() provides the same
+ * functionality, although under a misleading name.
+ *
  * Returns: %TRUE if child exited successfully, %FALSE otherwise (and
- *     @error will be set)
- * Since: 2.34
+ *   @error will be set)
+ * Since: 2.70
  */
 
 
  * @error: return location for errors
  *
  * A simple version of g_spawn_async() that parses a command line with
- * g_shell_parse_argv() and passes it to g_spawn_async(). Runs a
- * command line in the background. Unlike g_spawn_async(), the
+ * g_shell_parse_argv() and passes it to g_spawn_async().
+ *
+ * Runs a command line in the background. Unlike g_spawn_async(), the
  * %G_SPAWN_SEARCH_PATH flag is enabled, other flags are not. Note
  * that %G_SPAWN_SEARCH_PATH can have security implications, so
  * consider using g_spawn_async() directly if appropriate. Possible
  * @command_line: (type filename): a command line
  * @standard_output: (out) (array zero-terminated=1) (element-type guint8) (optional): return location for child output
  * @standard_error: (out) (array zero-terminated=1) (element-type guint8) (optional): return location for child errors
- * @exit_status: (out) (optional): return location for child exit status, as returned by waitpid()
+ * @wait_status: (out) (optional): return location for child wait status, as returned by waitpid()
  * @error: return location for errors
  *
  * A simple version of g_spawn_sync() with little-used parameters
- * removed, taking a command line instead of an argument vector.  See
- * g_spawn_sync() for full details. @command_line will be parsed by
- * g_shell_parse_argv(). Unlike g_spawn_sync(), the %G_SPAWN_SEARCH_PATH flag
- * is enabled. Note that %G_SPAWN_SEARCH_PATH can have security
- * implications, so consider using g_spawn_sync() directly if
- * appropriate. Possible errors are those from g_spawn_sync() and those
+ * removed, taking a command line instead of an argument vector.
+ *
+ * See g_spawn_sync() for full details.
+ *
+ * The @command_line argument will be parsed by g_shell_parse_argv().
+ *
+ * Unlike g_spawn_sync(), the %G_SPAWN_SEARCH_PATH flag is enabled.
+ * Note that %G_SPAWN_SEARCH_PATH can have security implications, so
+ * consider using g_spawn_sync() directly if appropriate.
+ *
+ * Possible errors are those from g_spawn_sync() and those
  * from g_shell_parse_argv().
  *
- * If @exit_status is non-%NULL, the platform-specific exit status of
+ * If @wait_status is non-%NULL, the platform-specific status of
  * the child is stored there; see the documentation of
- * g_spawn_check_exit_status() for how to use and interpret this.
+ * g_spawn_check_wait_status() for how to use and interpret this.
+ * On Unix platforms, note that it is usually not equal
+ * to the integer passed to `exit()` or returned from `main()`.
  *
  * On Windows, please note the implications of g_shell_parse_argv()
  * parsing @command_line. Parsing is done according to Unix shell rules, not
  * @user_data: (closure): user data for @child_setup
  * @standard_output: (out) (array zero-terminated=1) (element-type guint8) (optional): return location for child output, or %NULL
  * @standard_error: (out) (array zero-terminated=1) (element-type guint8) (optional): return location for child error messages, or %NULL
- * @exit_status: (out) (optional): return location for child exit status, as returned by waitpid(), or %NULL
+ * @wait_status: (out) (optional): return location for child wait status, as returned by waitpid(), or %NULL
  * @error: return location for error, or %NULL
  *
  * Executes a child synchronously (waits for the child to exit before returning).
+ *
  * All output from the child is stored in @standard_output and @standard_error,
  * if those parameters are non-%NULL. Note that you must set the
  * %G_SPAWN_STDOUT_TO_DEV_NULL and %G_SPAWN_STDERR_TO_DEV_NULL flags when
  * passing %NULL for @standard_output and @standard_error.
  *
- * If @exit_status is non-%NULL, the platform-specific exit status of
+ * If @wait_status is non-%NULL, the platform-specific status of
  * the child is stored there; see the documentation of
- * g_spawn_check_exit_status() for how to use and interpret this.
+ * g_spawn_check_wait_status() for how to use and interpret this.
+ * On Unix platforms, note that it is usually not equal
+ * to the integer passed to `exit()` or returned from `main()`.
+ *
  * Note that it is invalid to pass %G_SPAWN_DO_NOT_REAP_CHILD in
  * @flags, and on POSIX platforms, the same restrictions as for
  * g_child_watch_source_new() apply.
  *
  * If an error occurs, no data is returned in @standard_output,
- * @standard_error, or @exit_status.
+ * @standard_error, or @wait_status.
  *
  * This function calls g_spawn_async_with_pipes() internally; see that
  * function for full details on the other parameters and details on
 
 
 /**
+ * g_steal_fd:
+ * @fd_ptr: (not optional) (inout): A pointer to a file descriptor
+ *
+ * Sets @fd_ptr to `-1`, returning the value that was there before.
+ *
+ * Conceptually, this transfers the ownership of the file descriptor
+ * from the referenced variable to the caller of the function (i.e.
+ * ‘steals’ the reference). This is very similar to g_steal_pointer(),
+ * but for file descriptors.
+ *
+ * On POSIX platforms, this function is async-signal safe
+ * (see [`signal(7)`](man:signal(7)) and
+ * [`signal-safety(7)`](man:signal-safety(7))), making it safe to call from a
+ * signal handler or a #GSpawnChildSetupFunc.
+ *
+ * Returns: the value that @fd_ptr previously had
+ * Since: 2.70
+ */
+
+
+/**
  * g_stpcpy:
  * @dest: destination buffer.
  * @src: source string.
  * @substitutor: replacement character for disallowed bytes
  *
  * For each character in @string, if the character is not in @valid_chars,
- * replaces the character with @substitutor. Modifies @string in place,
- * and return @string itself, not a copy. The return value is to allow
- * nesting such as
+ * replaces the character with @substitutor.
+ *
+ * Modifies @string in place, and return @string itself, not a copy. The
+ * return value is to allow nesting such as:
+ *
  * |[<!-- language="C" -->
  *   g_ascii_strup (g_strcanon (str, "abc", '?'))
  * ]|
  *
- * In order to modify a copy, you may use `g_strdup()`:
+ * In order to modify a copy, you may use g_strdup():
+ *
  * |[<!-- language="C" -->
  *   reformatted = g_strcanon (g_strdup (const_str), "abc", '?');
  *   ...
  *   g_free (reformatted);
  * ]|
  *
- * Returns: @string
+ * Returns: the modified @string
  */
 
 
  * @new_delimiter: the new delimiter character
  *
  * Converts any delimiter characters in @string to @new_delimiter.
+ *
  * Any characters in @string which are found in @delimiters are
  * changed to the @new_delimiter character. Modifies @string in place,
- * and returns @string itself, not a copy. The return value is to
- * allow nesting such as
+ * and returns @string itself, not a copy.
+ *
+ * The return value is to allow nesting such as:
+ *
  * |[<!-- language="C" -->
  *   g_ascii_strup (g_strdelimit (str, "abc", '?'))
  * ]|
  *
- * In order to modify a copy, you may use `g_strdup()`:
+ * In order to modify a copy, you may use g_strdup():
+ *
  * |[<!-- language="C" -->
  *   reformatted = g_strdelimit (g_strdup (const_str), "abc", '?');
  *   ...
  *   g_free (reformatted);
  * ]|
  *
- * Returns: @string
+ * Returns: the modified @string
  */
 
 
  *
  * Replaces the string @find with the string @replace in a #GString up to
  * @limit times. If the number of instances of @find in the #GString is
- * less than @limit, all instances are replaced. If the number of
- * instances is `0`, all instances of @find are replaced.
+ * less than @limit, all instances are replaced. If @limit is `0`,
+ * all instances of @find are replaced.
+ *
+ * If @find is the empty string, since versions 2.69.1 and 2.68.4 the
+ * replacement will be inserted no more than once per possible position
+ * (beginning of string, end of string and between characters). This did
+ * not work correctly in earlier versions.
  *
  * Returns: the number of find and replace operations performed.
  * Since: 2.68
 
 
 /**
+ * g_strv_builder_add_many:
+ * @builder: a #GStrvBuilder
+ * @...: one or more strings followed by %NULL
+ *
+ * Appends all the given strings to the builder.
+ *
+ * Since 2.70
+ */
+
+
+/**
+ * g_strv_builder_addv:
+ * @builder: a #GStrvBuilder
+ * @value: (array zero-terminated=1): the vector of strings to add
+ *
+ * Appends all the strings in the given vector to the builder.
+ *
+ * Since 2.70
+ */
+
+
+/**
  * g_strv_builder_end:
  * @builder: a #GStrvBuilder
  *
 
 /**
  * g_test_bug:
- * @bug_uri_snippet: Bug specific bug tracker URI portion.
+ * @bug_uri_snippet: Bug specific bug tracker URI or URI portion.
  *
  * This function adds a message to test reports that
  * associates a bug URI with a test case.
+ *
  * Bug URIs are constructed from a base URI set with g_test_bug_base()
  * and @bug_uri_snippet. If g_test_bug_base() has not been called, it is
  * assumed to be the empty string, so a full URI can be provided to
  * g_test_bug() instead.
  *
+ * Since GLib 2.70, the base URI is not prepended to @bug_uri_snippet if it
+ * is already a valid URI.
+ *
  * Since: 2.16:
  * See also: g_test_summary()
  */
  * case only.
  * Bug URIs are constructed by appending a bug specific URI
  * portion to @uri_pattern, or by replacing the special string
- * '\%s' within @uri_pattern if that is present.
+ * `%s` within @uri_pattern if that is present.
  *
  * If g_test_bug_base() is not called, bug URIs are formed solely
  * from the value provided by g_test_bug().
 
 
 /**
+ * g_test_case_free:
+ * @test_case: a #GTestCase
+ *
+ * Free the @test_case.
+ *
+ * Since: 2.70
+ */
+
+
+/**
  * g_test_create_case:
  * @test_name: the name for the test case
  * @data_size: the size of the fixture data structure
 
 
 /**
+ * g_test_suite_free:
+ * @suite: a #GTestSuite
+ *
+ * Free the @suite and all nested #GTestSuites.
+ *
+ * Since: 2.70
+ */
+
+
+/**
  * g_test_summary:
  * @summary: One or two sentences summarising what the test checks, and how it
  *    checks it.
 
 
 /**
+ * g_thread_pool_new_full:
+ * @func: a function to execute in the threads of the new thread pool
+ * @user_data: user data that is handed over to @func every time it
+ *     is called
+ * @item_free_func: (nullable): used to pass as a free function to
+ *     g_async_queue_new_full()
+ * @max_threads: the maximal number of threads to execute concurrently
+ *     in the new thread pool, `-1` means no limit
+ * @exclusive: should this thread pool be exclusive?
+ * @error: return location for error, or %NULL
+ *
+ * This function creates a new thread pool similar to g_thread_pool_new()
+ * but allowing @item_free_func to be specified to free the data passed
+ * to g_thread_pool_push() in the case that the #GThreadPool is stopped
+ * and freed before all tasks have been executed.
+ *
+ * Returns: (transfer full): the new #GThreadPool
+ * Since: 2.70
+ */
+
+
+/**
  * g_thread_pool_push:
  * @pool: a #GThreadPool
  * @data: a new task for @pool
 /**
  * g_timeout_add:
  * @interval: the time between calls to the function, in milliseconds
- *             (1/1000ths of a second)
+ *    (1/1000ths of a second)
  * @function: function to call
  * @data: data to pass to @function
  *
  * Sets a function to be called at regular intervals, with the default
- * priority, #G_PRIORITY_DEFAULT.  The function is called repeatedly
- * until it returns %FALSE, at which point the timeout is automatically
- * destroyed and the function will not be called again.  The first call
- * to the function will be at the end of the first @interval.
+ * priority, %G_PRIORITY_DEFAULT.
+ *
+ * The given @function is called repeatedly until it returns %G_SOURCE_REMOVE
+ * or %FALSE, at which point the timeout is automatically destroyed and the
+ * function will not be called again. The first call to the function will be
+ * at the end of the first @interval.
  *
  * Note that timeout functions may be delayed, due to the processing of other
  * event sources. Thus they should not be relied on for precise timing.
 /**
  * g_timeout_add_full: (rename-to g_timeout_add)
  * @priority: the priority of the timeout source. Typically this will be in
- *            the range between #G_PRIORITY_DEFAULT and #G_PRIORITY_HIGH.
+ *   the range between %G_PRIORITY_DEFAULT and %G_PRIORITY_HIGH.
  * @interval: the time between calls to the function, in milliseconds
- *             (1/1000ths of a second)
+ *   (1/1000ths of a second)
  * @function: function to call
  * @data: data to pass to @function
  * @notify: (nullable): function to call when the timeout is removed, or %NULL
  * @data: data to pass to @function
  *
  * Sets a function to be called at regular intervals with the default
- * priority, #G_PRIORITY_DEFAULT. The function is called repeatedly until
- * it returns %FALSE, at which point the timeout is automatically destroyed
+ * priority, %G_PRIORITY_DEFAULT.
+ *
+ * The function is called repeatedly until it returns %G_SOURCE_REMOVE
+ * or %FALSE, at which point the timeout is automatically destroyed
  * and the function will not be called again.
  *
  * This internally creates a main loop source using
 /**
  * g_timeout_add_seconds_full: (rename-to g_timeout_add_seconds)
  * @priority: the priority of the timeout source. Typically this will be in
- *            the range between #G_PRIORITY_DEFAULT and #G_PRIORITY_HIGH.
+ *   the range between %G_PRIORITY_DEFAULT and %G_PRIORITY_HIGH.
  * @interval: the time between calls to the function, in seconds
  * @function: function to call
  * @data: data to pass to @function
  * @notify: (nullable): 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
- * point the timeout is automatically destroyed and the function will
- * not be called again.
+ *
+ * The function is called repeatedly until it returns %G_SOURCE_REMOVE
+ * or %FALSE, at which point the timeout is automatically destroyed and
+ * the function will not be called again.
  *
  * Unlike g_timeout_add(), this function operates at whole second granularity.
  * The initial starting point of the timer is determined by the implementation
  * and the implementation is expected to group multiple timers together so that
- * they fire all at the same time.
- * To allow this grouping, the @interval to the first timer is rounded
- * and can deviate up to one second from the specified interval.
- * Subsequent timer iterations will generally run at the specified interval.
+ * they fire all at the same time. To allow this grouping, the @interval to the
+ * first timer is rounded and can deviate up to one second from the specified
+ * interval. Subsequent timer iterations will generally run at the specified
+ * interval.
  *
  * Note that timeout functions may be delayed, due to the processing of other
  * event sources. Thus they should not be relied on for precise timing.
 
 
 /**
+ * g_tree_remove_all:
+ * @tree: a #GTree
+ *
+ * Removes all nodes from a #GTree and destroys their keys and values,
+ * then resets the #GTree’s root to %NULL.
+ *
+ * Since: 2.70
+ */
+
+
+/**
  * g_tree_replace:
  * @tree: a #GTree
  * @key: the key to insert
  * @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: (out caller-allocates) (optional): location to store number of
+ * @items_read: (out) (optional): 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: (out caller-allocates) (optional): location to store number
+ * @items_written: (out) (optional): location to store number
  *     of #gunichar2  written, or %NULL. The value stored here does not include
  *     the trailing 0.
  * @error: location to store the error occurring, or %NULL to ignore
  * @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: (out caller-allocates) (optional): location to store number of
+ * @items_read: (out) (optional): location to store number of
  *     characters read, or %NULL.
- * @items_written: (out caller-allocates) (optional): location to store number
+ * @items_written: (out) (optional): 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
  * @str: a UTF-16 encoded string
  * @len: the maximum length (number of #gunichar2) of @str to use.
  *     If @len < 0, then the string is nul-terminated.
- * @items_read: (out caller-allocates) (optional): location to store number of
+ * @items_read: (out) (optional): 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: (out caller-allocates) (optional): location to store number
+ * @items_written: (out) (optional): 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
  * @str: a UTF-16 encoded string
  * @len: the maximum length (number of #gunichar2) of @str to use.
  *     If @len < 0, then the string is nul-terminated.
- * @items_read: (out caller-allocates) (optional): location to store number of
+ * @items_read: (out) (optional): 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: (out caller-allocates) (optional): location to store number
+ * @items_written: (out) (optional): 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
  * @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: (out caller-allocates) (optional): location to store number of
+ * @items_read: (out) (optional): 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: (out caller-allocates) (optional): location to store number
+ * @items_written: (out) (optional): 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
  * @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: (out caller-allocates) (optional): location to store the
+ * @items_written: (out) (optional): location to store the
  *     number of characters in the result, or %NULL.
  *
  * Convert a string from UTF-8 to a 32-bit fixed width
  * @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: (out caller-allocates) (optional): location to store number of
+ * @items_read: (out) (optional): 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: (out caller-allocates) (optional): location to store number
+ * @items_written: (out) (optional): location to store number
  *     of #gunichar2 written, or %NULL. The value stored here does not include
  *     the trailing 0.
  * @error: location to store the error occurring, or %NULL to ignore
  *
  * Note that values borrowed from the returned child are not guaranteed to
  * still be valid after the child is freed even if you still hold a reference
- * to @value, if @value has not been serialised at the time this function is
+ * to @value, if @value has not been serialized at the time this function is
  * called. To avoid this, you can serialize @value by calling
  * g_variant_get_data() and optionally ignoring the return value.
  *
  * g_variant_get_data:
  * @value: a #GVariant instance
  *
- * Returns a pointer to the serialised form of a #GVariant instance.
+ * Returns a pointer to the serialized form of a #GVariant instance.
  * The returned data may not be in fully-normalised form if read from an
  * untrusted source.  The returned data must not be freed; it remains
  * valid for as long as @value exists.
  *
- * If @value is a fixed-sized value that was deserialised from a
- * corrupted serialised container then %NULL may be returned.  In this
+ * If @value is a fixed-sized value that was deserialized from a
+ * corrupted serialized container then %NULL may be returned.  In this
  * case, the proper thing to do is typically to use the appropriate
  * number of nul bytes in place of @value.  If @value is not fixed-sized
  * then %NULL is never returned.
  *
- * In the case that @value is already in serialised form, this function
- * is O(1).  If the value is not already in serialised form,
- * serialisation occurs implicitly and is approximately O(n) in the size
+ * In the case that @value is already in serialized form, this function
+ * is O(1).  If the value is not already in serialized form,
+ * serialization occurs implicitly and is approximately O(n) in the size
  * of the result.
  *
- * To deserialise the data returned by this function, in addition to the
- * serialised data, you must know the type of the #GVariant, and (if the
+ * To deserialize the data returned by this function, in addition to the
+ * serialized data, you must know the type of the #GVariant, and (if the
  * machine might be different) the endianness of the machine that stored
  * it. As a result, file formats or network messages that incorporate
- * serialised #GVariants must include this information either
+ * serialized #GVariants must include this information either
  * implicitly (for instance "the file always contains a
  * %G_VARIANT_TYPE_VARIANT and it is always in little-endian order") or
  * explicitly (by storing the type and/or endianness in addition to the
- * serialised data).
+ * serialized data).
  *
- * Returns: (transfer none): the serialised form of @value, or %NULL
+ * Returns: (transfer none): the serialized form of @value, or %NULL
  * Since: 2.24
  */
 
  * g_variant_get_data_as_bytes:
  * @value: a #GVariant
  *
- * Returns a pointer to the serialised form of a #GVariant instance.
+ * Returns a pointer to the serialized form of a #GVariant instance.
  * The semantics of this function are exactly the same as
  * g_variant_get_data(), except that the returned #GBytes holds
  * a reference to the variant data.
  * @n_elements: (out): a pointer to the location to store the number of items
  * @element_size: the size of each element
  *
- * Provides access to the serialised data for an array of fixed-sized
+ * Provides access to the serialized data for an array of fixed-sized
  * items.
  *
  * @value must be an array with fixed-sized elements.  Numeric types are
  *
  * @element_size must be the size of a single element in the array,
  * as given by the section on
- * [serialized data memory][gvariant-serialised-data-memory].
+ * [serialized data memory][gvariant-serialized-data-memory].
  *
  * In particular, arrays of these fixed-sized types can be interpreted
  * as an array of the given C type, with @element_size set to the size
  *
  * For example, if calling this function for an array of 32-bit integers,
  * you might say `sizeof(gint32)`. This value isn't used except for the purpose
- * of a double-check that the form of the serialised data matches the caller's
+ * of a double-check that the form of the serialized data matches the caller's
  * expectation.
  *
  * @n_elements, which must be non-%NULL, is set equal to the number of
  * #GVariant is created with the same value as @value.
  *
  * It makes sense to call this function if you've received #GVariant
- * data from untrusted sources and you want to ensure your serialised
+ * data from untrusted sources and you want to ensure your serialized
  * output is definitely in normal form.
  *
  * If @value is already in normal form, a new reference will be returned
  * If @value has a fixed-sized type then this function always returned
  * that fixed size.
  *
- * In the case that @value is already in serialised form or the size has
+ * In the case that @value is already in serialized form or the size has
  * already been calculated (ie: this function has been called before)
  * then this function is O(1).  Otherwise, the size is calculated, an
  * operation which is approximately O(n) in the number of values
  * involved.
  *
- * Returns: the serialised size of @value
+ * Returns: the serialized size of @value
  * Since: 2.24
  */
 
  * Checks if @value is in normal form.
  *
  * The main reason to do this is to detect if a given chunk of
- * serialised data is in normal form: load the data into a #GVariant
+ * serialized data is in normal form: load the data into a #GVariant
  * using g_variant_new_from_data() and then use this function to
  * check.
  *
  * @element_size must be the size of a single element in the array.
  * For example, if calling this function for an array of 32-bit integers,
  * you might say sizeof(gint32). This value isn't used except for the purpose
- * of a double-check that the form of the serialised data matches the caller's
+ * of a double-check that the form of the serialized data matches the caller's
  * expectation.
  *
  * @n_elements must be the length of the @elements array.
  * @bytes: a #GBytes
  * @trusted: if the contents of @bytes are trusted
  *
- * Constructs a new serialised-mode #GVariant instance.  This is the
- * inner interface for creation of new serialised values that gets
+ * Constructs a new serialized-mode #GVariant instance.  This is the
+ * inner interface for creation of new serialized values that gets
  * called from various functions in gvariant.c.
  *
  * A reference is taken on @bytes.
 /**
  * g_variant_new_from_data:
  * @type: a definite #GVariantType
- * @data: (array length=size) (element-type guint8): the serialised data
+ * @data: (array length=size) (element-type guint8): the serialized data
  * @size: the size of @data
  * @trusted: %TRUE if @data is definitely in normal form
  * @notify: (scope async): function to call when @data is no longer needed
  * @user_data: data for @notify
  *
- * Creates a new #GVariant instance from serialised data.
+ * Creates a new #GVariant instance from serialized data.
  *
  * @type is the type of #GVariant instance that will be constructed.
  * The interpretation of @data depends on knowing the type.
  * @user_data.  If the contents of @data change before that time then
  * the result is undefined.
  *
- * If @data is trusted to be serialised data in normal form then
- * @trusted should be %TRUE.  This applies to serialised data created
+ * If @data is trusted to be serialized data in normal form then
+ * @trusted should be %TRUE.  This applies to serialized data created
  * within this process or read from a trusted location on the disk (such
  * as a file installed in /usr/lib alongside your application).  You
  * should set trusted to %FALSE if @data is read from the network, a
 /**
  * g_variant_store:
  * @value: the #GVariant to store
- * @data: (not nullable): the location to store the serialised data at
+ * @data: (not nullable): the location to store the serialized data at
  *
- * Stores the serialised form of @value at @data.  @data should be
+ * Stores the serialized form of @value at @data.  @data should be
  * large enough.  See g_variant_get_size().
  *
  * The stored data is in machine native byte order but may not be in
  * fully-normalised form if read from an untrusted source.  See
  * g_variant_get_normal_form() for a solution.
  *
- * As with g_variant_get_data(), to be able to deserialise the
- * serialised variant successfully, its type and (if the destination
+ * As with g_variant_get_data(), to be able to deserialize the
+ * serialized variant successfully, its type and (if the destination
  * machine might be different) its endianness must also be available.
  *
  * This function is approximately O(n) in the size of @data.
  * @required_micro: the required micro version
  *
  * Checks that the GLib library in use is compatible with the
- * given version. Generally you would pass in the constants
- * #GLIB_MAJOR_VERSION, #GLIB_MINOR_VERSION, #GLIB_MICRO_VERSION
- * as the three arguments to this function; that produces
- * a check that the library in use is compatible with
- * the version of GLib the application or module was compiled
- * against.
+ * given version.
+ *
+ * Generally you would pass in the constants %GLIB_MAJOR_VERSION,
+ * %GLIB_MINOR_VERSION, %GLIB_MICRO_VERSION as the three arguments
+ * to this function; that produces a check that the library in use
+ * is compatible with the version of GLib the application or module
+ * was compiled against.
  *
  * Compatibility is defined by two things: first the version
  * of the running library is newer than the version
- * @required_major.required_minor.@required_micro. Second
+ * `@required_major.required_minor.@required_micro`. Second
  * the running library must be binary compatible with the
- * version @required_major.required_minor.@required_micro
+ * version `@required_major.@required_minor.@required_micro`
  * (same major version.)
  *
- * Returns: %NULL if the GLib library is compatible with the
- *     given version, or a string describing the version mismatch.
- *     The returned string is owned by GLib and must not be modified
- *     or freed.
+ * Returns: (transfer none) (nullable): %NULL if the GLib library is
+ *   compatible with the given version, or a string describing the
+ *   version mismatch. The returned string is owned by GLib and must
+ *   not be modified or freed.
  * Since: 2.6
  */
 
index dbacb48..988a8b0 100644 (file)
 
 
 /**
+ * G_MODULE_ERROR:
+ *
+ * The error domain of the #GModule API.
+ *
+ * Since: 2.70
+ */
+
+
+/**
  * G_MODULE_EXPORT:
  *
  * Used to declare functions exported by libraries or modules.
  * @file_name: (nullable): the name of the file containing the module, or %NULL
  *     to obtain a #GModule representing the main program itself
  * @flags: the flags used for opening the module. This can be the
+ *     logical OR of any of the #GModuleFlags.
+ *
+ * A thin wrapper function around g_module_open_full()
+ *
+ * Returns: a #GModule on success, or %NULL on failure
+ */
+
+
+/**
+ * g_module_open_full:
+ * @file_name: (nullable): the name of the file containing the module, or %NULL
+ *     to obtain a #GModule representing the main program itself
+ * @flags: the flags used for opening the module. This can be the
  *     logical OR of any of the #GModuleFlags
+ * @error: #GError.
  *
  * Opens a module. If the module has already been opened,
  * its reference count is incremented.
  *
- * First of all g_module_open() tries to open @file_name as a module.
+ * First of all g_module_open_full() tries to open @file_name as a module.
  * If that fails and @file_name has the ".la"-suffix (and is a libtool
  * archive) it tries to open the corresponding module. If that fails
  * and it doesn't have the proper module suffix for the platform
  * (#G_MODULE_SUFFIX), this suffix will be appended and the corresponding
  * module will be opened. If that fails and @file_name doesn't have the
- * ".la"-suffix, this suffix is appended and g_module_open() tries to open
+ * ".la"-suffix, this suffix is appended and g_module_open_full() tries to open
  * the corresponding module. If eventually that fails as well, %NULL is
  * returned.
  *
  * Returns: a #GModule on success, or %NULL on failure
+ * Since: 2.70
  */
 
 
index eaecc72..93a4c7d 100644 (file)
  * This signal is typically used to obtain change notification for a
  * single property, by specifying the property name as a detail in the
  * g_signal_connect() call, like this:
+ *
  * |[<!-- language="C" -->
  * g_signal_connect (text_view->buffer, "notify::paste-target-list",
  *                   G_CALLBACK (gtk_text_view_target_list_notify),
  *                   text_view)
  * ]|
+ *
  * It is important to note that you must use
  * [canonical parameter names][canonical-parameter-names] as
  * detail strings for the notify signal.
  * GParamSpecPool:
  *
  * A #GParamSpecPool maintains a collection of #GParamSpecs which can be
- * quickly accessed by owner and name. The implementation of the #GObject property
- * system uses such a pool to store the #GParamSpecs of the properties all object
- * types.
+ * quickly accessed by owner and name.
+ *
+ * The implementation of the #GObject property system uses such a pool to
+ * store the #GParamSpecs of the properties all object types.
  */
 
 
 /**
  * GWeakRef:
  *
- * A structure containing a weak reference to a #GObject.  It can either
- * be empty (i.e. point to %NULL), or point to an object for as long as
- * at least one "strong" reference to that object exists. Before the
- * object's #GObjectClass.dispose method is called, every #GWeakRef
- * associated with becomes empty (i.e. points to %NULL).
+ * A structure containing a weak reference to a #GObject.
+ *
+ * A `GWeakRef` can either be empty (i.e. point to %NULL), or point to an
+ * object for as long as at least one "strong" reference to that object
+ * exists. Before the object's #GObjectClass.dispose method is called,
+ * every #GWeakRef associated with becomes empty (i.e. points to %NULL).
  *
  * Like #GValue, #GWeakRef can be statically allocated, stack- or
  * heap-allocated, or embedded in larger structures.
  *
  * #GBinding is the representation of a binding between a property on a
  * #GObject instance (or source) and another property on another #GObject
- * instance (or target). Whenever the source property changes, the same
- * value is applied to the target property; for instance, the following
- * binding:
+ * instance (or target).
+ *
+ * Whenever the source property changes, the same value is applied to the
+ * target property; for instance, the following binding:
  *
  * |[<!-- language="C" -->
  *   g_object_bind_property (object1, "property-a",
  * @see_also: #GParamSpecBoxed, g_param_spec_boxed()
  * @title: Boxed Types
  *
- * #GBoxed is a generic wrapper mechanism for arbitrary C structures. The only
- * thing the type system needs to know about the structures is how to copy them
- * (a #GBoxedCopyFunc) and how to free them (a #GBoxedFreeFunc) — beyond that
- * they are treated as opaque chunks of memory.
+ * #GBoxed is a generic wrapper mechanism for arbitrary C structures.
+ *
+ * The only thing the type system needs to know about the structures is how to
+ * copy them (a #GBoxedCopyFunc) and how to free them (a #GBoxedFreeFunc);
+ * beyond that, they are treated as opaque chunks of memory.
  *
  * Boxed types are useful for simple value-holder structures like rectangles or
  * points. They can also be used for wrapping structures defined in non-#GObject
  * @short_description: Functions as first-class objects
  * @title: Closures
  *
- * A #GClosure represents a callback supplied by the programmer. It
- * will generally comprise a function of some kind and a marshaller
+ * A #GClosure represents a callback supplied by the programmer.
+ *
+ * It will generally comprise a function of some kind and a marshaller
  * used to call it. It is the responsibility of the marshaller to
  * convert the arguments for the invocation from #GValues into
  * a suitable form, perform the callback on the converted arguments,
  *
  * The #GValue structure is basically a variable container that consists
  * of a type identifier and a specific value of that type.
+ *
  * The type identifier within a #GValue structure always determines the
  * type of the associated value.
+ *
  * To create an undefined #GValue structure, simply create a zero-filled
  * #GValue structure. To initialize the #GValue, use the g_value_init()
- * function. A #GValue cannot be used until it is initialized.
+ * function. A #GValue cannot be used until it is initialized. Before
+ * destruction you must always use g_value_unset() to make sure allocated
+ * memory is freed.
+ *
  * The basic type operations (such as freeing and copying) are determined
  * by the #GTypeValueTable associated with the type ID stored in the #GValue.
  * Other #GValue operations (such as converting values between types) are
  *   return 0;
  * }
  * ]|
+ *
+ * See also [gobject-Standard-Parameter-and-Value-Types] for more information on
+ * validation of #GValue.
+ *
+ * For letting a #GValue own (and memory manage) arbitrary types or pointers,
+ * they need to become a [boxed type][gboxed]. The example below shows how
+ * the pointer `mystruct` of type `MyStruct` is used as a [boxed type][gboxed].
+ *
+ * |[<!-- language="C" -->
+ * typedef struct { ... } MyStruct;
+ * G_DEFINE_BOXED_TYPE (MyStruct, my_struct, my_struct_copy, my_struct_free)
+ *
+ * // These two lines normally go in a public header. By GObject convention,
+ * // the naming scheme is NAMESPACE_TYPE_NAME:
+ * #define MY_TYPE_STRUCT (my_struct_get_type ())
+ * GType my_struct_get_type (void);
+ *
+ * void
+ * foo ()
+ * {
+ *   GValue *value = g_new0 (GValue, 1);
+ *   g_value_init (value, MY_TYPE_STRUCT);
+ *   g_value_set_boxed (value, mystruct);
+ *   // [... your code ....]
+ *   g_value_unset (value);
+ *   g_value_free (value);
+ * }
+ * ]|
  */
 
 
  *     management system
  * @title: Type Information
  *
- * The GType API is the foundation of the GObject system.  It provides the
+ * The GType API is the foundation of the GObject system. It provides the
  * facilities for registering and managing all fundamental data types,
  * user-defined object and interface types.
  *
  * @title: GTypeModule
  *
  * #GTypeModule provides a simple implementation of the #GTypePlugin
- * interface. The model of #GTypeModule is a dynamically loaded module
- * which implements some number of types and interface implementations.
+ * interface.
+ *
+ * The model of #GTypeModule is a dynamically loaded module which
+ * implements some number of types and interface implementations.
+ *
  * When the module is loaded, it registers its types and interfaces
  * using g_type_module_register_type() and g_type_module_add_interface().
  * As long as any instances of these types and interface implementations
  * are in use, the module is kept loaded. When the types and interfaces
  * are gone, the module may be unloaded. If the types and interfaces
  * become used again, the module will be reloaded. Note that the last
- * unref cannot happen in module code, since that would lead to the
- * caller's code being unloaded before g_object_unref() returns to it.
+ * reference cannot be released from within the module code, since that
+ * would lead to the caller's code being unloaded before g_object_unref()
+ * returns to it.
  *
  * Keeping track of whether the module should be loaded or not is done by
  * using a use count - it starts at zero, and whenever it is greater than
  * @see_also: #GTypeModule and g_type_register_dynamic().
  * @title: GTypePlugin
  *
+ * An interface that handles the lifecycle of dynamically loaded types.
+ *
  * The GObject type system supports dynamic loading of types.
- * The #GTypePlugin interface is used to handle the lifecycle
- * of dynamically loaded types. It goes as follows:
+ * It goes as follows:
  *
  * 1. The type is initially introduced (usually upon loading the module
  *    the first time, or by your main application that knows what modules
  * claimed to be "owned" by any code portion. The main motivation for
  * providing floating references is C convenience. In particular, it
  * allows code to be written as:
+ *
  * |[<!-- language="C" -->
  * container = create_container ();
  * container_add_child (container, create_child());
  * ]|
+ *
  * If container_add_child() calls g_object_ref_sink() on the passed-in child,
  * no reference of the newly created child is leaked. Without floating
  * references, container_add_child() can only g_object_ref() the new child,
  * so to implement this code without reference leaks, it would have to be
  * written as:
+ *
  * |[<!-- language="C" -->
  * Child *child;
  * container = create_container ();
  * container_add_child (container, child);
  * g_object_unref (child);
  * ]|
+ *
  * The floating reference can be converted into an ordinary reference by
  * calling g_object_ref_sink(). For already sunken objects (objects that
  * don't have a floating reference anymore), g_object_ref_sink() is equivalent
  * Parameter names need to start with a letter (a-z or A-Z). Subsequent
  * characters can be letters, numbers or a '-'.
  * All other characters are replaced by a '-' during construction.
+ *
+ * See also #GValue for more information.
  */
 
 
  * @boxed_free: Boxed structure free function.
  *
  * This function creates a new %G_TYPE_BOXED derived type id for a new
- * boxed type with name @name. Boxed type handling functions have to be
- * provided to copy and free opaque boxed structures of this type.
+ * boxed type with name @name.
+ *
+ * Boxed type handling functions have to be provided to copy and free
+ * opaque boxed structures of this type.
+ *
+ * For the general case, it is recommended to use #G_DEFINE_BOXED_TYPE
+ * instead of calling g_boxed_type_register_static() directly. The macro
+ * will create the appropriate `*_get_type()` function for the boxed type.
  *
  * Returns: New %G_TYPE_BOXED derived type id for @name.
  */
  * @notify_func: the callback function to register
  *
  * Registers a finalization notifier which will be called when the
- * reference count of @closure goes down to 0. Multiple finalization
- * notifiers on a single closure are invoked in unspecified order. If
- * a single call to g_closure_unref() results in the closure being
- * both invalidated and finalized, then the invalidate notifiers will
- * be run before the finalize notifiers.
+ * reference count of @closure goes down to 0.
+ *
+ * Multiple finalization notifiers on a single closure are invoked in
+ * unspecified order. If a single call to g_closure_unref() results in
+ * the closure being both invalidated and finalized, then the invalidate
+ * notifiers will be run before the finalize notifiers.
  */
 
 
  * @notify_func: the callback function to register
  *
  * Registers an invalidation notifier which will be called when the
- * @closure is invalidated with g_closure_invalidate(). Invalidation
- * notifiers are invoked before finalization notifiers, in an
- * unspecified order.
+ * @closure is invalidated with g_closure_invalidate().
+ *
+ * Invalidation notifiers are invoked before finalization notifiers,
+ * in an unspecified order.
  */
 
 
  * @post_marshal_notify: a function to call after the closure callback
  *
  * Adds a pair of notifiers which get invoked before and after the
- * closure callback, respectively. This is typically used to protect
- * the extra arguments for the duration of the callback. See
- * g_object_watch_closure() for an example of marshal guards.
+ * closure callback, respectively.
+ *
+ * This is typically used to protect the extra arguments for the
+ * duration of the callback. See g_object_watch_closure() for an
+ * example of marshal guards.
  */
 
 
  * Sets a flag on the closure to indicate that its calling
  * environment has become invalid, and thus causes any future
  * invocations of g_closure_invoke() on this @closure to be
- * ignored. Also, invalidation notifiers installed on the closure will
+ * ignored.
+ *
+ * Also, invalidation notifiers installed on the closure will
  * be called at this point. Note that unless you are holding a
  * reference to the closure yourself, the invalidation notifiers may
  * unref the closure and cause it to be destroyed, so if you need to
 /**
  * g_closure_invoke:
  * @closure: a #GClosure
- * @return_value: (optional) (out): a #GValue to store the return
+ * @return_value: (optional) (inout): a #GValue to store the return
  *                value. May be %NULL if the callback of @closure
  *                doesn't return a value.
  * @n_param_values: the length of the @param_values array
  * @data: data to store in the @data field of the newly allocated #GClosure
  *
  * Allocates a struct of the given size and initializes the initial
- * part as a #GClosure. This function is mainly useful when
- * implementing new types of closures.
+ * part as a #GClosure.
+ *
+ * This function is mainly useful when implementing new types of closures:
  *
  * |[<!-- language="C" -->
  * typedef struct _MyClosure MyClosure;
  * @closure: a #GClosure
  * @marshal: a #GClosureMarshal function
  *
- * Sets the marshaller of @closure. The `marshal_data`
- * of @marshal provides a way for a meta marshaller to provide additional
- * information to the marshaller. (See g_closure_set_meta_marshal().) For
- * GObject's C predefined marshallers (the g_cclosure_marshal_*()
+ * Sets the marshaller of @closure.
+ *
+ * The `marshal_data` of @marshal provides a way for a meta marshaller to
+ * provide additional information to the marshaller.
+ *
+ * For GObject's C predefined marshallers (the `g_cclosure_marshal_*()`
  * functions), what it provides is a callback function to use instead of
  * @closure->callback.
+ *
+ * See also: g_closure_set_meta_marshal()
  */
 
 
  *  to @meta_marshal
  * @meta_marshal: a #GClosureMarshal function
  *
- * Sets the meta marshaller of @closure.  A meta marshaller wraps
- * @closure->marshal and modifies the way it is called in some
- * fashion. The most common use of this facility is for C callbacks.
+ * Sets the meta marshaller of @closure.
+ *
+ * A meta marshaller wraps the @closure's marshal and modifies the way
+ * it is called in some fashion. The most common use of this facility
+ * is for C callbacks.
+ *
  * The same marshallers (generated by [glib-genmarshal][glib-genmarshal]),
  * are used everywhere, but the way that we get the callback function
- * differs. In most cases we want to use @closure->callback, but in
+ * differs. In most cases we want to use the @closure's callback, but in
  * other cases we want to use some different technique to retrieve the
  * callback function.
  *
  * @closure: #GClosure to decrement the initial reference count on, if it's
  *           still being held
  *
- * Takes over the initial ownership of a closure.  Each closure is
- * initially created in a "floating" state, which means that the initial
- * reference count is not owned by any caller. g_closure_sink() checks
- * to see if the object is still floating, and if so, unsets the
- * floating state and decreases the reference count. If the closure
- * is not floating, g_closure_sink() does nothing. The reason for the
- * existence of the floating state is to prevent cumbersome code
- * sequences like:
+ * Takes over the initial ownership of a closure.
+ *
+ * Each closure is initially created in a "floating" state, which means
+ * that the initial reference count is not owned by any caller.
+ *
+ * This function checks to see if the object is still floating, and if so,
+ * unsets the floating state and decreases the reference count. If the
+ * closure is not floating, g_closure_sink() does nothing.
+ *
+ * The reason for the existence of the floating state is to prevent
+ * cumbersome code sequences like:
+ *
  * |[<!-- language="C" -->
  * closure = g_cclosure_new (cb_func, cb_data);
  * g_source_set_closure (source, closure);
  * g_closure_unref (closure); // GObject doesn't really need this
  * ]|
+ *
  * Because g_source_set_closure() (and similar functions) take ownership of the
  * initial reference count, if it is unowned, we instead can write:
+ *
  * |[<!-- language="C" -->
  * g_source_set_closure (source, g_cclosure_new (cb_func, cb_data));
  * ]|
  *
  * Generally, this function is used together with g_closure_ref(). An example
  * of storing a closure for later notification looks like:
+ *
  * |[<!-- language="C" -->
  * static GClosure *notify_closure = NULL;
  * void
  * @closure: #GClosure to decrement the reference count on
  *
  * Decrements the reference count of a closure after it was previously
- * incremented by the same caller. If no other callers are using the
- * closure, then the closure will be destroyed and freed.
+ * incremented by the same caller.
+ *
+ * If no other callers are using the closure, then the closure will be
+ * destroyed and freed.
  */
 
 
  * @flags: flags to pass to #GBinding
  *
  * Creates a binding between @source_property on @source and @target_property
- * on @target. Whenever the @source_property is changed the @target_property is
+ * on @target.
+ *
+ * Whenever the @source_property is changed the @target_property is
  * updated using the same value. For instance:
  *
- * |[
+ * |[<!-- language="C" -->
  *   g_object_bind_property (action, "active", widget, "sensitive", 0);
  * ]|
  *
  * @notify: a function to call when this reference is the
  *  last reference to the object, or is no longer
  *  the last reference.
- * @data: data to pass to @notify
+ * @data: (nullable): data to pass to @notify, or %NULL to
+ *  match any toggle refs with the @notify argument.
  *
  * Removes a reference added with g_object_add_toggle_ref(). The
  * reference count of the object is decreased by one.
 
 
 /**
+ * g_object_take_ref: (skip)
+ * @object: (type GObject.Object): a #GObject
+ *
+ * If @object is floating, sink it.  Otherwise, do nothing.
+ *
+ * In other words, this function will convert a floating reference (if
+ * present) into a full reference.
+ *
+ * Typically you want to use g_object_ref_sink() in order to
+ * automatically do the correct thing with respect to floating or
+ * non-floating references, but there is one specific scenario where
+ * this function is helpful.
+ *
+ * The situation where this function is helpful is when creating an API
+ * that allows the user to provide a callback function that returns a
+ * GObject. We certainly want to allow the user the flexibility to
+ * return a non-floating reference from this callback (for the case
+ * where the object that is being returned already exists).
+ *
+ * At the same time, the API style of some popular GObject-based
+ * libraries (such as Gtk) make it likely that for newly-created GObject
+ * instances, the user can be saved some typing if they are allowed to
+ * return a floating reference.
+ *
+ * Using this function on the return value of the user's callback allows
+ * the user to do whichever is more convenient for them. The caller will
+ * alway receives exactly one full reference to the value: either the
+ * one that was returned in the first place, or a floating reference
+ * that has been converted to a full reference.
+ *
+ * This function has an odd interaction when combined with
+ * g_object_ref_sink() running at the same time in another thread on
+ * the same #GObject instance. If g_object_ref_sink() runs first then
+ * the result will be that the floating reference is converted to a hard
+ * reference. If g_object_take_ref() runs first then the result will be
+ * that the floating reference is converted to a hard reference and an
+ * additional reference on top of that one is added. It is best to avoid
+ * this situation.
+ *
+ * Since: 2.70
+ * Returns: (type GObject.Object) (transfer full): @object
+ */
+
+
+/**
  * g_object_thaw_notify:
  * @object: a #GObject
  *
  * @name: 0-terminated string used as the name of the new #GParamSpec type.
  * @pspec_info: The #GParamSpecTypeInfo for this #GParamSpec type.
  *
- * Registers @name as the name of a new static type derived from
- * #G_TYPE_PARAM. The type system uses the information contained in
- * the #GParamSpecTypeInfo structure pointed to by @info to manage the
- * #GParamSpec type and its instances.
+ * Registers @name as the name of a new static type derived
+ * from #G_TYPE_PARAM.
+ *
+ * The type system uses the information contained in the #GParamSpecTypeInfo
+ * structure pointed to by @info to manage the #GParamSpec type and its
+ * instances.
  *
  * Returns: The new type identifier.
  */
  * @v_boxed: (nullable): static boxed value to be set
  *
  * Set the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed.
+ *
  * The boxed value is assumed to be static, and is thus not duplicated
  * when setting the #GValue.
  */
  * @value: a valid #GValue of type %G_TYPE_STRING
  * @v_string: (nullable): caller-owned string to be duplicated for the #GValue
  *
- * Set the contents of a %G_TYPE_STRING #GValue to @v_string.
+ * Set the contents of a %G_TYPE_STRING #GValue to a copy of @v_string.
  */
 
 
index 557e551..5d64633 100644 (file)
@@ -58,8 +58,12 @@ if dep_type == 'internal'
   # paths, library paths, and more that we now have to handle manually when
   # building with subprojects.
   subprojdir = 'subprojects'
-  scanner_command += ['--extra-library=gio-2.0', '--extra-library=gmodule-2.0',
-                      '--extra-library=glib-2.0', '--extra-library=gobject-2.0']
+  scanner_command += [
+    '--extra-library=glib-2.0',
+    '--extra-library=gmodule-2.0',
+    '--extra-library=gobject-2.0',
+    '--extra-library=gio-2.0',
+  ]
 endif
 
 if get_option('gi_cross_binary_wrapper') != ''
@@ -118,36 +122,65 @@ if dep_type == 'pkgconfig'
     glib_files += ret.stdout().strip().split('\n')
   endif
   glib_includes = ['-I' + glib_incdir, '-I' + glib_libincdir]
+  glib_gir_dep = []
 elif dep_type == 'internal'
-  glib_command += ['--pkg-export=glib-2.0']
-  # XXX: Assumes that the builddir layout is 'mirror'
-  glib_libdir = join_paths(meson.build_root(), subprojdir, 'glib', 'glib')
-  # XXX: Assumes the location of the glib subproject dir
-  # We should add API to meson to get a specific file from a specific subproject
-  glibproj_incdir = join_paths(meson.source_root(), subprojdir, 'glib')
-  glib_incdir = join_paths(glibproj_incdir, 'glib')
-  glib_libincdir = glib_libdir
-  glib_files += join_paths(glibproj_incdir, 'gobject', 'glib-types.h')
-  glib_files += join_paths(glib_libincdir, 'glibconfig.h')
-  if giounix_dep.found()
-    glib_files += join_paths(glib_incdir, 'glib-unix.h')
-  endif
+  # XXX: This is a pile of hacks to allow gobject-introspection to parse the
+  #      GLib source files when GLib is used as a subproject
+  #      Assumes that the builddir layout is 'mirror'
+  #      Assumes the location of the glib subproject dir
+  #      We should add API to meson to get a specific file from a specific
+  #      subproject
   # We know exactly what headers will be installed, so just fetch that
   glib_subproject = subproject('glib')
+
+  glibproj_sourcedir = join_paths(meson.source_root(), subprojdir, 'glib')
+  glibproj_builddir = join_paths(meson.build_root(), subprojdir, 'glib')
+
+  glib_files += join_paths(glibproj_sourcedir, 'gobject', 'glib-types.h')
+
+  # Generated files, relative to the build directory
+  glib_files += [
+    join_paths(glibproj_builddir, 'glib', 'glibconfig.h'),
+    glib_subproject.get_variable('glib_enumtypes_h'),
+  ]
+
+  if giounix_dep.found()
+    glib_files += [
+      join_paths(glibproj_sourcedir, 'glib', 'glib-unix.h'),
+    ]
+  endif
+
   glib_headers = glib_subproject.get_variable('glib_sub_headers')
   glib_files += glib_subproject.get_variable('glib_sources')
+
   # XXX: Assumes that the builddir layout is 'mirror'
-  gobject_libdir = join_paths(meson.build_root(), subprojdir, 'glib', 'gobject')
-  gmodule_libdir = join_paths(meson.build_root(), subprojdir, 'glib', 'gmodule')
-  gio_libdir = join_paths(meson.build_root(), subprojdir, 'glib', 'gio')
-  glib_libpaths = ['-L' + glib_libdir, '-L' + gobject_libdir,
-                   '-L' + gmodule_libdir, '-L' + gio_libdir]
+  glib_libdir = join_paths(glibproj_builddir, 'glib')
+  gobject_libdir = join_paths(glibproj_builddir, 'gobject')
+  gmodule_libdir = join_paths(glibproj_builddir, 'gmodule')
+  gio_libdir = join_paths(glibproj_builddir, 'gio')
+
+  glib_libpaths = [
+    '-L' + glib_libdir,
+    '-L' + gobject_libdir,
+    '-L' + gmodule_libdir,
+    '-L' + gio_libdir,
+  ]
   # Includes that will be used to compile the scanner executable
-  glib_buildinc = join_paths(meson.build_root(), subprojdir, 'glib')
-  gmodule_incdir = join_paths(glibproj_incdir, 'gmodule')
-  gio_incdir = join_paths(glibproj_incdir, 'gio')
-  glib_includes = ['-I' + glibproj_incdir, '-I' + glib_incdir, '-I' + glib_libincdir,
-                   '-I' + glib_buildinc, '-I' + gmodule_incdir, '-I' + gio_incdir]
+  glib_incdir = join_paths(glibproj_sourcedir, 'glib')
+  gobject_incdir = join_paths(glibproj_sourcedir, 'gobject')
+  gmodule_incdir = join_paths(glibproj_sourcedir, 'gmodule')
+  gio_incdir = join_paths(glibproj_sourcedir, 'gio')
+
+  glib_includes = [
+    '-I' + glibproj_sourcedir,
+    '-I' + glibproj_builddir,
+    '-I' + glib_libdir,
+    '-I' + glib_incdir,
+    '-I' + gobject_incdir,
+    '-I' + gmodule_incdir,
+    '-I' + gio_incdir,
+  ]
+
   # XXX: We need include paths to all glib dependencies too. We assume that the
   # dependencies are only libffi and proxy-libintl, and that they are used as
   # subprojects. In the worst case we add paths to non-existent directories.
@@ -158,10 +191,15 @@ elif dep_type == 'internal'
 
   ffi_libdir = join_paths(meson.build_root(), subprojdir, 'libffi', 'src')
   intl_libdir = join_paths(meson.build_root(), subprojdir, 'proxy-libintl')
-  glib_libpaths = ['-L' + ffi_libdir, '-L' + intl_libdir] + glib_libpaths
+  glib_libpaths = [
+    '-L' + ffi_libdir,
+    '-L' + intl_libdir,
+  ] + glib_libpaths
 
+  glib_command += ['--pkg-export=glib-2.0']
   glib_command += glib_libpaths
 
+  glib_gir_dep = glib_subproject.get_variable('libglib')
 else
   error('Unknown glib dependency type: ' + dep_type)
 endif
@@ -178,11 +216,20 @@ endforeach
 # out of date.
 glib_files += files('glib-2.0.c')
 
+gir_giscanner_pymod = []
+gir_giscanner_built_files = []
+if not get_option('gi_cross_use_prebuilt_gi')
+  # The right thing to do is just make these dependencies of the
+  # `configure_file` python executable, but that isn't yet supported.
+  gir_giscanner_pymod = giscanner_pymod
+  gir_giscanner_built_files = giscanner_built_files
+endif
+
 glib_gir = custom_target('gir-glib',
   input: glib_files,
   output: 'GLib-2.0.gir',
-  depends: giscanner_pymod,
-  depend_files: giscanner_built_files,
+  depends: [gir_giscanner_pymod, glib_gir_dep],
+  depend_files: gir_giscanner_built_files,
   install: true,
   install_dir: girdir,
   command: glib_command + [
@@ -222,11 +269,15 @@ if dep_type == 'pkgconfig'
     endif
     gobject_files += ret.stdout().strip().split('\n')
   endif
+  gobject_gir_dep = []
 else
   gobject_command += ['--pkg-export=gobject-2.0']
   gobject_headers = glib_subproject.get_variable('gobject_install_headers')
-  gobject_files += glib_subproject.get_variable('gobject_sources')
+  gobject_files += [
+    glib_subproject.get_variable('gobject_sources'),
+  ]
   gobject_command += glib_libpaths
+  gobject_gir_dep = glib_subproject.get_variable('libgobject')
 endif
 
 foreach h : gobject_headers
@@ -244,8 +295,8 @@ gobject_files += files('gobject-2.0.c')
 gobject_gir = custom_target('gir-gobject',
   input: gobject_files,
   output: 'GObject-2.0.gir',
-  depends: [glib_gir, giscanner_pymod],
-  depend_files: giscanner_built_files,
+  depends: [glib_gir, gir_giscanner_pymod, gobject_gir_dep],
+  depend_files: gir_giscanner_built_files,
   install: true,
   install_dir: girdir,
   command: gobject_command + [
@@ -276,11 +327,16 @@ if dep_type == 'pkgconfig'
   if glib_srcdir != ''
     gmodule_files += join_paths(glib_srcdir, 'gmodule', 'gmodule.c')
   endif
+  gmodule_gir_dep = []
 else
   gmodule_command += ['--pkg-export=gmodule-2.0']
   gmodule_command += glib_libpaths
-  gmodule_files += [join_paths(glibproj_incdir, 'gmodule', 'gmodule.h'),
-                    join_paths(glibproj_incdir, 'gmodule', 'gmodule.c')]
+  gmodule_files += [
+    join_paths(glibproj_sourcedir, 'gmodule', 'gmodule.h'),
+    join_paths(glibproj_sourcedir, 'gmodule', 'gmodule.c'),
+    glib_subproject.get_variable('gmoduleconf_h'),
+  ]
+  gmodule_gir_dep = glib_subproject.get_variable('libgmodule')
 endif
 
 # NOTE: Always add this last so that we prefer the annotations in the sources
@@ -291,8 +347,8 @@ gmodule_files += files('gmodule-2.0.c')
 gir_files += custom_target('gir-gmodule',
   input: gmodule_files,
   output: 'GModule-2.0.gir',
-  depends: [glib_gir, giscanner_pymod],
-  depend_files: giscanner_built_files,
+  depends: [glib_gir, gir_giscanner_pymod, gmodule_gir_dep],
+  depend_files: gir_giscanner_built_files,
   install: true,
   install_dir: girdir,
   command: gmodule_command + [
@@ -332,11 +388,17 @@ if dep_type == 'pkgconfig'
     endif
     gio_files += ret.stdout().strip().split('\n')
   endif
+  gio_gir_dep = []
 else
   gio_command += ['--pkg-export=gio-2.0']
   gio_headers = glib_subproject.get_variable('gio_headers')
-  gio_files += glib_subproject.get_variable('gio_sources')
+  gio_files += [
+    glib_subproject.get_variable('gio_sources'),
+    glib_subproject.get_variable('gioenumtypes_h'),
+    glib_subproject.get_variable('gnetworking_h'),
+  ]
   gio_command += glib_libpaths
+  gio_gir_dep = glib_subproject.get_variable('libgio')
 endif
 
 foreach h : gio_headers
@@ -380,8 +442,8 @@ gio_files += files('gio-2.0.c')
 gio_gir = custom_target('gir-gio',
   input: gio_files,
   output: 'Gio-2.0.gir',
-  depends: [gobject_gir, giscanner_pymod],
-  depend_files: giscanner_built_files,
+  depends: [gobject_gir, gir_giscanner_pymod, gio_gir_dep],
+  depend_files: gir_giscanner_built_files,
   install: true,
   install_dir: girdir,
   command: gio_command + [
@@ -417,8 +479,8 @@ endif
 gir_files += custom_target('gir-girepository',
   input: girepo_gir_sources,
   output: 'GIRepository-2.0.gir',
-  depends: [gobject_gir, giscanner_pymod, girepo_lib],
-  depend_files: giscanner_built_files,
+  depends: [gobject_gir, gir_giscanner_pymod, girepo_lib],
+  depend_files: gir_giscanner_built_files,
   install: true,
   install_dir: girdir,
   command: girepository_command + [
index 0e8c603..e79f171 100644 (file)
@@ -241,6 +241,12 @@ dump_object_type (GType type, const char *symbol, GOutputStream *out)
 
   if (G_TYPE_IS_ABSTRACT (type))
     escaped_printf (out, " abstract=\"1\"");
+
+#if GLIB_CHECK_VERSION (2, 70, 0)
+  if (G_TYPE_IS_FINAL (type))
+    escaped_printf (out, " final=\"1\"");
+#endif
+
   goutput_write (out, ">\n");
 
   interfaces = g_type_interfaces (type, &n_interfaces);
@@ -354,6 +360,11 @@ dump_fundamental_type (GType type, const char *symbol, GOutputStream *out)
   if (G_TYPE_IS_ABSTRACT (type))
     escaped_printf (out, " abstract=\"1\"");
 
+#if GLIB_CHECK_VERSION (2, 70, 0)
+  if (G_TYPE_IS_FINAL (type))
+    escaped_printf (out, " final=\"1\"");
+#endif
+
   if (G_TYPE_IS_INSTANTIATABLE (type))
     escaped_printf (out, " instantiatable=\"1\"");
 
index 3048e16..16e391f 100644 (file)
@@ -638,6 +638,7 @@ g_callable_info_invoke (GIFunctionInfo *info,
         case GI_DIRECTION_IN:
           tinfo = g_arg_info_get_type (ainfo);
           atypes[i+offset] = g_type_info_get_ffi_type (tinfo);
+          g_base_info_unref ((GIBaseInfo *)ainfo);
           g_base_info_unref ((GIBaseInfo *)tinfo);
 
           if (in_pos >= n_in_args)
@@ -655,6 +656,7 @@ g_callable_info_invoke (GIFunctionInfo *info,
           break;
         case GI_DIRECTION_OUT:
           atypes[i+offset] = &ffi_type_pointer;
+          g_base_info_unref ((GIBaseInfo *)ainfo);
 
           if (out_pos >= n_out_args)
             {
@@ -670,6 +672,7 @@ g_callable_info_invoke (GIFunctionInfo *info,
           break;
         case GI_DIRECTION_INOUT:
           atypes[i+offset] = &ffi_type_pointer;
+          g_base_info_unref ((GIBaseInfo *)ainfo);
 
           if (in_pos >= n_in_args)
             {
@@ -694,9 +697,9 @@ g_callable_info_invoke (GIFunctionInfo *info,
           out_pos++;
           break;
         default:
+          g_base_info_unref ((GIBaseInfo *)ainfo);
           g_assert_not_reached ();
         }
-      g_base_info_unref ((GIBaseInfo *)ainfo);
     }
 
   if (throws)
index 366850d..b042b4e 100644 (file)
@@ -165,18 +165,30 @@ g_function_info_get_flags (GIFunctionInfo *info)
 GIPropertyInfo *
 g_function_info_get_property (GIFunctionInfo *info)
 {
-  GIRealInfo *rinfo;
+  GIRealInfo *rinfo, *container_rinfo;
   FunctionBlob *blob;
-  GIInterfaceInfo *container;
 
   g_return_val_if_fail (info != NULL, NULL);
   g_return_val_if_fail (GI_IS_FUNCTION_INFO (info), NULL);
 
   rinfo = (GIRealInfo *)info;
   blob = (FunctionBlob *)&rinfo->typelib->data[rinfo->offset];
-  container = (GIInterfaceInfo *)rinfo->container;
+  container_rinfo = (GIRealInfo *)rinfo->container;
+
+  if (container_rinfo->type == GI_INFO_TYPE_INTERFACE)
+    {
+      GIInterfaceInfo *container = (GIInterfaceInfo *)rinfo->container;
 
-  return g_interface_info_get_property (container, blob->index);
+      return g_interface_info_get_property (container, blob->index);
+    }
+  else if (container_rinfo->type == GI_INFO_TYPE_OBJECT)
+    {
+      GIObjectInfo *container = (GIObjectInfo *)rinfo->container;
+
+      return g_object_info_get_property (container, blob->index);
+    }
+  else
+    return NULL;
 }
 
 /**
index f7e6449..5d423b1 100644 (file)
@@ -251,7 +251,7 @@ gi_cclosure_marshal_generic (GClosure *closure,
                              gpointer invocation_hint,
                              gpointer marshal_data)
 {
-  GIArgument return_ffi_value;
+  GIArgument return_ffi_value = { 0, };
   ffi_type *rtype;
   void *rvalue;
   int n_args;
index 13cfdaa..2042793 100644 (file)
@@ -134,6 +134,31 @@ g_object_info_get_abstract (GIObjectInfo *info)
 }
 
 /**
+ * g_object_info_get_final:
+ * @info: a #GIObjectInfo
+ *
+ * Checks whether the object type is a final type, i.e. if it cannot
+ * be derived
+ *
+ * Returns: %TRUE if the object type is final
+ *
+ * Since: 1.70
+ */
+gboolean
+g_object_info_get_final (GIObjectInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *) info;
+  ObjectBlob *blob;
+
+  g_return_val_if_fail (info != NULL, FALSE);
+  g_return_val_if_fail (GI_IS_OBJECT_INFO (info), FALSE);
+
+  blob = (ObjectBlob *) &rinfo->typelib->data[rinfo->offset];
+
+  return blob->final_ != 0;
+}
+
+/**
  * g_object_info_get_fundamental:
  * @info: a #GIObjectInfo
  *
index dac95ab..aa6f9c9 100644 (file)
@@ -87,6 +87,9 @@ const gchar *     g_object_info_get_type_init  (GIObjectInfo *info);
 GI_AVAILABLE_IN_ALL
 gboolean          g_object_info_get_abstract     (GIObjectInfo *info);
 
+GI_AVAILABLE_IN_1_70
+gboolean          g_object_info_get_final        (GIObjectInfo *info);
+
 GI_AVAILABLE_IN_ALL
 gboolean          g_object_info_get_fundamental  (GIObjectInfo *info);
 
index e58d460..4a291a0 100644 (file)
@@ -132,3 +132,82 @@ g_property_info_get_ownership_transfer (GIPropertyInfo *info)
   else
     return GI_TRANSFER_NOTHING;
 }
+
+/**
+ * g_property_info_get_setter:
+ * @info: a #GIPropertyInfo
+ *
+ * Obtains the setter function associated with this #GIPropertyInfo.
+ *
+ * The setter is only available for %G_PARAM_WRITABLE properties that
+ * are also not %G_PARAM_CONSTRUCT_ONLY.
+ *
+ * Returns: (transfer full) (nullable): the function info or %NULL if not set.
+ *   Free it with g_base_info_unref() when done.
+ */
+GIFunctionInfo *
+g_property_info_get_setter (GIPropertyInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  PropertyBlob *blob;
+  GIBaseInfo *container;
+  GIInfoType parent_type;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_PROPERTY_INFO (info), NULL);
+
+  blob = (PropertyBlob *)&rinfo->typelib->data[rinfo->offset];
+  if (!blob->writable || blob->construct_only)
+    return NULL;
+
+  if (blob->setter == ACCESSOR_SENTINEL)
+    return NULL;
+
+  container = rinfo->container;
+  parent_type = g_base_info_get_type (container);
+  if (parent_type == GI_INFO_TYPE_OBJECT)
+    return g_object_info_get_method ((GIObjectInfo *) container, blob->setter);
+  else if (parent_type == GI_INFO_TYPE_INTERFACE)
+    return g_interface_info_get_method ((GIInterfaceInfo *) container, blob->setter);
+  else
+    return NULL;
+}
+
+/**
+ * g_property_info_get_getter:
+ * @info: a #GIPropertyInfo
+ *
+ * Obtains the getter function associated with this #GIPropertyInfo.
+ *
+ * The setter is only available for %G_PARAM_READABLE properties.
+ *
+ * Returns: (transfer full) (nullable): the function info or %NULL if not set.
+ *   Free it with g_base_info_unref() when done.
+ */
+GIFunctionInfo *
+g_property_info_get_getter (GIPropertyInfo *info)
+{
+  GIRealInfo *rinfo = (GIRealInfo *)info;
+  PropertyBlob *blob;
+  GIBaseInfo *container;
+  GIInfoType parent_type;
+
+  g_return_val_if_fail (info != NULL, NULL);
+  g_return_val_if_fail (GI_IS_PROPERTY_INFO (info), NULL);
+
+  blob = (PropertyBlob *)&rinfo->typelib->data[rinfo->offset];
+  if (!blob->readable)
+    return NULL;
+
+  if (blob->getter == ACCESSOR_SENTINEL)
+    return NULL;
+
+  container = rinfo->container;
+  parent_type = g_base_info_get_type (container);
+  if (parent_type == GI_INFO_TYPE_OBJECT)
+    return g_object_info_get_method ((GIObjectInfo *) container, blob->getter);
+  else if (parent_type == GI_INFO_TYPE_INTERFACE)
+    return g_interface_info_get_method ((GIInterfaceInfo *) container, blob->getter);
+  else
+    return NULL;
+}
index 7f9c89a..4889f42 100644 (file)
@@ -50,6 +50,12 @@ GITypeInfo * g_property_info_get_type  (GIPropertyInfo *info);
 GI_AVAILABLE_IN_ALL
 GITransfer   g_property_info_get_ownership_transfer (GIPropertyInfo *info);
 
+GI_AVAILABLE_IN_1_70
+GIFunctionInfo *g_property_info_get_setter (GIPropertyInfo *info);
+
+GI_AVAILABLE_IN_1_70
+GIFunctionInfo *g_property_info_get_getter (GIPropertyInfo *info);
+
 G_END_DECLS
 
 #endif  /* __GIPROPERTYINFO_H__ */
index fadfe56..4db679d 100644 (file)
@@ -218,6 +218,7 @@ _g_ir_node_free (GIrNode *node)
 
        g_free (node->name);
        g_free (function->symbol);
+        g_free (function->property);
        _g_ir_node_free ((GIrNode *)function->result);
        for (l = function->parameters; l; l = l->next)
          _g_ir_node_free ((GIrNode *)l->data);
@@ -253,6 +254,8 @@ _g_ir_node_free (GIrNode *node)
        GIrNodeProperty *property = (GIrNodeProperty *)node;
 
        g_free (node->name);
+        g_free (property->setter);
+        g_free (property->getter);
        _g_ir_node_free ((GIrNode *)property->type);
       }
       break;
@@ -1626,6 +1629,36 @@ _g_ir_node_build_typelib (GIrNode         *node,
        blob->transfer_container_ownership = prop->shallow_transfer;
        blob->reserved = 0;
 
+        if (prop->setter != NULL)
+          {
+            int index = get_index_of_member_type ((GIrNodeInterface*)parent,
+                                                  G_IR_NODE_FUNCTION,
+                                                  prop->setter);
+            if (index == -1)
+              {
+                g_error ("Unknown setter %s for property %s:%s", prop->setter, parent->name, node->name);
+              }
+
+            blob->setter = (guint) index;
+          }
+        else
+          blob->setter = ACCESSOR_SENTINEL;
+
+        if (prop->getter != NULL)
+          {
+            int index = get_index_of_member_type ((GIrNodeInterface*)parent,
+                                                  G_IR_NODE_FUNCTION,
+                                                  prop->getter);
+            if (index == -1)
+              {
+                g_error ("Unknown getter %s for property %s:%s", prop->getter, parent->name, node->name);
+              }
+
+            blob->getter = (guint) index;
+          }
+        else
+          blob->getter = ACCESSOR_SENTINEL;
+
         _g_ir_node_build_typelib ((GIrNode *)prop->type,
                                 node, build, offset, offset2, NULL);
       }
@@ -1648,8 +1681,8 @@ _g_ir_node_build_typelib (GIrNode         *node,
        blob->blob_type = BLOB_TYPE_FUNCTION;
        blob->deprecated = function->deprecated;
         blob->is_static = !function->is_method;
-       blob->setter = function->is_setter;
-       blob->getter = function->is_getter;
+       blob->setter = FALSE;
+       blob->getter = FALSE;
        blob->constructor = function->is_constructor;
        blob->wraps_vfunc = function->wraps_vfunc;
        blob->throws = function->throws; /* Deprecated. Also stored in SignatureBlob. */
@@ -1658,6 +1691,21 @@ _g_ir_node_build_typelib (GIrNode         *node,
        blob->symbol = _g_ir_write_string (function->symbol, strings, data, offset2);
        blob->signature = signature;
 
+        if (function->is_setter || function->is_getter)
+          {
+            int index = get_index_of_member_type ((GIrNodeInterface*)parent,
+                                                  G_IR_NODE_PROPERTY,
+                                                  function->property);
+            if (index == -1)
+              {
+                g_error ("Unknown property %s:%s for accessor %s", parent->name, function->property, function->symbol);
+              }
+
+            blob->setter = function->is_setter;
+            blob->getter = function->is_getter;
+            blob->index = (guint) index;
+          }
+
         /* function->result is special since it doesn't appear in the serialized format but
          * we do want the attributes for it to appear
          */
@@ -2096,6 +2144,7 @@ _g_ir_node_build_typelib (GIrNode         *node,
        blob->blob_type = BLOB_TYPE_OBJECT;
        blob->abstract = object->abstract;
         blob->fundamental = object->fundamental;
+        blob->final_ = object->final_;
        blob->deprecated = object->deprecated;
        blob->reserved = 0;
        blob->name = _g_ir_write_string (node->name, strings, data, offset2);
index e4ce85a..7b8c97f 100644 (file)
@@ -103,6 +103,7 @@ struct _GIrNodeFunction
   gboolean instance_transfer_full;
 
   gchar *symbol;
+  char *property;
 
   GIrNodeParam *result;
   GList *parameters;
@@ -173,6 +174,9 @@ struct _GIrNodeProperty
   gboolean transfer;
   gboolean shallow_transfer;
 
+  char *setter;
+  char *getter;
+
   GIrNodeType *type;
 };
 
@@ -240,6 +244,7 @@ struct _GIrNodeInterface
   gboolean abstract;
   gboolean deprecated;
   gboolean fundamental;
+  gboolean final_;
 
   gchar *gtype_name;
   gchar *gtype_init;
index ad676e3..470f093 100644 (file)
@@ -807,6 +807,8 @@ start_function (GMarkupParseContext *context,
   const gchar *symbol;
   const gchar *deprecated;
   const gchar *throws;
+  const gchar *set_property;
+  const gchar *get_property;
   GIrNodeFunction *function;
   gboolean found = FALSE;
   ParseState in_embedded_state = STATE_NONE;
@@ -854,6 +856,8 @@ start_function (GMarkupParseContext *context,
   symbol = find_attribute ("c:identifier", attribute_names, attribute_values);
   deprecated = find_attribute ("deprecated", attribute_names, attribute_values);
   throws = find_attribute ("throws", attribute_names, attribute_values);
+  set_property = find_attribute ("glib:set-property", attribute_names, attribute_values);
+  get_property = find_attribute ("glib:get-property", attribute_names, attribute_values);
 
   if (name == NULL)
     {
@@ -889,6 +893,25 @@ start_function (GMarkupParseContext *context,
        function->is_constructor = TRUE;
       else
        function->is_constructor = FALSE;
+
+      if (set_property != NULL)
+        {
+          function->is_setter = TRUE;
+          function->is_getter = FALSE;
+          function->property = g_strdup (set_property);
+        }
+      else if (get_property != NULL)
+        {
+          function->is_setter = FALSE;
+          function->is_getter = TRUE;
+          function->property = g_strdup (get_property);
+        }
+      else
+        {
+          function->is_setter = FALSE;
+          function->is_getter = FALSE;
+          function->property = NULL;
+        }
     }
   else
     {
@@ -1503,6 +1526,8 @@ start_property (GMarkupParseContext *context,
   const gchar *construct;
   const gchar *construct_only;
   const gchar *transfer;
+  const gchar *setter;
+  const gchar *getter;
   GIrNodeProperty *property;
   GIrNodeInterface *iface;
 
@@ -1528,6 +1553,8 @@ start_property (GMarkupParseContext *context,
   construct = find_attribute ("construct", attribute_names, attribute_values);
   construct_only = find_attribute ("construct-only", attribute_names, attribute_values);
   transfer = find_attribute ("transfer-ownership", attribute_names, attribute_values);
+  setter = find_attribute ("setter", attribute_names, attribute_values);
+  getter = find_attribute ("getter", attribute_names, attribute_values);
 
   if (name == NULL)
     {
@@ -1559,6 +1586,9 @@ start_property (GMarkupParseContext *context,
   else
     property->construct_only = FALSE;
 
+  property->setter = g_strdup (setter);
+  property->getter = g_strdup (getter);
+
   parse_property_transfer (property, transfer, ctx);
 
   iface = (GIrNodeInterface *)CURRENT_NODE (ctx);
@@ -1806,6 +1836,7 @@ start_class (GMarkupParseContext *context,
   const gchar *deprecated;
   const gchar *abstract;
   const gchar *fundamental;
+  const gchar *final;
   const gchar *ref_func;
   const gchar *unref_func;
   const gchar *set_value_func;
@@ -1826,6 +1857,7 @@ start_class (GMarkupParseContext *context,
   typeinit = find_attribute ("glib:get-type", attribute_names, attribute_values);
   deprecated = find_attribute ("deprecated", attribute_names, attribute_values);
   abstract = find_attribute ("abstract", attribute_names, attribute_values);
+  final = find_attribute ("final", attribute_names, attribute_values);
   fundamental = find_attribute ("glib:fundamental", attribute_names, attribute_values);
   ref_func = find_attribute ("glib:ref-func", attribute_names, attribute_values);
   unref_func = find_attribute ("glib:unref-func", attribute_names, attribute_values);
@@ -1861,6 +1893,7 @@ start_class (GMarkupParseContext *context,
     iface->deprecated = FALSE;
 
   iface->abstract = abstract && strcmp (abstract, "1") == 0;
+  iface->final_ = final && strcmp (final, "1") == 0;
 
   if (fundamental)
     iface->fundamental = TRUE;
@@ -3672,7 +3705,11 @@ _g_ir_parser_parse_file (GIrParser   *parser,
     *dash = '\0';
 
   if (!g_file_get_contents (filename, &buffer, &length, error))
-    return NULL;
+    {
+      g_free (namespace);
+
+      return NULL;
+    }
 
   module = _g_ir_parser_parse_string (parser, namespace, filename, buffer, length, error);
 
index 7b25542..a45edfd 100644 (file)
@@ -423,6 +423,7 @@ write_field_info (const gchar *namespace,
   if (branch)
     {
       xml_printf (file, " branch=\"");
+      g_base_info_unref ((GIBaseInfo *)type);
       type = g_constant_info_get_type (branch);
       g_constant_info_get_value (branch, &value);
       write_constant_value (namespace, type, &value, file);
@@ -585,10 +586,22 @@ write_function_info (const gchar    *namespace,
   xml_printf (file, " name=\"%s\" c:identifier=\"%s\"",
               name, symbol);
 
-  if (flags & GI_FUNCTION_IS_SETTER)
-    xml_printf (file, " type=\"setter\"");
-  else if (flags & GI_FUNCTION_IS_GETTER)
-    xml_printf (file, " type=\"getter\"");
+  if ((flags & GI_FUNCTION_IS_SETTER) || (flags & GI_FUNCTION_IS_GETTER))
+    {
+      GIPropertyInfo *property = g_function_info_get_property (info);
+
+      if (property != NULL)
+        {
+          const char *property_name = g_base_info_get_name ((GIBaseInfo *)property);
+
+          if (flags & GI_FUNCTION_IS_SETTER)
+            xml_printf (file, " glib:set-property=\"%s\"", property_name);
+          else if (flags & GI_FUNCTION_IS_GETTER)
+            xml_printf (file, " glib:get-property=\"%s\"", property_name);
+
+          g_base_info_unref (property);
+        }
+    }
 
   if (deprecated)
     xml_printf (file, " deprecated=\"1\"");
@@ -922,7 +935,10 @@ write_vfunc_info (const gchar *namespace,
   xml_printf (file, " offset=\"%d\"", offset);
 
   if (invoker)
-    xml_printf (file, " invoker=\"%s\"", g_base_info_get_name ((GIBaseInfo*)invoker));
+    {
+      xml_printf (file, " invoker=\"%s\"", g_base_info_get_name ((GIBaseInfo*)invoker));
+      g_base_info_unref ((GIBaseInfo *)invoker);
+    }
 
   write_callable_info (namespace, (GICallableInfo*)info, file);
 
@@ -961,6 +977,28 @@ write_property_info (const gchar    *namespace,
   if (flags & G_PARAM_CONSTRUCT_ONLY)
     xml_printf (file, " construct-only=\"1\"");
 
+  if (flags & G_PARAM_READABLE)
+    {
+      GIFunctionInfo *getter = g_property_info_get_getter (info);
+
+      if (getter != NULL)
+        {
+          xml_printf (file, " getter=\"%s\"", g_base_info_get_name ((GIBaseInfo *) getter));
+          g_base_info_unref ((GIBaseInfo *) getter);
+        }
+    }
+
+  if (flags & G_PARAM_WRITABLE)
+    {
+      GIFunctionInfo *setter = g_property_info_get_setter (info);
+
+      if (setter != NULL)
+        {
+          xml_printf (file, " setter=\"%s\"", g_base_info_get_name ((GIBaseInfo *) setter));
+          g_base_info_unref ((GIBaseInfo *) setter);
+        }
+    }
+
   write_ownership_transfer (g_property_info_get_ownership_transfer (info), file);
 
   write_attributes (file, (GIBaseInfo*) info);
@@ -984,6 +1022,7 @@ write_object_info (const gchar  *namespace,
   gboolean deprecated;
   gboolean is_abstract;
   gboolean is_fundamental;
+  gboolean is_final;
   GIObjectInfo *pnode;
   GIStructInfo *class_struct;
   gint i;
@@ -992,6 +1031,7 @@ write_object_info (const gchar  *namespace,
   deprecated = g_base_info_is_deprecated ((GIBaseInfo *)info);
   is_abstract = g_object_info_get_abstract (info);
   is_fundamental = g_object_info_get_fundamental (info);
+  is_final = g_object_info_get_final (info);
 
   type_name = g_registered_type_info_get_type_name ((GIRegisteredTypeInfo*)info);
   type_init = g_registered_type_info_get_type_init ((GIRegisteredTypeInfo*)info);
@@ -1015,6 +1055,9 @@ write_object_info (const gchar  *namespace,
   if (is_abstract)
     xml_printf (file, " abstract=\"1\"");
 
+  if (is_final)
+    xml_printf (file, " final=\"1\"");
+
   xml_printf (file, " glib:type-name=\"%s\" glib:get-type=\"%s\"", type_name, type_init);
 
   if (is_fundamental)
index 28b177d..7fe9128 100644 (file)
@@ -903,6 +903,8 @@ typedef struct {
   ValueBlob values[];
 } EnumBlob;
 
+#define ACCESSOR_SENTINEL       0x3ff
+
 /**
  * PropertyBlob:
  * @name: The name of the property.
@@ -918,6 +920,10 @@ typedef struct {
  *   ownership of the container, but not of its contents, is transferred.
  *   This is typically the case when reading lists of statically allocated
  *   things.
+ * @setter: the index of the setter function for this property, if @writable
+ *   is set; if the method is not known, the value will be set to %ACCESSOR_SENTINEL
+ * @getter: ths index of the getter function for this property, if @readable
+ *   is set; if the method is not known, the value will be set to %ACCESSOR_SENTINEL
  * @reserved: Reserved for future use.
  * @reserved2: Reserved for future use.
  * @type: Describes the type of the property.
@@ -934,7 +940,9 @@ typedef struct {
   guint32        construct_only               : 1;
   guint32        transfer_ownership           : 1;
   guint32        transfer_container_ownership : 1;
-  guint32        reserved                     :25;
+  guint32        setter                       :10;
+  guint32        getter                       :10;
+  guint32        reserved                     : 5;
 
   guint32        reserved2;
 
@@ -1034,10 +1042,11 @@ typedef struct {
 /**
  * ObjectBlob:
  * @blob_type: #BLOB_TYPE_OBJECT
- * @deprecated: TODO
- * @abstract: TODO
+ * @deprecated: whether the type is deprecated
+ * @abstract: whether the type can be instantiated
  * @fundamental: this object is not a GObject derived type, instead it's
  *   an additional fundamental type.
+ * @final: whether the type can be derived
  * @reserved: Reserved for future use.
  * @name: TODO
  * @gtype_name: String name of the associated #GType
@@ -1076,7 +1085,8 @@ typedef struct {
   guint16   deprecated   : 1;
   guint16   abstract     : 1;
   guint16   fundamental  : 1;
-  guint16   reserved     :13;
+  guint16   final_       : 1;
+  guint16   reserved     :12;
   guint32   name;
 
   guint32   gtype_name;
index de11748..904dff4 100644 (file)
@@ -2139,7 +2139,7 @@ prefix_with_context (GError **error,
                     const char *section,
                     ValidateContext *ctx)
 {
-  GString *str = g_string_new (NULL);
+  GString *str;
   GSList *link;
   char *buf;
 
@@ -2150,6 +2150,8 @@ prefix_with_context (GError **error,
       return;
     }
 
+  str = g_string_new (NULL);
+
   for (; link; link = link->next)
     {
       g_string_append (str, link->data);
index a941ee2..273af72 100644 (file)
 # define GI_AVAILABLE_IN_1_66                 _GI_EXTERN
 #endif
 
+#if defined(GLIB_VERSION_2_70) && GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_70
+# define GI_AVAILABLE_IN_1_70                 GLIB_UNAVAILABLE(2, 70)
+#else
+# define GI_AVAILABLE_IN_1_70                 _GI_EXTERN
+#endif
+
 #endif /* __GIVERSIONMACROS_H__ */
index c8ef6aa..786749a 100644 (file)
@@ -185,13 +185,6 @@ girepo_lib = shared_library('girepository-1.0',
   install: true,
 )
 
-# Copy to builddir for use with giscanner/dumper.py when running uninstalled
-configure_file(input : 'gdump.c',
-  output : 'gdump.c',
-  copy: true,
-  install_dir: join_paths(get_option('datadir'), 'gobject-introspection-1.0'),
-)
-
 girepo_dep = declare_dependency(
   link_with: girepo_lib,
   dependencies: [glib_dep, gobject_dep, gio_dep, gmodule_dep],
index 267542f..3307327 100644 (file)
@@ -103,7 +103,7 @@ Additionally, the following restrictions are in effect:
 Refer to the `GTK-Doc manual`_ for more detailed usage information.
 
 .. _GTK-Doc manual:
-        http://developer.gnome.org/gtk-doc-manual/1.18/documenting.html.en
+        http://developer-old.gnome.org/gtk-doc-manual/1.18/documenting.html.en
 '''
 
 import os
@@ -196,7 +196,9 @@ ANN_CONSTRUCTOR = 'constructor'
 ANN_DESTROY = 'destroy'
 ANN_ELEMENT_TYPE = 'element-type'
 ANN_FOREIGN = 'foreign'
+ANN_GET_PROPERTY = 'get-property'
 ANN_GET_VALUE_FUNC = 'get-value-func'
+ANN_GETTER = 'getter'
 ANN_IN = 'in'
 ANN_INOUT = 'inout'
 ANN_METHOD = 'method'
@@ -207,7 +209,9 @@ ANN_OUT = 'out'
 ANN_REF_FUNC = 'ref-func'
 ANN_RENAME_TO = 'rename-to'
 ANN_SCOPE = 'scope'
+ANN_SET_PROPERTY = 'set-property'
 ANN_SET_VALUE_FUNC = 'set-value-func'
+ANN_SETTER = 'setter'
 ANN_SKIP = 'skip'
 ANN_TRANSFER = 'transfer'
 ANN_TYPE = 'type'
@@ -226,7 +230,9 @@ GI_ANNS = [ANN_ALLOW_NONE,
            ANN_DESTROY,
            ANN_ELEMENT_TYPE,
            ANN_FOREIGN,
+           ANN_GET_PROPERTY,
            ANN_GET_VALUE_FUNC,
+           ANN_GETTER,
            ANN_IN,
            ANN_INOUT,
            ANN_METHOD,
@@ -234,7 +240,9 @@ GI_ANNS = [ANN_ALLOW_NONE,
            ANN_REF_FUNC,
            ANN_RENAME_TO,
            ANN_SCOPE,
+           ANN_SET_PROPERTY,
            ANN_SET_VALUE_FUNC,
+           ANN_SETTER,
            ANN_SKIP,
            ANN_TRANSFER,
            ANN_TYPE,
@@ -812,6 +820,18 @@ class GtkDocAnnotatable(object):
 
         self._validate_annotation(position, ann_name, options, exact_n_options=0)
 
+    def _do_validate_get_property(self, position, ann_name, options):
+        '''
+        Validate the ``(get-property)`` annotation.
+
+        :param position: :class:`giscanner.message.Position` of the line in the source file
+                         containing the annotation to be validated
+        :param ann_name: name of the annotation holding the options to validate
+        :param options: annotation options to validate
+        '''
+
+        self._validate_annotation(position, ann_name, options, exact_n_options=1)
+
     def _do_validate_get_value_func(self, position, ann_name, options):
         '''
         Validate the ``(value-func)`` annotation.
@@ -824,6 +844,18 @@ class GtkDocAnnotatable(object):
 
         self._validate_annotation(position, ann_name, options, exact_n_options=1)
 
+    def _do_validate_getter(self, position, ann_name, options):
+        '''
+        Validate the ``(getter)`` annotation.
+
+        :param position: :class:`giscanner.message.Position` of the line in the source file
+                         containing the annotation to be validated
+        :param ann_name: name of the annotation holding the options to validate
+        :param options: annotation options to validate
+        '''
+
+        self._validate_annotation(position, ann_name, options, exact_n_options=1)
+
     def _do_validate_in(self, position, ann_name, options):
         '''
         Validate the ``(in)`` annotation.
@@ -947,6 +979,18 @@ class GtkDocAnnotatable(object):
         self._validate_annotation(position, ann_name, options, exact_n_options=1,
                                   choices=SCOPE_OPTIONS)
 
+    def _do_validate_set_property(self, position, ann_name, options):
+        '''
+        Validate the ``(set-property)`` annotation.
+
+        :param position: :class:`giscanner.message.Position` of the line in the source file
+                         containing the annotation to be validated
+        :param ann_name: name of the annotation holding the options to validate
+        :param options: annotation options to validate
+        '''
+
+        self._validate_annotation(position, ann_name, options, exact_n_options=1)
+
     def _do_validate_set_value_func(self, position, ann_name, options):
         '''
         Validate the ``(value-func)`` annotation.
@@ -959,6 +1003,18 @@ class GtkDocAnnotatable(object):
 
         self._validate_annotation(position, ann_name, options, exact_n_options=1)
 
+    def _do_validate_setter(self, position, ann_name, options):
+        '''
+        Validate the ``(setter)`` annotation.
+
+        :param position: :class:`giscanner.message.Position` of the line in the source file
+                         containing the annotation to be validated
+        :param ann_name: name of the annotation holding the options to validate
+        :param options: annotation options to validate
+        '''
+
+        self._validate_annotation(position, ann_name, options, exact_n_options=1)
+
     def _do_validate_skip(self, position, ann_name, options):
         '''
         Validate the ``(skip)`` annotation.
@@ -1092,9 +1148,26 @@ class GtkDocCommentBlock(GtkDocAnnotatable):
                  'name', 'params', 'description', 'tags')
 
     #: Valid annotation names for the GTK-Doc comment block identifier part.
-    valid_annotations = (ANN_ATTRIBUTES, ANN_CONSTRUCTOR, ANN_FOREIGN, ANN_GET_VALUE_FUNC,
-                         ANN_METHOD, ANN_REF_FUNC, ANN_RENAME_TO, ANN_SET_VALUE_FUNC,
-                         ANN_SKIP, ANN_TRANSFER, ANN_TYPE, ANN_UNREF_FUNC, ANN_VALUE, ANN_VFUNC)
+    valid_annotations = (
+        ANN_ATTRIBUTES,
+        ANN_CONSTRUCTOR,
+        ANN_FOREIGN,
+        ANN_GET_PROPERTY,
+        ANN_GET_VALUE_FUNC,
+        ANN_GETTER,
+        ANN_METHOD,
+        ANN_REF_FUNC,
+        ANN_RENAME_TO,
+        ANN_SET_PROPERTY,
+        ANN_SET_VALUE_FUNC,
+        ANN_SETTER,
+        ANN_SKIP,
+        ANN_TRANSFER,
+        ANN_TYPE,
+        ANN_UNREF_FUNC,
+        ANN_VALUE,
+        ANN_VFUNC,
+    )
 
     def __init__(self, name, position=None):
         GtkDocAnnotatable.__init__(self, position)
index 593969f..c94ee76 100644 (file)
@@ -752,6 +752,8 @@ class Function(Callable):
         self.shadows = None             # C symbol string
         self.moved_to = None            # namespaced function name string
         self.internal_skipped = False   # if True, this func will not be written to GIR
+        self.set_property = None        # Property name
+        self.get_property = None        # Property name
 
     def clone(self):
         clone = copy.copy(self)
@@ -972,12 +974,13 @@ class Bitfield(Node, Registered):
 
 class Member(Annotated):
 
-    def __init__(self, name, value, symbol, nick):
+    def __init__(self, name, value, symbol, nick=None, dump_name=None):
         Annotated.__init__(self)
         self.name = name
         self.value = value
         self.symbol = symbol
         self.nick = nick
+        self.dump_name = dump_name
         self.parent = None
 
     def _compare(self, other, op):
@@ -1187,7 +1190,8 @@ class Class(Node, Registered):
                  gtype_name=None,
                  get_type=None,
                  c_symbol_prefix=None,
-                 is_abstract=False):
+                 is_abstract=False,
+                 is_final=False):
         Node.__init__(self, name)
         Registered.__init__(self, gtype_name, get_type)
         self.ctype = ctype
@@ -1204,6 +1208,7 @@ class Class(Node, Registered):
         self.parent_chain = []
         self.glib_type_struct = None
         self.is_abstract = is_abstract
+        self.is_final = is_final
         self.methods = []
         self.virtual_methods = []
         self.static_methods = []
@@ -1293,6 +1298,8 @@ class Property(Node):
             self.transfer = PARAM_TRANSFER_NONE
         else:
             self.transfer = transfer
+        self.setter = None
+        self.getter = None
         self.parent = None  # A Class or Interface
 
 
index f61c46c..22afd61 100644 (file)
@@ -102,7 +102,7 @@ class DumpCompiler(object):
 
         tpl_args = {}
         if self._uninst_srcdir is not None:
-            gdump_path = os.path.join(self._uninst_srcdir, 'girepository', 'gdump.c')
+            gdump_path = os.path.join(self._uninst_srcdir, 'giscanner', 'gdump.c')
         else:
             try:
                 gdump_path = GDUMP_PATH
index 3d9720d..1a0794d 100644 (file)
@@ -262,10 +262,12 @@ blob containing data gleaned from GObject's primitive introspection."""
         # values as a 32-bit signed integer, even if they were unsigned
         # in the source code.
         previous_values = {}
+        previous_symbols = {}
         previous = self._namespace.get(enum_name)
         if isinstance(previous, (ast.Enum, ast.Bitfield)):
             for member in previous.members:
                 previous_values[member.name] = member.value
+                previous_symbols[member.name] = member.symbol
 
         members = []
         for member in xmlnode.findall('member'):
@@ -275,13 +277,16 @@ blob containing data gleaned from GObject's primitive introspection."""
 
             if name in previous_values:
                 value = previous_values[name]
+                symbol = previous_symbols[name]
             else:
                 value = member.attrib['value']
+                symbol = member.attrib['name']
 
             members.append(ast.Member(name,
                                       value,
-                                      member.attrib['name'],
-                                      member.attrib['nick']))
+                                      symbol,
+                                      member.attrib['nick'],
+                                      member.attrib['name']))
 
         if xmlnode.tag == 'flags':
             klass = ast.Bitfield
@@ -315,6 +320,7 @@ different --identifier-prefix.""" % (xmlnode.attrib['name'], self._namespace.ide
     def _introspect_object(self, xmlnode):
         type_name = xmlnode.attrib['name']
         is_abstract = bool(xmlnode.attrib.get('abstract', False))
+        is_final = bool(xmlnode.attrib.get('final', False))
         (get_type, c_symbol_prefix) = self._split_type_and_symbol_prefix(xmlnode)
         try:
             object_name = self._transformer.strip_identifier(type_name)
@@ -324,7 +330,8 @@ different --identifier-prefix.""" % (xmlnode.attrib['name'], self._namespace.ide
                          gtype_name=type_name,
                          get_type=get_type,
                          c_symbol_prefix=c_symbol_prefix,
-                         is_abstract=is_abstract)
+                         is_abstract=is_abstract,
+                         is_final=is_final)
         self._parse_parents(xmlnode, node)
         self._introspect_properties(node, xmlnode)
         self._introspect_signals(node, xmlnode)
@@ -453,6 +460,7 @@ different --identifier-prefix.""" % (xmlnode.attrib['name'], self._namespace.ide
         type_name = xmlnode.attrib['name']
 
         is_abstract = bool(xmlnode.attrib.get('abstract', False))
+        is_final = bool(xmlnode.attrib.get('final', False))
         (get_type, c_symbol_prefix) = self._split_type_and_symbol_prefix(xmlnode)
         try:
             fundamental_name = self._transformer.strip_identifier(type_name)
@@ -464,7 +472,8 @@ different --identifier-prefix.""" % (xmlnode.attrib['name'], self._namespace.ide
                          gtype_name=type_name,
                          get_type=get_type,
                          c_symbol_prefix=c_symbol_prefix,
-                         is_abstract=is_abstract)
+                         is_abstract=is_abstract,
+                         is_final=is_final)
         self._parse_parents(xmlnode, node)
         node.fundamental = True
         self._introspect_implemented_interfaces(node, xmlnode)
index d229b16..d9cda8d 100644 (file)
@@ -259,6 +259,9 @@ class GIRParser(object):
             is_abstract = node.attrib.get('abstract')
             is_abstract = is_abstract and is_abstract != '0'
             ctor_kwargs['is_abstract'] = is_abstract
+            is_final = node.attrib.get('final')
+            is_final = is_final and is_final != '0'
+            ctor_kwargs['is_final'] = is_final
         else:
             raise AssertionError(node)
 
@@ -379,6 +382,8 @@ class GIRParser(object):
         else:
             assert False
 
+        func.set_property = node.attrib.get(_glibns('set-property'), None)
+        func.get_property = node.attrib.get(_glibns('get-property'), None)
         func.shadows = node.attrib.get('shadows', None)
         func.shadowed_by = node.attrib.get('shadowed-by', None)
         func.moved_to = node.attrib.get('moved-to', None)
@@ -601,15 +606,18 @@ class GIRParser(object):
                             node.attrib.get('construct') == '1',
                             node.attrib.get('construct-only') == '1',
                             node.attrib.get('transfer-ownership'))
-        self._parse_generic_attribs(node, prop)
+        prop.setter = node.attrib.get('setter')
+        prop.getter = node.attrib.get('getter')
         prop.parent = parent
+        self._parse_generic_attribs(node, prop)
         return prop
 
     def _parse_member(self, node):
         member = ast.Member(node.attrib['name'],
                             node.attrib['value'],
                             node.attrib.get(_cns('identifier')),
-                            node.attrib.get(_glibns('nick')))
+                            node.attrib.get(_glibns('nick')),
+                            node.attrib.get(_glibns('name')))
         self._parse_generic_attribs(node, member)
         return member
 
index 2b83736..9a31514 100644 (file)
@@ -224,6 +224,10 @@ class GIRWriter(XMLWriter):
             attrs.append(('shadows', func.shadows))
         if func.moved_to is not None:
             attrs.append(('moved-to', func.moved_to))
+        if func.set_property is not None:
+            attrs.append(('glib:set-property', func.set_property))
+        if func.get_property is not None:
+            attrs.append(('glib:get-property', func.get_property))
         self._write_callable(func, tag_name, attrs)
 
     def _write_function_macro(self, macro):
@@ -442,6 +446,8 @@ class GIRWriter(XMLWriter):
         self._append_version(member, attrs)
         if member.nick is not None:
             attrs.append(('glib:nick', member.nick))
+        if member.dump_name is not None:
+            attrs.append(('glib:name', member.dump_name))
         with self.tagcontext('member', attrs):
             self._write_generic(member)
 
@@ -473,6 +479,8 @@ class GIRWriter(XMLWriter):
                               self._type_to_name(node.parent_type)))
             if node.is_abstract:
                 attrs.append(('abstract', '1'))
+            if node.is_final:
+                attrs.append(('final', '1'))
         else:
             assert isinstance(node, ast.Interface)
             tag_name = 'interface'
@@ -548,6 +556,10 @@ class GIRWriter(XMLWriter):
             attrs.append(('construct-only', '1'))
         if prop.transfer:
             attrs.append(('transfer-ownership', prop.transfer))
+        if prop.setter:
+            attrs.append(('setter', prop.setter))
+        if prop.getter:
+            attrs.append(('getter', prop.getter))
         with self.tagcontext('property', attrs):
             self._write_generic(prop)
             self._write_type(prop.type)
index e2056b4..305e192 100644 (file)
@@ -37,6 +37,7 @@ class IntrospectablePass(object):
         self._namespace.walk(self._analyze_node)
         self._namespace.walk(self._introspectable_callable_analysis)
         self._namespace.walk(self._introspectable_callable_analysis)
+        self._namespace.walk(self._introspectable_property_analysis)
         self._namespace.walk(self._introspectable_pass3)
         self._namespace.walk(self._remove_non_reachable_backcompat_copies)
 
@@ -209,6 +210,30 @@ class IntrospectablePass(object):
                 return True
         return True
 
+    def _introspectable_property_analysis(self, obj, stack):
+        if obj.skip:
+            return False
+        if isinstance(obj, (ast.Class, ast.Interface)):
+            for prop in obj.properties:
+                if not self._type_is_introspectable(prop.type):
+                    prop.introspectable = False
+                    prop.setter = None
+                    prop.getter = None
+            for method in obj.methods:
+                set_property = method.set_property
+                if set_property is not None:
+                    for prop in obj.properties:
+                        if prop.name == set_property and not prop.introspectable:
+                            method.set_property = None
+                            break
+                get_property = method.get_property
+                if get_property is not None:
+                    for prop in obj.properties:
+                        if prop.name == get_property and not prop.introspectable:
+                            method.get_property = None
+                            break
+        return True
+
     def _introspectable_pass3(self, obj, stack):
         if obj.skip:
             return False
@@ -223,9 +248,6 @@ class IntrospectablePass(object):
                         field.introspectable = False
         # Propagate introspectability for properties
         if isinstance(obj, (ast.Class, ast.Interface)):
-            for prop in obj.properties:
-                if not self._type_is_introspectable(prop.type):
-                    prop.introspectable = False
             for sig in obj.signals:
                 self._introspectable_callable_analysis(sig, [obj])
         return True
index 9077a1d..0f1ea9b 100644 (file)
@@ -24,10 +24,11 @@ from . import message
 from .annotationparser import (TAG_DEPRECATED, TAG_SINCE, TAG_STABILITY, TAG_RETURNS)
 from .annotationparser import (ANN_ALLOW_NONE, ANN_ARRAY, ANN_ATTRIBUTES, ANN_CLOSURE,
                                ANN_CONSTRUCTOR, ANN_DESTROY, ANN_ELEMENT_TYPE, ANN_FOREIGN,
-                               ANN_GET_VALUE_FUNC, ANN_IN, ANN_INOUT, ANN_METHOD, ANN_OUT,
-                               ANN_REF_FUNC, ANN_RENAME_TO, ANN_SCOPE, ANN_SET_VALUE_FUNC,
-                               ANN_SKIP, ANN_TRANSFER, ANN_TYPE, ANN_UNREF_FUNC, ANN_VALUE,
-                               ANN_VFUNC, ANN_NULLABLE, ANN_OPTIONAL, ANN_NOT)
+                               ANN_GET_PROPERTY, ANN_GET_VALUE_FUNC, ANN_GETTER, ANN_IN, ANN_INOUT,
+                               ANN_METHOD, ANN_OUT, ANN_REF_FUNC, ANN_RENAME_TO, ANN_SCOPE,
+                               ANN_SET_PROPERTY, ANN_SET_VALUE_FUNC, ANN_SETTER, ANN_SKIP, ANN_TRANSFER,
+                               ANN_TYPE, ANN_UNREF_FUNC, ANN_VALUE, ANN_VFUNC, ANN_NULLABLE,
+                               ANN_OPTIONAL, ANN_NOT)
 from .annotationparser import (OPT_ARRAY_FIXED_SIZE, OPT_ARRAY_LENGTH, OPT_ARRAY_ZERO_TERMINATED,
                                OPT_OUT_CALLEE_ALLOCATES, OPT_OUT_CALLER_ALLOCATES,
                                OPT_TRANSFER_CONTAINER, OPT_TRANSFER_FLOATING, OPT_TRANSFER_NONE)
@@ -91,6 +92,7 @@ class MainTransformer(object):
                 self._pair_function(node)
             if isinstance(node, (ast.Class, ast.Interface)):
                 self._pair_class_virtuals(node)
+                self._pair_property_accessors(node)
 
         # Some annotations need to be post function pairing
         self._namespace.walk(self._pass_read_annotations2)
@@ -773,6 +775,14 @@ class MainTransformer(object):
         if ANN_METHOD in block.annotations:
             node.is_method = True
 
+        set_property = block.annotations.get(ANN_SET_PROPERTY)
+        if set_property is not None and isinstance(node, ast.Function):
+            node.set_property = set_property[0]
+
+        get_property = block.annotations.get(ANN_GET_PROPERTY)
+        if get_property is not None and isinstance(node, ast.Function):
+            node.get_property = get_property[0]
+
     def _apply_annotations_alias(self, node, chain):
         block = self._get_block(node)
         self._apply_annotations_annotated(node, block)
@@ -914,6 +924,12 @@ class MainTransformer(object):
         type_annotation = block.annotations.get(ANN_TYPE)
         if type_annotation:
             prop.type = self._resolve_toplevel(type_annotation[0], prop.type, prop, parent)
+        setter = block.annotations.get(ANN_SETTER)
+        if setter:
+            prop.setter = setter[0]
+        getter = block.annotations.get(ANN_GETTER)
+        if getter:
+            prop.getter = getter[0]
 
     def _apply_annotations_signal(self, parent, signal):
         names = []
@@ -1288,10 +1304,21 @@ method or constructor of some type."""
         return origin_node
 
     def _get_constructor_name(self, func, subsymbol):
-        name = None
+        prefix_matches = False
+        uscored_prefix = None
+        target = self._transformer.lookup_typenode(func.retval.type)
+        if hasattr(target, 'c_symbol_prefix') and target.c_symbol_prefix is not None:
+            prefix_matches = subsymbol.startswith(target.c_symbol_prefix)
+            if prefix_matches:
+                uscored_prefix = target.c_symbol_prefix
+        if not prefix_matches:
+            uscored_prefix = self._uscored_identifier_for_type(func.retval.type)
         split = self._split_uscored_by_type(subsymbol)
         if split is None:
             if func.is_constructor:
+                if uscored_prefix in func.symbol:
+                    subsym_idx = func.symbol.find(subsymbol)
+                    func.name = func.symbol[(subsym_idx + len(uscored_prefix) + 1):]
                 name = func.name
         else:
             _, name = split
@@ -1447,6 +1474,56 @@ method or constructor of some type."""
                 self._apply_annotations_callable(vfunc, [], block)
                 break
 
+    def _pair_property_accessors(self, node):
+        """Look for accessor methods for class properties"""
+        for prop in node.properties:
+            if not prop.introspectable:
+                continue
+            if prop.setter is None:
+                normalized_name = prop.name.replace('-', '_')
+                if prop.writable and not prop.construct_only:
+                    setter = 'set_' + normalized_name
+                else:
+                    setter = None
+            else:
+                setter = prop.setter
+            if prop.getter is None:
+                if prop.readable:
+                    getter = ['get_' + normalized_name]
+                    # Heuristic: read-only properties can have getters that are
+                    # just the property name, like: gtk_widget_has_focus()
+                    if not prop.writable and prop.type.is_equiv(ast.TYPE_BOOLEAN):
+                        getter.append(normalized_name)
+                else:
+                    getter = []
+            else:
+                getter = [prop.getter]
+            for method in node.methods:
+                if not method.introspectable:
+                    continue
+                if setter is not None and method.name == setter:
+                    if method.set_property is None:
+                        method.set_property = prop.name
+                    elif method.set_property != prop.name:
+                        message.warn_node(method,
+                                          "Setter method '%s' for property '%s' has a "
+                                          "mismatched '(set-property %s)' annotation" %
+                                          (method.symbol, prop.name, method.set_property))
+                        method.set_property = prop.name
+                    prop.setter = method.name
+                    continue
+                if getter is not [] and method.name in getter:
+                    if method.get_property is None:
+                        method.get_property = prop.name
+                    elif method.get_property != prop.name:
+                        message.warn_node(method,
+                                          "Getter method '%s' for property '%s' has a "
+                                          "mismatched '(get-property %s)' annotation" %
+                                          (method.symbol, prop.name, method.get_property))
+                        method.get_property = prop.name
+                    prop.getter = method.name
+                    continue
+
     def _pass3(self, node, chain):
         """Pass 3 is after we've loaded GType data and performed type
         closure."""
index 098b7b6..41edcd4 100644 (file)
@@ -44,6 +44,13 @@ foreach f : giscanner_files
                                           configuration : giscanner_conf_data)
 endforeach
 
+# Copy to builddir for use with dumper.py when running uninstalled
+configure_file(input : '../girepository/gdump.c',
+  output : 'gdump.c',
+  copy: true,
+  install_dir: join_paths(get_option('datadir'), 'gobject-introspection-1.0'),
+)
+
 install_subdir('doctemplates', install_dir: giscannerdir)
 
 # XXX: this doesn't track the input, but there is nothing to copy many files
index cfec4d5..b6cc649 100644 (file)
@@ -224,6 +224,8 @@ stringtext                          ([^\\\"])|(\\.)
 "_Float32x"                             { return BASIC_TYPE; }
 "_Float64x"                             { return BASIC_TYPE; }
 "_Float128x"                            { return BASIC_TYPE; }
+"__float80"                             { return BASIC_TYPE; }
+"__float128"                            { return BASIC_TYPE; }
 "for"                                  { return FOR; }
 "goto"                                 { return GOTO; }
 "if"                                   { return IF; }
index 269a7bd..b304a29 100644 (file)
@@ -1677,11 +1677,36 @@ gi_source_scanner_parse_macros (GISourceScanner *scanner, GList *filenames)
 {
   GError *error = NULL;
   char *tmp_name = NULL;
-  FILE *fmacros =
-    fdopen (g_file_open_tmp ("gen-introspect-XXXXXX.h", &tmp_name, &error),
-            "w+");
+  gint tmp_fd;
+  FILE *fmacros;
   GList *l;
 
+  tmp_fd = g_file_open_tmp ("gen-introspect-XXXXXX.h", &tmp_name, &error);
+
+  if (tmp_fd == -1)
+    {
+      gchar *filename = g_file_get_path (scanner->current_file);
+      gchar *error_msg = g_strdup_printf ("%s: failed to create temporary file '%s' while parsing macros: %s", filename, tmp_name, error->message);
+      g_ptr_array_add (scanner->errors, error_msg);
+      g_free (filename);
+      g_error_free (error);
+      return;
+    }
+
+  fmacros = fdopen (tmp_fd, "w+");
+
+  if (!fmacros)
+    {
+      gchar *filename = g_file_get_path (scanner->current_file);
+      gchar *error_msg = g_strdup_printf ("%s: failed to open temporary file '%s' while parsing macros", filename, tmp_name);
+      g_ptr_array_add (scanner->errors, error_msg);
+      g_free (filename);
+      close (tmp_fd);
+      g_unlink (tmp_name);
+      g_free (tmp_name);
+      return;
+    }
+
   for (l = filenames; l != NULL; l = l->next)
     {
       FILE *f = fopen (l->data, "r");
@@ -1821,6 +1846,7 @@ gi_source_scanner_parse_macros (GISourceScanner *scanner, GList *filenames)
   parse_file (scanner, fmacros);
   fclose (fmacros);
   g_unlink (tmp_name);
+  g_free (tmp_name);
 }
 
 gboolean
index bcabded..ad2a87f 100644 (file)
@@ -432,9 +432,7 @@ raise ValueError."""
                 name = self._strip_symbol(child)
             members.append(ast.Member(name.lower(),
                                       child.const_int,
-                                      child.ident,
-                                      None))
-
+                                      child.ident))
         enum_name = self.strip_identifier(symbol.ident)
         if symbol.base_type.is_bitfield:
             klass = ast.Bitfield
index e5205e3..691863a 100644 (file)
@@ -1,8 +1,8 @@
 project('gobject-introspection', 'c',
-  version: '1.68.0',
-  meson_version: '>= 0.50.1',
+  version: '1.69.0',
+  meson_version: '>= 0.55.3',
   default_options: [
-    'warning_level=1',
+    'warning_level=2',
     'buildtype=debugoptimized',
   ],
 )
@@ -28,12 +28,10 @@ cc = meson.get_compiler('c')
 project_c_args = []
 if cc.get_id() != 'msvc'
     project_c_args += [
-      '-Wall',
       '-Warray-bounds',
       '-Wcast-align',
       '-Wdeclaration-after-statement',
       '-Wduplicated-branches',
-      '-Wextra',
       '-Wformat=2',
       '-Wformat-nonliteral',
       '-Wformat-security',
@@ -218,14 +216,19 @@ subdir('giscanner')
 # scenarios where running target binaries through software emulation
 # is not possible (due to the SW emulation missing support for target HW).
 if get_option('build_introspection_data') == true
-    subdir('gir')
+  subdir('gir')
+else
+  # for tests
+  typelibs = disabler()
+  gobject_gir = disabler()
+  gio_gir = disabler()
 endif
 subdir('docs')
 
 # The tests will also run, which is not possible if they
 # were built for a different architecture.
 if not meson.is_cross_build()
-    subdir('tests')
+  subdir('tests')
 endif
 
 install_data('Makefile.introspection', install_dir: join_paths(get_option('datadir'), 'gobject-introspection-1.0'))
index e4de7ee..cd886b2 100644 (file)
@@ -1,4 +1,5 @@
 [wrap-git]
 directory=glib
 url=https://gitlab.gnome.org/GNOME/glib.git
-revision=origin/master
+revision=main
+depth=1
index 3d15e2a..f92e736 100644 (file)
@@ -2,3 +2,4 @@
 directory=libffi
 url=https://github.com/centricular/libffi.git
 revision=meson
+depth=1
index f32522e..d7c8d5f 100644 (file)
@@ -2,3 +2,4 @@
 directory=proxy-libintl
 url=https://github.com/centricular/proxy-libintl.git
 revision=master
+depth=1
index de1e861..0a3d3dc 100644 (file)
@@ -2,3 +2,4 @@
 directory=zlib
 url=https://github.com/centricular/zlib.git
 revision=meson
+depth=1
index 46ac0fb..fe26530 100644 (file)
@@ -4391,7 +4391,7 @@ gi_marshalling_tests_object_method_int8_out (GIMarshallingTestsObject *self, gin
 
 /**
  * gi_marshalling_tests_object_method_int8_arg_and_out_caller:
- * @out: (out caller-allocates):
+ * @out: (out):
  */
 void
   gi_marshalling_tests_object_method_int8_arg_and_out_caller (GIMarshallingTestsObject *self, gint8 arg, gint8 *out)
@@ -4411,7 +4411,7 @@ void
 
 /**
  * gi_marshalling_tests_object_method_str_arg_out_ret:
- * @out: (out caller-allocates):
+ * @out: (out):
  *
  * Returns: (transfer none)
  */
index c605c5a..66f476d 100644 (file)
@@ -1363,7 +1363,7 @@ struct _GIMarshallingTestsObjectClass
 
     /**
      * GIMarshallingTestsObjectClass::method_int8_arg_and_out_caller:
-     * @out: (out caller-allocates):
+     * @out: (out):
      */
     void (* method_int8_arg_and_out_caller) (GIMarshallingTestsObject *self, gint8 arg, gint8 *out);
 
@@ -1375,7 +1375,7 @@ struct _GIMarshallingTestsObjectClass
 
     /**
      * GIMarshallingTestsObjectClass::method_str_arg_out_ret:
-     * @out: (out caller-allocates):
+     * @out: (out):
      *
      * Returns: (transfer none)
      */
index b240749..48981c6 100644 (file)
@@ -18,6 +18,8 @@ test_env_common_pypath = [meson.build_root()]
 
 test_regress_sources = files('scanner/regress.c')
 test_regress_headers = files('scanner/regress.h')
+test_warnlib_sources = files('scanner/warnlib.c')
+test_warnlib_headers = files('scanner/warnlib.h')
 test_marshalling_sources = files('gimarshallingtests.c')
 test_marshalling_headers = files('gimarshallingtests.h')
 
@@ -45,13 +47,17 @@ test_install_dir = join_paths(get_option('datadir'), 'gobject-introspection-1.0'
 
 install_data(installed_sources, install_dir: test_install_dir)
 
+# Will be overridden to newly built one in common-case regular, non-cross
+# build.
+test_girscanner = find_program('g-ir-scanner', native: true, required : false)
+test_gircompiler = find_program('g-ir-compiler', native: false, required : false)
+
 # Generate everything.h and everything.c:
 test_everything_files = custom_target('everything',
   output: ['everything.h', 'everything.c'],
   depends: typelibs,
   command: [
-    python,
-    girscanner,
+    test_girscanner,
     '--quiet',
     '--generate-typelib-tests=Everything,@OUTPUT0@,@OUTPUT1@',
     '--function-decoration=_GI_TEST_EXTERN',
@@ -103,14 +109,15 @@ test_typelibs = []
 # well. Though, this could work differently altogether. Instead one could
 # generate appropriate pkg-config files and point PKG_CONFIG_PATH to them,
 # leaving all invocations of g-ir-scanner as is.
-if glib_dep.type_name() == 'pkgconfig'
-  test_gir_files += custom_target('gir-everything',
+if (glib_dep.type_name() == 'pkgconfig' and
+    test_girscanner.found() and
+    get_option('build_introspection_data') == true)
+  test_gir_files += [custom_target('gir-everything',
     input: test_everything_sources + test_everything_headers,
     output: 'Everything-1.0.gir',
     depends: [everything_lib] + typelibs,
     command: [
-      python,
-      girscanner,
+      test_girscanner,
       '--quiet',
       '--output=@OUTPUT@',
       '--no-libtool',
@@ -128,15 +135,14 @@ if glib_dep.type_name() == 'pkgconfig'
       extra_giscanner_args,
       '@INPUT@',
     ]
-  )
+  )]
 
-  test_gir_files += custom_target('gir-gimarshallingtests',
+  test_gir_files += [custom_target('gir-gimarshallingtests',
     input: test_marshalling_sources + test_marshalling_headers,
     output: 'GIMarshallingTests-1.0.gir',
     depends: [gimarshallingtests_lib] + typelibs,
     command: [
-      python,
-      girscanner,
+      test_girscanner,
       '--quiet',
       '--output=@OUTPUT@',
       '--no-libtool',
@@ -155,14 +161,14 @@ if glib_dep.type_name() == 'pkgconfig'
       extra_giscanner_args,
       '@INPUT@',
     ]
-  )
+  )]
 
   foreach gir : test_gir_files
     test_typelibs += custom_target('generate-typelib-@0@'.format(gir).underscorify(),
       input: gir,
       output: '@BASENAME@.typelib',
       depends: [gobject_gir, ],
-      command: [gircompiler, '-o', '@OUTPUT@', '@INPUT@',
+      command: [test_gircompiler, '-o', '@OUTPUT@', '@INPUT@',
                 '--includedir', join_paths(build_root, 'gir'),
                 '--includedir', meson.current_build_dir()
       ],
@@ -183,6 +189,10 @@ if glib_dep.type_name() == 'pkgconfig'
 endif
 
 subdir('offsets')
-subdir('warn')
+if get_option('build_introspection_data') == true
+  subdir('warn')
+endif
 subdir('scanner')
-subdir('repository')
+if get_option('build_introspection_data') == true
+  subdir('repository')
+endif
index 71f4c8a..970e54c 100644 (file)
@@ -18,14 +18,13 @@ if glib_dep.type_name() == 'pkgconfig'
     output: 'Offsets-1.0.gir',
     depends: [test_offsets_lib] + typelibs,
     command: [
-      python,
-      girscanner,
+      test_girscanner,
       '--quiet',
       '--output=@OUTPUT@',
       '--no-libtool',
       '--reparse-validate',
-      '--add-include-path', join_paths(meson.source_root(), 'gir'),
-      '--add-include-path', join_paths(meson.build_root(), 'gir'),
+      '--add-include-path', join_paths(source_root, 'gir'),
+      '--add-include-path', join_paths(build_root, 'gir'),
       '--warn-all',
       '--warn-error',
       '--namespace=Offsets',
@@ -34,7 +33,7 @@ if glib_dep.type_name() == 'pkgconfig'
       '--library=offsets-1.0',
       '-L', meson.current_build_dir(),
       '-I', meson.current_source_dir(),
-      '-I', join_paths(meson.source_root(), 'tests'),
+      '-I', join_paths(source_root, 'tests'),
       extra_giscanner_args,
       '@INPUT@',
     ]
@@ -45,8 +44,8 @@ if glib_dep.type_name() == 'pkgconfig'
     input: test_offsets_gir,
     output: '@BASENAME@.typelib',
     depends: [gobject_gir, ],
-    command: [gircompiler, '-o', '@OUTPUT@', '@INPUT@',
-              '--includedir', join_paths(meson.build_root(), 'gir'),
+    command: [test_gircompiler, '-o', '@OUTPUT@', '@INPUT@',
+              '--includedir', join_paths(build_root, 'gir'),
               '--includedir', meson.current_build_dir()
     ],
   )
@@ -58,10 +57,10 @@ if glib_dep.type_name() == 'pkgconfig'
   )
 
   test_offsets_env = environment()
-  test_offsets_env.set('top_builddir', join_paths(meson.build_root(), 'gir'))
+  test_offsets_env.set('top_builddir', join_paths(build_root, 'gir'))
   test_offsets_env.set('builddir', meson.current_build_dir())
   if host_system == 'windows'
-    test_offsets_env.prepend('PATH', join_paths(meson.build_root(), 'girepository'))
+    test_offsets_env.prepend('PATH', join_paths(build_root, 'girepository'))
   endif
 
   test('test_offsets.py',
index abe30d9..d8b9ec1 100644 (file)
@@ -32,6 +32,7 @@ test_constructor_return_type(GIBaseInfo* object_info)
 
   return_name = g_registered_type_info_get_type_name ((GIRegisteredTypeInfo*) return_info);
   g_assert (strcmp (class_name, return_name) == 0);
+  g_base_info_unref ((GIBaseInfo*)return_info);
 }
 
 static void
diff --git a/tests/scanner/Regress-1.0-C-expected/Regress.TestObj.get_string.page b/tests/scanner/Regress-1.0-C-expected/Regress.TestObj.get_string.page
new file mode 100644 (file)
index 0000000..d4160bf
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<page id="Regress.TestObj.get_string"
+      type="topic"
+      style="method"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:api="http://projectmallard.org/experimental/api/"
+      xmlns:ui="http://projectmallard.org/1.0/ui/">
+  <info>
+    <link xref="Regress.TestObj" group="method" type="guide"/>
+    <api:function>
+      <api:returns>
+        <api:type>const char*</api:type>
+      </api:returns>
+      <api:name>regress_test_obj_get_string</api:name>
+      <api:arg>
+        <api:type>RegressTestObj*</api:type>
+        <api:name>obj</api:name>
+      </api:arg>
+    </api:function>
+  </info>
+  <title>regress_test_obj_get_string</title>
+  <synopsis><code mime="text/x-csrc">
+const char* regress_test_obj_get_string (RegressTestObj* obj);
+  </code></synopsis>
+
+
+<terms>
+<item>
+<title><code>obj</code></title>
+
+</item>
+<item>
+<title><code>Returns</code></title>
+
+</item>
+</terms>
+
+</page>
diff --git a/tests/scanner/Regress-1.0-C-expected/Regress.TestObj.set_string.page b/tests/scanner/Regress-1.0-C-expected/Regress.TestObj.set_string.page
new file mode 100644 (file)
index 0000000..62b3657
--- /dev/null
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<page id="Regress.TestObj.set_string"
+      type="topic"
+      style="method"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:api="http://projectmallard.org/experimental/api/"
+      xmlns:ui="http://projectmallard.org/1.0/ui/">
+  <info>
+    <link xref="Regress.TestObj" group="method" type="guide"/>
+    <api:function>
+      <api:returns>
+        <api:type>void</api:type>
+      </api:returns>
+      <api:name>regress_test_obj_set_string</api:name>
+      <api:arg>
+        <api:type>RegressTestObj*</api:type>
+        <api:name>obj</api:name>
+      </api:arg>
+      <api:arg>
+        <api:type>const char*</api:type>
+        <api:name>str</api:name>
+      </api:arg>
+    </api:function>
+  </info>
+  <title>regress_test_obj_set_string</title>
+  <synopsis><code mime="text/x-csrc">
+void regress_test_obj_set_string (RegressTestObj* obj,
+                                  const char* str);
+  </code></synopsis>
+
+
+<terms>
+<item>
+<title><code>obj</code></title>
+
+</item>
+<item>
+<title><code>str</code></title>
+
+</item>
+<item>
+<title><code>Returns</code></title>
+
+</item>
+</terms>
+
+</page>
diff --git a/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestObj.get_string.page b/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestObj.get_string.page
new file mode 100644 (file)
index 0000000..3154a66
--- /dev/null
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<page id="Regress.TestObj.get_string"
+      type="topic"
+      style="method"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:api="http://projectmallard.org/experimental/api/"
+      xmlns:ui="http://projectmallard.org/1.0/ui/">
+  <info>
+    <link xref="Regress.TestObj" group="method" type="guide"/>
+    <api:function>
+      <api:returns>
+        <api:type>String</api:type>
+      </api:returns>
+      <api:name>regress_test_obj_get_string</api:name>
+    </api:function>
+  </info>
+  <title>Regress.TestObj.prototype.get_string</title>
+  <synopsis><code mime="text/x-gjs">
+function get_string(): String {
+    // Gjs wrapper for regress_test_obj_get_string()
+}
+  </code></synopsis>
+
+
+<terms>
+<item>
+<title><code>Returns</code></title>
+
+</item>
+</terms>
+
+</page>
diff --git a/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestObj.set_string.page b/tests/scanner/Regress-1.0-Gjs-expected/Regress.TestObj.set_string.page
new file mode 100644 (file)
index 0000000..6d063c6
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<page id="Regress.TestObj.set_string"
+      type="topic"
+      style="method"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:api="http://projectmallard.org/experimental/api/"
+      xmlns:ui="http://projectmallard.org/1.0/ui/">
+  <info>
+    <link xref="Regress.TestObj" group="method" type="guide"/>
+    <api:function>
+      <api:returns>
+        <api:type>void</api:type>
+      </api:returns>
+      <api:name>regress_test_obj_set_string</api:name>
+      <api:arg>
+        <api:type>String</api:type>
+        <api:name>str</api:name>
+      </api:arg>
+    </api:function>
+  </info>
+  <title>Regress.TestObj.prototype.set_string</title>
+  <synopsis><code mime="text/x-gjs">
+function set_string(str: String): void {
+    // Gjs wrapper for regress_test_obj_set_string()
+}
+  </code></synopsis>
+
+
+<terms>
+<item>
+<title><code>str</code></title>
+
+</item>
+</terms>
+
+</page>
diff --git a/tests/scanner/Regress-1.0-Python-expected/Regress.TestObj.get_string.page b/tests/scanner/Regress-1.0-Python-expected/Regress.TestObj.get_string.page
new file mode 100644 (file)
index 0000000..b5e2270
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<page id="Regress.TestObj.get_string"
+      type="topic"
+      style="method"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:api="http://projectmallard.org/experimental/api/"
+      xmlns:ui="http://projectmallard.org/1.0/ui/">
+  <info>
+    <link xref="Regress.TestObj" group="method" type="guide"/>
+    <api:function>
+      <api:returns>
+        <api:type>unicode</api:type>
+      </api:returns>
+      <api:name>regress_test_obj_get_string</api:name>
+      <api:arg>
+        <api:type>Regress.TestObj</api:type>
+        <api:name>self</api:name>
+      </api:arg>
+    </api:function>
+  </info>
+  <title>Regress.TestObj.get_string</title>
+  <synopsis><code mime="text/x-python">
+@accepts(Regress.TestObj)
+@returns(unicode)
+def get_string(self):
+    # Python wrapper for regress_test_obj_get_string()
+  </code></synopsis>
+
+
+<terms>
+<item>
+<title><code>self</code></title>
+
+</item>
+<item>
+<title><code>Returns</code></title>
+{formatter.format(node, node.retval.doc)}
+</item>
+</terms>
+
+</page>
diff --git a/tests/scanner/Regress-1.0-Python-expected/Regress.TestObj.set_string.page b/tests/scanner/Regress-1.0-Python-expected/Regress.TestObj.set_string.page
new file mode 100644 (file)
index 0000000..b48972f
--- /dev/null
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<page id="Regress.TestObj.set_string"
+      type="topic"
+      style="method"
+      xmlns="http://projectmallard.org/1.0/"
+      xmlns:api="http://projectmallard.org/experimental/api/"
+      xmlns:ui="http://projectmallard.org/1.0/ui/">
+  <info>
+    <link xref="Regress.TestObj" group="method" type="guide"/>
+    <api:function>
+      <api:returns>
+        <api:type>none</api:type>
+      </api:returns>
+      <api:name>regress_test_obj_set_string</api:name>
+      <api:arg>
+        <api:type>Regress.TestObj</api:type>
+        <api:name>self</api:name>
+      </api:arg>
+      <api:arg>
+        <api:type>unicode</api:type>
+        <api:name>str</api:name>
+      </api:arg>
+    </api:function>
+  </info>
+  <title>Regress.TestObj.set_string</title>
+  <synopsis><code mime="text/x-python">
+@accepts(Regress.TestObj, unicode)
+@returns(none)
+def set_string(self, str):
+    # Python wrapper for regress_test_obj_set_string()
+  </code></synopsis>
+
+
+<terms>
+<item>
+<title><code>self</code></title>
+
+</item>
+<item>
+<title><code>str</code></title>
+
+</item>
+</terms>
+
+</page>
index c5044d9..65a6a83 100644 (file)
@@ -18,8 +18,8 @@ and/or use gtk-doc annotations.  -->
     <alias name="AliasedTestBoxed" c:type="RegressAliasedTestBoxed">
       <doc xml:space="preserve"
            filename="regress.h"
-           line="1388">Typedef TestBoxed to test caller-allocates correctness</doc>
-      <source-position filename="regress.h" line="1393"/>
+           line="1394">Typedef TestBoxed to test caller-allocates correctness</doc>
+      <source-position filename="regress.h" line="1399"/>
       <type name="TestBoxed" c:type="RegressTestBoxed"/>
     </alias>
     <alias name="FooObjectCookie" c:type="RegressFooObjectCookie">
@@ -33,15 +33,15 @@ and/or use gtk-doc annotations.  -->
     <alias name="IntsetAlias" c:type="RegressIntsetAlias" introspectable="0">
       <doc xml:space="preserve"
            filename="regress.h"
-           line="1358">Compatibility typedef, like telepathy-glib's TpIntSet</doc>
-      <source-position filename="regress.h" line="1364"/>
+           line="1364">Compatibility typedef, like telepathy-glib's TpIntSet</doc>
+      <source-position filename="regress.h" line="1370"/>
       <type name="Intset" c:type="RegressIntset"/>
     </alias>
     <alias name="PtrArrayAlias" c:type="RegressPtrArrayAlias">
       <doc xml:space="preserve"
            filename="regress.h"
-           line="1366">Typedef'd GPtrArray for some reason</doc>
-      <source-position filename="regress.h" line="1371"/>
+           line="1372">Typedef'd GPtrArray for some reason</doc>
+      <source-position filename="regress.h" line="1377"/>
       <type name="GLib.PtrArray" c:type="GPtrArray"/>
     </alias>
     <alias name="TestTypeGUInt64" c:type="RegressTestTypeGUInt64">
@@ -51,8 +51,8 @@ and/or use gtk-doc annotations.  -->
     <alias name="VaListAlias" c:type="RegressVaListAlias" introspectable="0">
       <doc xml:space="preserve"
            filename="regress.h"
-           line="1377">Typedef'd va_list for additional reasons</doc>
-      <source-position filename="regress.h" line="1382"/>
+           line="1383">Typedef'd va_list for additional reasons</doc>
+      <source-position filename="regress.h" line="1388"/>
       <type name="va_list" c:type="va_list"/>
     </alias>
     <constant name="ANNOTATION_CALCULATED_DEFINE"
@@ -92,12 +92,12 @@ and/or use gtk-doc annotations.  -->
       </member>
     </enumeration>
     <record name="AnAnonymousUnion" c:type="RegressAnAnonymousUnion">
-      <source-position filename="regress.h" line="1494"/>
+      <source-position filename="regress.h" line="1500"/>
       <field name="x" writable="1">
         <type name="gint" c:type="int"/>
       </field>
       <union>
-        <source-position filename="regress.h" line="1493"/>
+        <source-position filename="regress.h" line="1499"/>
         <field name="a" writable="1">
           <array zero-terminated="0" fixed-size="2">
             <type name="LikeGnomeKeyringPasswordSchema"
@@ -1225,14 +1225,14 @@ it says it's pointer but it's actually a string.</doc>
     </record>
     <record name="AnonymousUnionAndStruct"
             c:type="RegressAnonymousUnionAndStruct">
-      <source-position filename="regress.h" line="1507"/>
+      <source-position filename="regress.h" line="1513"/>
       <field name="x" writable="1">
         <type name="gint" c:type="int"/>
       </field>
       <union>
-        <source-position filename="regress.h" line="1506"/>
+        <source-position filename="regress.h" line="1512"/>
         <record>
-          <source-position filename="regress.h" line="1503"/>
+          <source-position filename="regress.h" line="1509"/>
           <field name="a" writable="1">
             <type name="LikeGnomeKeyringPasswordSchema"
                   c:type="RegressLikeGnomeKeyringPasswordSchema*"/>
@@ -1623,17 +1623,20 @@ it says it's pointer but it's actually a string.</doc>
       <member name="alpha"
               value="0"
               c:identifier="REGRESS_FOO_ENUM_ALPHA"
-              glib:nick="alpha">
+              glib:nick="alpha"
+              glib:name="REGRESS_FOO_ENUM_ALPHA">
       </member>
       <member name="beta"
               value="1"
               c:identifier="REGRESS_FOO_ENUM_BETA"
-              glib:nick="beta">
+              glib:nick="beta"
+              glib:name="REGRESS_FOO_ENUM_BETA">
       </member>
       <member name="delta"
               value="2"
               c:identifier="REGRESS_FOO_ENUM_DELTA"
-              glib:nick="delta">
+              glib:nick="delta"
+              glib:name="REGRESS_FOO_ENUM_DELTA">
       </member>
       <function name="method" c:identifier="regress_foo_enum_type_method">
         <source-position filename="foo.h" line="236"/>
@@ -1666,17 +1669,20 @@ it says it's pointer but it's actually a string.</doc>
       <member name="good"
               value="0"
               c:identifier="REGRESS_FOO_ERROR_GOOD"
-              glib:nick="good">
+              glib:nick="good"
+              glib:name="REGRESS_FOO_ERROR_GOOD">
       </member>
       <member name="bad"
               value="1"
               c:identifier="REGRESS_FOO_ERROR_BAD"
-              glib:nick="bad">
+              glib:nick="bad"
+              glib:name="REGRESS_FOO_ERROR_BAD">
       </member>
       <member name="ugly"
               value="2"
               c:identifier="REGRESS_FOO_ERROR_UGLY"
-              glib:nick="ugly">
+              glib:nick="ugly"
+              glib:name="REGRESS_FOO_ERROR_UGLY">
       </member>
       <function name="quark" c:identifier="regress_foo_error_quark">
         <return-value transfer-ownership="none">
@@ -1727,17 +1733,20 @@ it says it's pointer but it's actually a string.</doc>
       <member name="first"
               value="1"
               c:identifier="REGRESS_FOO_FLAGS_FIRST"
-              glib:nick="first">
+              glib:nick="first"
+              glib:name="REGRESS_FOO_FLAGS_FIRST">
       </member>
       <member name="second"
               value="2"
               c:identifier="REGRESS_FOO_FLAGS_SECOND"
-              glib:nick="second">
+              glib:nick="second"
+              glib:name="REGRESS_FOO_FLAGS_SECOND">
       </member>
       <member name="third"
               value="4"
               c:identifier="REGRESS_FOO_FLAGS_THIRD"
-              glib:nick="third">
+              glib:nick="third"
+              glib:name="REGRESS_FOO_FLAGS_THIRD">
       </member>
     </bitfield>
     <record name="FooForeignStruct"
@@ -2593,13 +2602,13 @@ exposed to language bindings.</doc>
     <constant name="GI_SCANNER_ELSE"
               value="3"
               c:type="REGRESS_GI_SCANNER_ELSE">
-      <source-position filename="regress.h" line="1471"/>
+      <source-position filename="regress.h" line="1477"/>
       <type name="gint" c:type="gint"/>
     </constant>
     <constant name="GI_SCANNER_IFDEF"
               value="3"
               c:type="REGRESS_GI_SCANNER_IFDEF">
-      <source-position filename="regress.h" line="1475"/>
+      <source-position filename="regress.h" line="1481"/>
       <type name="gint" c:type="gint"/>
     </constant>
     <constant name="GUINT64_CONSTANT"
@@ -2627,18 +2636,18 @@ exposed to language bindings.</doc>
     <record name="Intset" c:type="RegressIntset" disguised="1">
       <doc xml:space="preserve"
            filename="regress.h"
-           line="1350">Like telepathy-glib's TpIntset.</doc>
-      <source-position filename="regress.h" line="1356"/>
+           line="1356">Like telepathy-glib's TpIntset.</doc>
+      <source-position filename="regress.h" line="1362"/>
     </record>
     <constant name="LONG_STRING_CONSTANT"
               value="TYPE,VALUE,ENCODING,CHARSET,LANGUAGE,DOM,INTL,POSTAL,PARCEL,HOME,WORK,PREF,VOICE,FAX,MSG,CELL,PAGER,BBS,MODEM,CAR,ISDN,VIDEO,AOL,APPLELINK,ATTMAIL,CIS,EWORLD,INTERNET,IBMMAIL,MCIMAIL,POWERSHARE,PRODIGY,TLX,X400,GIF,CGM,WMF,BMP,MET,PMB,DIB,PICT,TIFF,PDF,PS,JPEG,QTIME,MPEG,MPEG2,AVI,WAVE,AIFF,PCM,X509,PGP"
               c:type="REGRESS_LONG_STRING_CONSTANT">
-      <source-position filename="regress.h" line="1442"/>
+      <source-position filename="regress.h" line="1448"/>
       <type name="utf8" c:type="gchar*"/>
     </constant>
     <record name="LikeGnomeKeyringPasswordSchema"
             c:type="RegressLikeGnomeKeyringPasswordSchema">
-      <source-position filename="regress.h" line="1461"/>
+      <source-position filename="regress.h" line="1467"/>
       <field name="dummy" writable="1">
         <type name="gint" c:type="int"/>
       </field>
@@ -2652,7 +2661,7 @@ exposed to language bindings.</doc>
       </field>
     </record>
     <record name="LikeXklConfigItem" c:type="RegressLikeXklConfigItem">
-      <source-position filename="regress.h" line="1428"/>
+      <source-position filename="regress.h" line="1434"/>
       <field name="name" writable="1">
         <array zero-terminated="0" fixed-size="32">
           <type name="gchar" c:type="gchar"/>
@@ -2660,7 +2669,7 @@ exposed to language bindings.</doc>
       </field>
       <method name="set_name"
               c:identifier="regress_like_xkl_config_item_set_name">
-        <source-position filename="regress.h" line="1432"/>
+        <source-position filename="regress.h" line="1438"/>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
@@ -2677,13 +2686,13 @@ exposed to language bindings.</doc>
     <constant name="MAXUINT64"
               value="18446744073709551615"
               c:type="REGRESS_MAXUINT64">
-      <source-position filename="regress.h" line="1465"/>
+      <source-position filename="regress.h" line="1471"/>
       <type name="guint64" c:type="guint64"/>
     </constant>
     <constant name="MININT64"
               value="-9223372036854775808"
               c:type="REGRESS_MININT64">
-      <source-position filename="regress.h" line="1464"/>
+      <source-position filename="regress.h" line="1470"/>
       <type name="gint64" c:type="gint64"/>
     </constant>
     <constant name="Mixed_Case_Constant"
@@ -2709,9 +2718,9 @@ exposed to language bindings.</doc>
             introspectable="0">
       <doc xml:space="preserve"
            filename="regress.h"
-           line="1332">This should be skipped, and moreover, all function which
+           line="1338">This should be skipped, and moreover, all function which
 use it should be.</doc>
-      <source-position filename="regress.h" line="1342"/>
+      <source-position filename="regress.h" line="1348"/>
       <field name="x" writable="1">
         <type name="gint" c:type="int"/>
       </field>
@@ -2722,7 +2731,7 @@ use it should be.</doc>
     <function-macro name="TEST_FLOATING"
                     c:identifier="REGRESS_TEST_FLOATING"
                     introspectable="0">
-      <source-position filename="regress.h" line="1260"/>
+      <source-position filename="regress.h" line="1266"/>
       <parameters>
         <parameter name="object">
         </parameter>
@@ -2731,7 +2740,7 @@ use it should be.</doc>
     <function-macro name="TEST_FLOATING_GET_CLASS"
                     c:identifier="REGRESS_TEST_FLOATING_GET_CLASS"
                     introspectable="0">
-      <source-position filename="regress.h" line="1262"/>
+      <source-position filename="regress.h" line="1268"/>
       <parameters>
         <parameter name="obj">
         </parameter>
@@ -2740,7 +2749,7 @@ use it should be.</doc>
     <function-macro name="TEST_FUNDAMENTAL_OBJECT"
                     c:identifier="REGRESS_TEST_FUNDAMENTAL_OBJECT"
                     introspectable="0">
-      <source-position filename="regress.h" line="1014"/>
+      <source-position filename="regress.h" line="1020"/>
       <parameters>
         <parameter name="obj">
         </parameter>
@@ -2749,7 +2758,7 @@ use it should be.</doc>
     <function-macro name="TEST_FUNDAMENTAL_OBJECT_CAST"
                     c:identifier="REGRESS_TEST_FUNDAMENTAL_OBJECT_CAST"
                     introspectable="0">
-      <source-position filename="regress.h" line="1016"/>
+      <source-position filename="regress.h" line="1022"/>
       <parameters>
         <parameter name="obj">
         </parameter>
@@ -2758,7 +2767,7 @@ use it should be.</doc>
     <function-macro name="TEST_FUNDAMENTAL_OBJECT_CLASS"
                     c:identifier="REGRESS_TEST_FUNDAMENTAL_OBJECT_CLASS"
                     introspectable="0">
-      <source-position filename="regress.h" line="1015"/>
+      <source-position filename="regress.h" line="1021"/>
       <parameters>
         <parameter name="klass">
         </parameter>
@@ -2767,7 +2776,7 @@ use it should be.</doc>
     <function-macro name="TEST_FUNDAMENTAL_OBJECT_GET_CLASS"
                     c:identifier="REGRESS_TEST_FUNDAMENTAL_OBJECT_GET_CLASS"
                     introspectable="0">
-      <source-position filename="regress.h" line="1013"/>
+      <source-position filename="regress.h" line="1019"/>
       <parameters>
         <parameter name="obj">
         </parameter>
@@ -2776,7 +2785,7 @@ use it should be.</doc>
     <function-macro name="TEST_GNUC_EXTENSION_STMT"
                     c:identifier="REGRESS_TEST_GNUC_EXTENSION_STMT"
                     introspectable="0">
-      <source-position filename="regress.h" line="1438"/>
+      <source-position filename="regress.h" line="1444"/>
       <parameters>
         <parameter name="foo">
         </parameter>
@@ -2785,7 +2794,7 @@ use it should be.</doc>
     <function-macro name="TEST_INTERFACE"
                     c:identifier="REGRESS_TEST_INTERFACE"
                     introspectable="0">
-      <source-position filename="regress.h" line="1208"/>
+      <source-position filename="regress.h" line="1214"/>
       <parameters>
         <parameter name="object">
         </parameter>
@@ -2794,7 +2803,7 @@ use it should be.</doc>
     <function-macro name="TEST_INTERFACE_GET_IFACE"
                     c:identifier="REGRESS_TEST_INTERFACE_GET_IFACE"
                     introspectable="0">
-      <source-position filename="regress.h" line="1210"/>
+      <source-position filename="regress.h" line="1216"/>
       <parameters>
         <parameter name="obj">
         </parameter>
@@ -2803,7 +2812,7 @@ use it should be.</doc>
     <function-macro name="TEST_IS_FLOATING"
                     c:identifier="REGRESS_TEST_IS_FLOATING"
                     introspectable="0">
-      <source-position filename="regress.h" line="1261"/>
+      <source-position filename="regress.h" line="1267"/>
       <parameters>
         <parameter name="object">
         </parameter>
@@ -2812,7 +2821,7 @@ use it should be.</doc>
     <function-macro name="TEST_IS_FUNDAMENTAL_OBJECT"
                     c:identifier="REGRESS_TEST_IS_FUNDAMENTAL_OBJECT"
                     introspectable="0">
-      <source-position filename="regress.h" line="1011"/>
+      <source-position filename="regress.h" line="1017"/>
       <parameters>
         <parameter name="obj">
         </parameter>
@@ -2821,7 +2830,7 @@ use it should be.</doc>
     <function-macro name="TEST_IS_FUNDAMENTAL_OBJECT_CLASS"
                     c:identifier="REGRESS_TEST_IS_FUNDAMENTAL_OBJECT_CLASS"
                     introspectable="0">
-      <source-position filename="regress.h" line="1012"/>
+      <source-position filename="regress.h" line="1018"/>
       <parameters>
         <parameter name="klass">
         </parameter>
@@ -2830,7 +2839,7 @@ use it should be.</doc>
     <function-macro name="TEST_IS_INTERFACE"
                     c:identifier="REGRESS_TEST_IS_INTERFACE"
                     introspectable="0">
-      <source-position filename="regress.h" line="1209"/>
+      <source-position filename="regress.h" line="1215"/>
       <parameters>
         <parameter name="object">
         </parameter>
@@ -2848,7 +2857,7 @@ use it should be.</doc>
     <function-macro name="TEST_IS_SUB_OBJECT"
                     c:identifier="REGRESS_TEST_IS_SUB_OBJECT"
                     introspectable="0">
-      <source-position filename="regress.h" line="977"/>
+      <source-position filename="regress.h" line="983"/>
       <parameters>
         <parameter name="object">
         </parameter>
@@ -2857,7 +2866,7 @@ use it should be.</doc>
     <function-macro name="TEST_IS_WI_802_1X"
                     c:identifier="REGRESS_TEST_IS_WI_802_1X"
                     introspectable="0">
-      <source-position filename="regress.h" line="1227"/>
+      <source-position filename="regress.h" line="1233"/>
       <parameters>
         <parameter name="object">
         </parameter>
@@ -2884,7 +2893,7 @@ use it should be.</doc>
     <function-macro name="TEST_SUB_OBJECT"
                     c:identifier="REGRESS_TEST_SUB_OBJECT"
                     introspectable="0">
-      <source-position filename="regress.h" line="976"/>
+      <source-position filename="regress.h" line="982"/>
       <parameters>
         <parameter name="object">
         </parameter>
@@ -2893,7 +2902,7 @@ use it should be.</doc>
     <function-macro name="TEST_SUB_OBJ_GET_CLASS"
                     c:identifier="REGRESS_TEST_SUB_OBJ_GET_CLASS"
                     introspectable="0">
-      <source-position filename="regress.h" line="978"/>
+      <source-position filename="regress.h" line="984"/>
       <parameters>
         <parameter name="obj">
         </parameter>
@@ -2902,7 +2911,7 @@ use it should be.</doc>
     <function-macro name="TEST_VALUE_HOLDS_FUNDAMENTAL_OBJECT"
                     c:identifier="REGRESS_TEST_VALUE_HOLDS_FUNDAMENTAL_OBJECT"
                     introspectable="0">
-      <source-position filename="regress.h" line="1051"/>
+      <source-position filename="regress.h" line="1057"/>
       <parameters>
         <parameter name="value">
         </parameter>
@@ -2911,7 +2920,7 @@ use it should be.</doc>
     <function-macro name="TEST_WI_802_1X"
                     c:identifier="REGRESS_TEST_WI_802_1X"
                     introspectable="0">
-      <source-position filename="regress.h" line="1226"/>
+      <source-position filename="regress.h" line="1232"/>
       <parameters>
         <parameter name="object">
         </parameter>
@@ -2920,7 +2929,7 @@ use it should be.</doc>
     <function-macro name="TEST_WI_802_1X_GET_CLASS"
                     c:identifier="REGRESS_TEST_WI_802_1X_GET_CLASS"
                     introspectable="0">
-      <source-position filename="regress.h" line="1228"/>
+      <source-position filename="regress.h" line="1234"/>
       <parameters>
         <parameter name="obj">
         </parameter>
@@ -2934,17 +2943,20 @@ use it should be.</doc>
       <member name="code1"
               value="1"
               c:identifier="REGRESS_TEST_ABC_ERROR_CODE1"
-              glib:nick="code1">
+              glib:nick="code1"
+              glib:name="REGRESS_TEST_ABC_ERROR_CODE1">
       </member>
       <member name="code2"
               value="2"
               c:identifier="REGRESS_TEST_ABC_ERROR_CODE2"
-              glib:nick="code2">
+              glib:nick="code2"
+              glib:name="REGRESS_TEST_ABC_ERROR_CODE2">
       </member>
       <member name="code3"
               value="3"
               c:identifier="REGRESS_TEST_ABC_ERROR_CODE3"
-              glib:nick="code3">
+              glib:nick="code3"
+              glib:name="REGRESS_TEST_ABC_ERROR_CODE3">
       </member>
       <function name="quark" c:identifier="regress_test_abc_error_quark">
         <return-value transfer-ownership="none">
@@ -3168,13 +3180,13 @@ use it should be.</doc>
       <source-position filename="regress.h" line="666"/>
     </record>
     <callback name="TestCallback" c:type="RegressTestCallback">
-      <source-position filename="regress.h" line="1088"/>
+      <source-position filename="regress.h" line="1094"/>
       <return-value transfer-ownership="none">
         <type name="gint" c:type="int"/>
       </return-value>
     </callback>
     <callback name="TestCallbackArray" c:type="RegressTestCallbackArray">
-      <source-position filename="regress.h" line="1120"/>
+      <source-position filename="regress.h" line="1126"/>
       <return-value transfer-ownership="none">
         <type name="gint" c:type="int"/>
       </return-value>
@@ -3199,7 +3211,7 @@ use it should be.</doc>
     </callback>
     <callback name="TestCallbackArrayInOut"
               c:type="RegressTestCallbackArrayInOut">
-      <source-position filename="regress.h" line="1126"/>
+      <source-position filename="regress.h" line="1132"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -3221,7 +3233,7 @@ use it should be.</doc>
       </parameters>
     </callback>
     <callback name="TestCallbackFull" c:type="RegressTestCallbackFull">
-      <source-position filename="regress.h" line="1107"/>
+      <source-position filename="regress.h" line="1113"/>
       <return-value transfer-ownership="none">
         <type name="gint" c:type="int"/>
       </return-value>
@@ -3229,25 +3241,25 @@ use it should be.</doc>
         <parameter name="foo" transfer-ownership="none">
           <doc xml:space="preserve"
                filename="regress.h"
-               line="1103">the investment rate</doc>
+               line="1109">the investment rate</doc>
           <type name="gint" c:type="int"/>
         </parameter>
         <parameter name="bar" transfer-ownership="none">
           <doc xml:space="preserve"
                filename="regress.h"
-               line="1104">how much money</doc>
+               line="1110">how much money</doc>
           <type name="gdouble" c:type="double"/>
         </parameter>
         <parameter name="path" transfer-ownership="none">
           <doc xml:space="preserve"
                filename="regress.h"
-               line="1105">Path to file</doc>
+               line="1111">Path to file</doc>
           <type name="filename" c:type="char*"/>
         </parameter>
       </parameters>
     </callback>
     <callback name="TestCallbackGError" c:type="RegressTestCallbackGError">
-      <source-position filename="regress.h" line="1095"/>
+      <source-position filename="regress.h" line="1101"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -3259,7 +3271,7 @@ use it should be.</doc>
     </callback>
     <callback name="TestCallbackHashtable"
               c:type="RegressTestCallbackHashtable">
-      <source-position filename="regress.h" line="1094"/>
+      <source-position filename="regress.h" line="1100"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -3267,7 +3279,7 @@ use it should be.</doc>
         <parameter name="data" transfer-ownership="none">
           <doc xml:space="preserve"
                filename="regress.h"
-               line="1092">a hash table; will be modified</doc>
+               line="1098">a hash table; will be modified</doc>
           <type name="GLib.HashTable" c:type="GHashTable*">
             <type name="utf8"/>
             <type name="gint"/>
@@ -3277,7 +3289,7 @@ use it should be.</doc>
     </callback>
     <callback name="TestCallbackOwnedGError"
               c:type="RegressTestCallbackOwnedGError">
-      <source-position filename="regress.h" line="1100"/>
+      <source-position filename="regress.h" line="1106"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -3285,20 +3297,20 @@ use it should be.</doc>
         <parameter name="error" transfer-ownership="full">
           <doc xml:space="preserve"
                filename="regress.h"
-               line="1098">GError instance; must be freed by the callback</doc>
+               line="1104">GError instance; must be freed by the callback</doc>
           <type name="GLib.Error" c:type="GError*"/>
         </parameter>
       </parameters>
     </callback>
     <callback name="TestCallbackReturnFull"
               c:type="RegressTestCallbackReturnFull">
-      <source-position filename="regress.h" line="1112"/>
+      <source-position filename="regress.h" line="1118"/>
       <return-value transfer-ownership="full">
         <type name="TestObj" c:type="RegressTestObj*"/>
       </return-value>
     </callback>
     <callback name="TestCallbackUserData" c:type="RegressTestCallbackUserData">
-      <source-position filename="regress.h" line="1089"/>
+      <source-position filename="regress.h" line="1095"/>
       <return-value transfer-ownership="none">
         <type name="gint" c:type="int"/>
       </return-value>
@@ -3339,29 +3351,34 @@ use it should be.</doc>
       <member name="value1"
               value="0"
               c:identifier="REGRESS_TEST_VALUE1"
-              glib:nick="value1">
+              glib:nick="value1"
+              glib:name="REGRESS_TEST_VALUE1">
         <doc xml:space="preserve" filename="regress.h" line="370">value 1</doc>
       </member>
       <member name="value2"
               value="1"
               c:identifier="REGRESS_TEST_VALUE2"
-              glib:nick="value2">
+              glib:nick="value2"
+              glib:name="REGRESS_TEST_VALUE2">
         <doc xml:space="preserve" filename="regress.h" line="371">value 2</doc>
       </member>
       <member name="value3"
               value="-1"
               c:identifier="REGRESS_TEST_VALUE3"
-              glib:nick="value3">
+              glib:nick="value3"
+              glib:name="REGRESS_TEST_VALUE3">
       </member>
       <member name="value4"
               value="48"
               c:identifier="REGRESS_TEST_VALUE4"
-              glib:nick="value4">
+              glib:nick="value4"
+              glib:name="REGRESS_TEST_VALUE4">
       </member>
       <member name="value5"
               value="49"
               c:identifier="REGRESS_TEST_VALUE5"
-              glib:nick="value5">
+              glib:nick="value5"
+              glib:name="REGRESS_TEST_VALUE5">
       </member>
       <function name="param" c:identifier="regress_test_enum_param">
         <source-position filename="regress.h" line="435"/>
@@ -3391,12 +3408,14 @@ use it should be.</doc>
       <member name="value1"
               value="1"
               c:identifier="REGRESS_TEST_UNSIGNED_VALUE1"
-              glib:nick="value1">
+              glib:nick="value1"
+              glib:name="REGRESS_TEST_UNSIGNED_VALUE1">
       </member>
       <member name="value2"
               value="2147483648"
               c:identifier="REGRESS_TEST_UNSIGNED_VALUE2"
-              glib:nick="value2">
+              glib:nick="value2"
+              glib:name="REGRESS_TEST_UNSIGNED_VALUE2">
       </member>
     </enumeration>
     <enumeration name="TestError"
@@ -3407,17 +3426,20 @@ use it should be.</doc>
       <member name="code1"
               value="1"
               c:identifier="REGRESS_TEST_ERROR_CODE1"
-              glib:nick="code1">
+              glib:nick="code1"
+              glib:name="REGRESS_TEST_ERROR_CODE1">
       </member>
       <member name="code2"
               value="2"
               c:identifier="REGRESS_TEST_ERROR_CODE2"
-              glib:nick="code2">
+              glib:nick="code2"
+              glib:name="REGRESS_TEST_ERROR_CODE2">
       </member>
       <member name="code3"
               value="3"
               c:identifier="REGRESS_TEST_ERROR_CODE3"
-              glib:nick="code3">
+              glib:nick="code3"
+              glib:name="REGRESS_TEST_ERROR_CODE3">
       </member>
       <function name="quark" c:identifier="regress_test_error_quark">
         <return-value transfer-ownership="none">
@@ -3446,18 +3468,21 @@ use it should be.</doc>
               c:type="RegressTestFlags">
       <member name="flag1"
               value="1"
-              c:identifier="TEST_FLAG1"
-              glib:nick="flag1">
+              c:identifier="REGRESS_TEST_FLAG1"
+              glib:nick="flag1"
+              glib:name="TEST_FLAG1">
       </member>
       <member name="flag2"
               value="2"
-              c:identifier="TEST_FLAG2"
-              glib:nick="flag2">
+              c:identifier="REGRESS_TEST_FLAG2"
+              glib:nick="flag2"
+              glib:name="TEST_FLAG2">
       </member>
       <member name="flag3"
               value="4"
-              c:identifier="TEST_FLAG3"
-              glib:nick="flag3">
+              c:identifier="REGRESS_TEST_FLAG3"
+              glib:nick="flag3"
+              glib:name="TEST_FLAG3">
       </member>
     </bitfield>
     <class name="TestFloating"
@@ -3467,13 +3492,13 @@ use it should be.</doc>
            glib:type-name="RegressTestFloating"
            glib:get-type="regress_test_floating_get_type"
            glib:type-struct="TestFloatingClass">
-      <source-position filename="regress.h" line="1272"/>
+      <source-position filename="regress.h" line="1278"/>
       <constructor name="new" c:identifier="regress_test_floating_new">
-        <source-position filename="regress.h" line="1279"/>
+        <source-position filename="regress.h" line="1285"/>
         <return-value transfer-ownership="none">
           <doc xml:space="preserve"
                filename="regress.c"
-               line="4283">A new floating #RegressTestFloating</doc>
+               line="4311">A new floating #RegressTestFloating</doc>
           <type name="TestFloating" c:type="RegressTestFloating*"/>
         </return-value>
       </constructor>
@@ -3484,7 +3509,7 @@ use it should be.</doc>
     <record name="TestFloatingClass"
             c:type="RegressTestFloatingClass"
             glib:is-gtype-struct-for="TestFloating">
-      <source-position filename="regress.h" line="1272"/>
+      <source-position filename="regress.h" line="1278"/>
       <field name="parent_class">
         <type name="GObject.InitiallyUnownedClass"
               c:type="GInitiallyUnownedClass"/>
@@ -3502,9 +3527,9 @@ use it should be.</doc>
            glib:unref-func="regress_test_fundamental_object_unref"
            glib:set-value-func="regress_test_value_set_fundamental_object"
            glib:get-value-func="regress_test_value_get_fundamental_object">
-      <source-position filename="regress.h" line="1040"/>
+      <source-position filename="regress.h" line="1046"/>
       <virtual-method name="copy">
-        <source-position filename="regress.h" line="1025"/>
+        <source-position filename="regress.h" line="1031"/>
         <return-value transfer-ownership="full">
           <type name="TestFundamentalObject"
                 c:type="RegressTestFundamentalObject*"/>
@@ -3517,7 +3542,7 @@ use it should be.</doc>
         </parameters>
       </virtual-method>
       <virtual-method name="finalize">
-        <source-position filename="regress.h" line="1026"/>
+        <source-position filename="regress.h" line="1032"/>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
@@ -3529,11 +3554,11 @@ use it should be.</doc>
         </parameters>
       </virtual-method>
       <method name="ref" c:identifier="regress_test_fundamental_object_ref">
-        <source-position filename="regress.h" line="1046"/>
+        <source-position filename="regress.h" line="1052"/>
         <return-value transfer-ownership="full">
           <doc xml:space="preserve"
                filename="regress.c"
-               line="3400">A new #RegressTestFundamentalObject</doc>
+               line="3428">A new #RegressTestFundamentalObject</doc>
           <type name="TestFundamentalObject"
                 c:type="RegressTestFundamentalObject*"/>
         </return-value>
@@ -3547,7 +3572,7 @@ use it should be.</doc>
       </method>
       <method name="unref"
               c:identifier="regress_test_fundamental_object_unref">
-        <source-position filename="regress.h" line="1049"/>
+        <source-position filename="regress.h" line="1055"/>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
@@ -3572,7 +3597,7 @@ use it should be.</doc>
     <record name="TestFundamentalObjectClass"
             c:type="RegressTestFundamentalObjectClass"
             glib:is-gtype-struct-for="TestFundamentalObject">
-      <source-position filename="regress.h" line="1040"/>
+      <source-position filename="regress.h" line="1046"/>
       <field name="type_class">
         <type name="GObject.TypeClass" c:type="GTypeClass"/>
       </field>
@@ -3587,7 +3612,7 @@ use it should be.</doc>
     </record>
     <callback name="TestFundamentalObjectCopyFunction"
               c:type="RegressTestFundamentalObjectCopyFunction">
-      <source-position filename="regress.h" line="1025"/>
+      <source-position filename="regress.h" line="1031"/>
       <return-value transfer-ownership="full">
         <type name="TestFundamentalObject"
               c:type="RegressTestFundamentalObject*"/>
@@ -3601,7 +3626,7 @@ use it should be.</doc>
     </callback>
     <callback name="TestFundamentalObjectFinalizeFunction"
               c:type="RegressTestFundamentalObjectFinalizeFunction">
-      <source-position filename="regress.h" line="1026"/>
+      <source-position filename="regress.h" line="1032"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -3620,10 +3645,10 @@ use it should be.</doc>
            glib:get-type="regress_test_fundamental_sub_object_get_type"
            glib:type-struct="TestFundamentalSubObjectClass"
            glib:fundamental="1">
-      <source-position filename="regress.h" line="1070"/>
+      <source-position filename="regress.h" line="1076"/>
       <constructor name="new"
                    c:identifier="regress_test_fundamental_sub_object_new">
-        <source-position filename="regress.h" line="1079"/>
+        <source-position filename="regress.h" line="1085"/>
         <return-value transfer-ownership="full">
           <type name="TestFundamentalSubObject"
                 c:type="RegressTestFundamentalSubObject*"/>
@@ -3645,7 +3670,7 @@ use it should be.</doc>
     <record name="TestFundamentalSubObjectClass"
             c:type="RegressTestFundamentalSubObjectClass"
             glib:is-gtype-struct-for="TestFundamentalSubObject">
-      <source-position filename="regress.h" line="1070"/>
+      <source-position filename="regress.h" line="1076"/>
       <field name="fundamental_object_class">
         <type name="TestFundamentalObjectClass"
               c:type="RegressTestFundamentalObjectClass"/>
@@ -3769,10 +3794,10 @@ use it should be.</doc>
                glib:type-name="RegressTestInterface"
                glib:get-type="regress_test_interface_get_type"
                glib:type-struct="TestInterfaceIface">
-      <source-position filename="regress.h" line="1216"/>
+      <source-position filename="regress.h" line="1222"/>
       <method name="emit_signal"
               c:identifier="regress_test_interface_emit_signal">
-        <source-position filename="regress.h" line="1222"/>
+        <source-position filename="regress.h" line="1228"/>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
@@ -3780,7 +3805,7 @@ use it should be.</doc>
           <instance-parameter name="self" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="4142">the object to emit the signal</doc>
+                 line="4170">the object to emit the signal</doc>
             <type name="TestInterface" c:type="RegressTestInterface*"/>
           </instance-parameter>
         </parameters>
@@ -3799,7 +3824,7 @@ use it should be.</doc>
           <parameter name="ptr" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="4123">the code must look up the signal with
+                 line="4151">the code must look up the signal with
   g_interface_info_find_signal() in order to get this to work.</doc>
             <type name="gint" c:type="gpointer"/>
           </parameter>
@@ -3809,13 +3834,13 @@ use it should be.</doc>
     <record name="TestInterfaceIface"
             c:type="RegressTestInterfaceIface"
             glib:is-gtype-struct-for="TestInterface">
-      <source-position filename="regress.h" line="1216"/>
+      <source-position filename="regress.h" line="1222"/>
       <field name="base_iface">
         <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
       </field>
     </record>
     <callback name="TestNoPtrCallback" c:type="RegressTestNoPtrCallback">
-      <source-position filename="regress.h" line="1087"/>
+      <source-position filename="regress.h" line="1093"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -3850,7 +3875,7 @@ use it should be.</doc>
       </constructor>
       <constructor name="new_callback"
                    c:identifier="regress_test_obj_new_callback">
-        <source-position filename="regress.h" line="1184"/>
+        <source-position filename="regress.h" line="1190"/>
         <return-value transfer-ownership="full">
           <type name="TestObj" c:type="RegressTestObj*"/>
         </return-value>
@@ -3888,7 +3913,7 @@ use it should be.</doc>
         </parameters>
       </constructor>
       <function name="null_out" c:identifier="regress_test_obj_null_out">
-        <source-position filename="regress.h" line="960"/>
+        <source-position filename="regress.h" line="966"/>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
@@ -3901,14 +3926,14 @@ use it should be.</doc>
                      allow-none="1">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3219">A #RegressTestObj</doc>
+                 line="3247">A #RegressTestObj</doc>
             <type name="TestObj" c:type="RegressTestObj**"/>
           </parameter>
         </parameters>
       </function>
       <function name="static_method"
                 c:identifier="regress_test_obj_static_method">
-        <source-position filename="regress.h" line="861"/>
+        <source-position filename="regress.h" line="867"/>
         <return-value transfer-ownership="none">
           <type name="gdouble" c:type="double"/>
         </return-value>
@@ -3920,7 +3945,7 @@ use it should be.</doc>
       </function>
       <function name="static_method_callback"
                 c:identifier="regress_test_obj_static_method_callback">
-        <source-position filename="regress.h" line="1181"/>
+        <source-position filename="regress.h" line="1187"/>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
@@ -3971,7 +3996,7 @@ use it should be.</doc>
       <virtual-method name="matrix" invoker="do_matrix">
         <doc xml:space="preserve"
              filename="regress.c"
-             line="3193">This method is virtual.  Notably its name differs from the virtual
+             line="3221">This method is virtual.  Notably its name differs from the virtual
 slot name, which makes it useful for testing bindings handle this
 case.</doc>
         <source-position filename="regress.h" line="797"/>
@@ -3982,13 +4007,13 @@ case.</doc>
           <instance-parameter name="obj" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3195">A #RegressTestObj</doc>
+                 line="3223">A #RegressTestObj</doc>
             <type name="TestObj" c:type="RegressTestObj*"/>
           </instance-parameter>
           <parameter name="somestr" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3196">Meaningless string</doc>
+                 line="3224">Meaningless string</doc>
             <type name="utf8" c:type="const char*"/>
           </parameter>
         </parameters>
@@ -3996,10 +4021,10 @@ case.</doc>
       <method name="do_matrix" c:identifier="regress_test_obj_do_matrix">
         <doc xml:space="preserve"
              filename="regress.c"
-             line="3193">This method is virtual.  Notably its name differs from the virtual
+             line="3221">This method is virtual.  Notably its name differs from the virtual
 slot name, which makes it useful for testing bindings handle this
 case.</doc>
-        <source-position filename="regress.h" line="953"/>
+        <source-position filename="regress.h" line="959"/>
         <return-value transfer-ownership="none">
           <type name="gint" c:type="int"/>
         </return-value>
@@ -4007,20 +4032,20 @@ case.</doc>
           <instance-parameter name="obj" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3195">A #RegressTestObj</doc>
+                 line="3223">A #RegressTestObj</doc>
             <type name="TestObj" c:type="RegressTestObj*"/>
           </instance-parameter>
           <parameter name="somestr" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3196">Meaningless string</doc>
+                 line="3224">Meaningless string</doc>
             <type name="utf8" c:type="const char*"/>
           </parameter>
         </parameters>
       </method>
       <method name="emit_sig_with_array_len_prop"
               c:identifier="regress_test_obj_emit_sig_with_array_len_prop">
-        <source-position filename="regress.h" line="843"/>
+        <source-position filename="regress.h" line="849"/>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
@@ -4032,7 +4057,7 @@ case.</doc>
       </method>
       <method name="emit_sig_with_error"
               c:identifier="regress_test_obj_emit_sig_with_error">
-        <source-position filename="regress.h" line="849"/>
+        <source-position filename="regress.h" line="855"/>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
@@ -4040,14 +4065,14 @@ case.</doc>
           <instance-parameter name="self" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="2914">The object to emit the signal.</doc>
+                 line="2942">The object to emit the signal.</doc>
             <type name="TestObj" c:type="RegressTestObj*"/>
           </instance-parameter>
         </parameters>
       </method>
       <method name="emit_sig_with_foreign_struct"
               c:identifier="regress_test_obj_emit_sig_with_foreign_struct">
-        <source-position filename="regress.h" line="834"/>
+        <source-position filename="regress.h" line="840"/>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
@@ -4061,8 +4086,8 @@ case.</doc>
               c:identifier="regress_test_obj_emit_sig_with_inout_int">
         <doc xml:space="preserve"
              filename="regress.c"
-             line="2898">The signal handler must increment the inout parameter by 1.</doc>
-        <source-position filename="regress.h" line="846"/>
+             line="2926">The signal handler must increment the inout parameter by 1.</doc>
+        <source-position filename="regress.h" line="852"/>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
@@ -4070,14 +4095,14 @@ case.</doc>
           <instance-parameter name="obj" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="2900">The object to emit the signal.</doc>
+                 line="2928">The object to emit the signal.</doc>
             <type name="TestObj" c:type="RegressTestObj*"/>
           </instance-parameter>
         </parameters>
       </method>
       <method name="emit_sig_with_int64"
               c:identifier="regress_test_obj_emit_sig_with_int64">
-        <source-position filename="regress.h" line="837"/>
+        <source-position filename="regress.h" line="843"/>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
@@ -4089,7 +4114,7 @@ case.</doc>
       </method>
       <method name="emit_sig_with_null_error"
               c:identifier="regress_test_obj_emit_sig_with_null_error">
-        <source-position filename="regress.h" line="852"/>
+        <source-position filename="regress.h" line="858"/>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
@@ -4097,14 +4122,14 @@ case.</doc>
           <instance-parameter name="self" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="2927">The object to emit the signal.</doc>
+                 line="2955">The object to emit the signal.</doc>
             <type name="TestObj" c:type="RegressTestObj*"/>
           </instance-parameter>
         </parameters>
       </method>
       <method name="emit_sig_with_obj"
               c:identifier="regress_test_obj_emit_sig_with_obj">
-        <source-position filename="regress.h" line="831"/>
+        <source-position filename="regress.h" line="837"/>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
@@ -4116,7 +4141,7 @@ case.</doc>
       </method>
       <method name="emit_sig_with_uint64"
               c:identifier="regress_test_obj_emit_sig_with_uint64">
-        <source-position filename="regress.h" line="840"/>
+        <source-position filename="regress.h" line="846"/>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
@@ -4127,7 +4152,7 @@ case.</doc>
         </parameters>
       </method>
       <method name="forced_method" c:identifier="regress_forced_method">
-        <source-position filename="regress.h" line="864"/>
+        <source-position filename="regress.h" line="870"/>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
@@ -4135,14 +4160,27 @@ case.</doc>
           <instance-parameter name="obj" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="2960">A #RegressTestObj</doc>
+                 line="2988">A #RegressTestObj</doc>
+            <type name="TestObj" c:type="RegressTestObj*"/>
+          </instance-parameter>
+        </parameters>
+      </method>
+      <method name="get_string"
+              c:identifier="regress_test_obj_get_string"
+              glib:get-property="string">
+        <source-position filename="regress.h" line="834"/>
+        <return-value transfer-ownership="none">
+          <type name="utf8" c:type="const char*"/>
+        </return-value>
+        <parameters>
+          <instance-parameter name="obj" transfer-ownership="none">
             <type name="TestObj" c:type="RegressTestObj*"/>
           </instance-parameter>
         </parameters>
       </method>
       <method name="instance_method"
               c:identifier="regress_test_obj_instance_method">
-        <source-position filename="regress.h" line="855"/>
+        <source-position filename="regress.h" line="861"/>
         <return-value transfer-ownership="none">
           <type name="gint" c:type="int"/>
         </return-value>
@@ -4154,7 +4192,7 @@ case.</doc>
       </method>
       <method name="instance_method_callback"
               c:identifier="regress_test_obj_instance_method_callback">
-        <source-position filename="regress.h" line="1178"/>
+        <source-position filename="regress.h" line="1184"/>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
@@ -4173,7 +4211,7 @@ case.</doc>
       </method>
       <method name="instance_method_full"
               c:identifier="regress_test_obj_instance_method_full">
-        <source-position filename="regress.h" line="858"/>
+        <source-position filename="regress.h" line="864"/>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
@@ -4185,7 +4223,7 @@ case.</doc>
       </method>
       <method name="name_conflict"
               c:identifier="regress_test_obj_name_conflict">
-        <source-position filename="regress.h" line="972"/>
+        <source-position filename="regress.h" line="978"/>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
@@ -4193,14 +4231,14 @@ case.</doc>
           <instance-parameter name="obj" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3263">A #RegressTestObj</doc>
+                 line="3291">A #RegressTestObj</doc>
             <type name="TestObj" c:type="RegressTestObj*"/>
           </instance-parameter>
         </parameters>
       </method>
       <method name="not_nullable_element_typed_gpointer_in"
               c:identifier="regress_test_obj_not_nullable_element_typed_gpointer_in">
-        <source-position filename="regress.h" line="967"/>
+        <source-position filename="regress.h" line="973"/>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
@@ -4208,13 +4246,13 @@ case.</doc>
           <instance-parameter name="obj" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3250">A #RegressTestObj</doc>
+                 line="3278">A #RegressTestObj</doc>
             <type name="TestObj" c:type="RegressTestObj*"/>
           </instance-parameter>
           <parameter name="input" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3251">some uint8 array</doc>
+                 line="3279">some uint8 array</doc>
             <array length="1" zero-terminated="0" c:type="gpointer">
               <type name="guint8"/>
             </array>
@@ -4222,14 +4260,14 @@ case.</doc>
           <parameter name="count" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3252">length of @input</doc>
+                 line="3280">length of @input</doc>
             <type name="guint" c:type="guint"/>
           </parameter>
         </parameters>
       </method>
       <method name="not_nullable_typed_gpointer_in"
               c:identifier="regress_test_obj_not_nullable_typed_gpointer_in">
-        <source-position filename="regress.h" line="964"/>
+        <source-position filename="regress.h" line="970"/>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
@@ -4237,18 +4275,20 @@ case.</doc>
           <instance-parameter name="obj" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3239">A #RegressTestObj</doc>
+                 line="3267">A #RegressTestObj</doc>
             <type name="TestObj" c:type="RegressTestObj*"/>
           </instance-parameter>
           <parameter name="input" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3240">some #GObject</doc>
+                 line="3268">some #GObject</doc>
             <type name="GObject.Object" c:type="gpointer"/>
           </parameter>
         </parameters>
       </method>
-      <method name="set_bare" c:identifier="regress_test_obj_set_bare">
+      <method name="set_bare"
+              c:identifier="regress_test_obj_set_bare"
+              glib:set-property="bare">
         <source-position filename="regress.h" line="828"/>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
@@ -4265,30 +4305,46 @@ case.</doc>
           </parameter>
         </parameters>
       </method>
+      <method name="set_string"
+              c:identifier="regress_test_obj_set_string"
+              glib:set-property="string">
+        <source-position filename="regress.h" line="831"/>
+        <return-value transfer-ownership="none">
+          <type name="none" c:type="void"/>
+        </return-value>
+        <parameters>
+          <instance-parameter name="obj" transfer-ownership="none">
+            <type name="TestObj" c:type="RegressTestObj*"/>
+          </instance-parameter>
+          <parameter name="str" transfer-ownership="none">
+            <type name="utf8" c:type="const char*"/>
+          </parameter>
+        </parameters>
+      </method>
       <method name="skip_inout_param"
               c:identifier="regress_test_obj_skip_inout_param"
               throws="1">
         <doc xml:space="preserve"
              filename="regress.c"
-             line="3157">Check that the out value is skipped</doc>
-        <source-position filename="regress.h" line="941"/>
+             line="3185">Check that the out value is skipped</doc>
+        <source-position filename="regress.h" line="947"/>
         <return-value transfer-ownership="none">
           <doc xml:space="preserve"
                filename="regress.c"
-               line="3171">%TRUE if the call succeeds, %FALSE if @error is set.</doc>
+               line="3199">%TRUE if the call succeeds, %FALSE if @error is set.</doc>
           <type name="gboolean" c:type="gboolean"/>
         </return-value>
         <parameters>
           <instance-parameter name="obj" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3159">A #RegressTestObj.</doc>
+                 line="3187">A #RegressTestObj.</doc>
             <type name="TestObj" c:type="RegressTestObj*"/>
           </instance-parameter>
           <parameter name="a" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3160">Parameter.</doc>
+                 line="3188">Parameter.</doc>
             <type name="gint" c:type="gint"/>
           </parameter>
           <parameter name="out_b"
@@ -4297,13 +4353,13 @@ case.</doc>
                      transfer-ownership="full">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3161">Return value.</doc>
+                 line="3189">Return value.</doc>
             <type name="gint" c:type="gint*"/>
           </parameter>
           <parameter name="c" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3162">Other parameter.</doc>
+                 line="3190">Other parameter.</doc>
             <type name="gdouble" c:type="gdouble"/>
           </parameter>
           <parameter name="inout_d"
@@ -4313,7 +4369,7 @@ case.</doc>
                      skip="1">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3163">Will be incremented.</doc>
+                 line="3191">Will be incremented.</doc>
             <type name="gint" c:type="gint*"/>
           </parameter>
           <parameter name="out_sum"
@@ -4322,19 +4378,19 @@ case.</doc>
                      transfer-ownership="full">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3164">Return value.</doc>
+                 line="3192">Return value.</doc>
             <type name="gint" c:type="gint*"/>
           </parameter>
           <parameter name="num1" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3165">Number.</doc>
+                 line="3193">Number.</doc>
             <type name="gint" c:type="gint"/>
           </parameter>
           <parameter name="num2" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3166">Number.</doc>
+                 line="3194">Number.</doc>
             <type name="gint" c:type="gint"/>
           </parameter>
         </parameters>
@@ -4344,25 +4400,25 @@ case.</doc>
               throws="1">
         <doc xml:space="preserve"
              filename="regress.c"
-             line="3121">Check that the out value is skipped</doc>
-        <source-position filename="regress.h" line="929"/>
+             line="3149">Check that the out value is skipped</doc>
+        <source-position filename="regress.h" line="935"/>
         <return-value transfer-ownership="none">
           <doc xml:space="preserve"
                filename="regress.c"
-               line="3135">%TRUE if the call succeeds, %FALSE if @error is set.</doc>
+               line="3163">%TRUE if the call succeeds, %FALSE if @error is set.</doc>
           <type name="gboolean" c:type="gboolean"/>
         </return-value>
         <parameters>
           <instance-parameter name="obj" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3123">A #RegressTestObj.</doc>
+                 line="3151">A #RegressTestObj.</doc>
             <type name="TestObj" c:type="RegressTestObj*"/>
           </instance-parameter>
           <parameter name="a" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3124">Parameter.</doc>
+                 line="3152">Parameter.</doc>
             <type name="gint" c:type="gint"/>
           </parameter>
           <parameter name="out_b"
@@ -4372,13 +4428,13 @@ case.</doc>
                      skip="1">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3125">Return value.</doc>
+                 line="3153">Return value.</doc>
             <type name="gint" c:type="gint*"/>
           </parameter>
           <parameter name="c" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3126">Other parameter.</doc>
+                 line="3154">Other parameter.</doc>
             <type name="gdouble" c:type="gdouble"/>
           </parameter>
           <parameter name="inout_d"
@@ -4387,7 +4443,7 @@ case.</doc>
                      transfer-ownership="full">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3127">Will be incremented.</doc>
+                 line="3155">Will be incremented.</doc>
             <type name="gint" c:type="gint*"/>
           </parameter>
           <parameter name="out_sum"
@@ -4396,19 +4452,19 @@ case.</doc>
                      transfer-ownership="full">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3128">Return value.</doc>
+                 line="3156">Return value.</doc>
             <type name="gint" c:type="gint*"/>
           </parameter>
           <parameter name="num1" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3129">Number.</doc>
+                 line="3157">Number.</doc>
             <type name="gint" c:type="gint"/>
           </parameter>
           <parameter name="num2" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3130">Number.</doc>
+                 line="3158">Number.</doc>
             <type name="gint" c:type="gint"/>
           </parameter>
         </parameters>
@@ -4418,25 +4474,25 @@ case.</doc>
               throws="1">
         <doc xml:space="preserve"
              filename="regress.c"
-             line="3085">Check that a parameter is skipped</doc>
-        <source-position filename="regress.h" line="917"/>
+             line="3113">Check that a parameter is skipped</doc>
+        <source-position filename="regress.h" line="923"/>
         <return-value transfer-ownership="none">
           <doc xml:space="preserve"
                filename="regress.c"
-               line="3099">%TRUE if the call succeeds, %FALSE if @error is set.</doc>
+               line="3127">%TRUE if the call succeeds, %FALSE if @error is set.</doc>
           <type name="gboolean" c:type="gboolean"/>
         </return-value>
         <parameters>
           <instance-parameter name="obj" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3087">A #RegressTestObj.</doc>
+                 line="3115">A #RegressTestObj.</doc>
             <type name="TestObj" c:type="RegressTestObj*"/>
           </instance-parameter>
           <parameter name="a" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3088">Parameter.</doc>
+                 line="3116">Parameter.</doc>
             <type name="gint" c:type="gint"/>
           </parameter>
           <parameter name="out_b"
@@ -4445,13 +4501,13 @@ case.</doc>
                      transfer-ownership="full">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3089">Return value.</doc>
+                 line="3117">Return value.</doc>
             <type name="gint" c:type="gint*"/>
           </parameter>
           <parameter name="c" transfer-ownership="none" skip="1">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3090">Other parameter.</doc>
+                 line="3118">Other parameter.</doc>
             <type name="gdouble" c:type="gdouble"/>
           </parameter>
           <parameter name="inout_d"
@@ -4460,7 +4516,7 @@ case.</doc>
                      transfer-ownership="full">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3091">Will be incremented.</doc>
+                 line="3119">Will be incremented.</doc>
             <type name="gint" c:type="gint*"/>
           </parameter>
           <parameter name="out_sum"
@@ -4469,19 +4525,19 @@ case.</doc>
                      transfer-ownership="full">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3092">Return value.</doc>
+                 line="3120">Return value.</doc>
             <type name="gint" c:type="gint*"/>
           </parameter>
           <parameter name="num1" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3093">Number.</doc>
+                 line="3121">Number.</doc>
             <type name="gint" c:type="gint"/>
           </parameter>
           <parameter name="num2" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3094">Number.</doc>
+                 line="3122">Number.</doc>
             <type name="gint" c:type="gint"/>
           </parameter>
         </parameters>
@@ -4491,25 +4547,25 @@ case.</doc>
               throws="1">
         <doc xml:space="preserve"
              filename="regress.c"
-             line="3025">Check that the return value is skipped</doc>
-        <source-position filename="regress.h" line="899"/>
+             line="3053">Check that the return value is skipped</doc>
+        <source-position filename="regress.h" line="905"/>
         <return-value transfer-ownership="none" skip="1">
           <doc xml:space="preserve"
                filename="regress.c"
-               line="3039">%TRUE if the call succeeds, %FALSE if @error is set.</doc>
+               line="3067">%TRUE if the call succeeds, %FALSE if @error is set.</doc>
           <type name="gboolean" c:type="gboolean"/>
         </return-value>
         <parameters>
           <instance-parameter name="obj" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3027">a #RegressTestObj</doc>
+                 line="3055">a #RegressTestObj</doc>
             <type name="TestObj" c:type="RegressTestObj*"/>
           </instance-parameter>
           <parameter name="a" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3028">Parameter.</doc>
+                 line="3056">Parameter.</doc>
             <type name="gint" c:type="gint"/>
           </parameter>
           <parameter name="out_b"
@@ -4518,13 +4574,13 @@ case.</doc>
                      transfer-ownership="full">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3029">A return value.</doc>
+                 line="3057">A return value.</doc>
             <type name="gint" c:type="gint*"/>
           </parameter>
           <parameter name="c" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3030">Other parameter.</doc>
+                 line="3058">Other parameter.</doc>
             <type name="gdouble" c:type="gdouble"/>
           </parameter>
           <parameter name="inout_d"
@@ -4533,7 +4589,7 @@ case.</doc>
                      transfer-ownership="full">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3031">Will be incremented.</doc>
+                 line="3059">Will be incremented.</doc>
             <type name="gint" c:type="gint*"/>
           </parameter>
           <parameter name="out_sum"
@@ -4542,19 +4598,19 @@ case.</doc>
                      transfer-ownership="full">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3032">Return value.</doc>
+                 line="3060">Return value.</doc>
             <type name="gint" c:type="gint*"/>
           </parameter>
           <parameter name="num1" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3033">Number.</doc>
+                 line="3061">Number.</doc>
             <type name="gint" c:type="gint"/>
           </parameter>
           <parameter name="num2" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3034">Number.</doc>
+                 line="3062">Number.</doc>
             <type name="gint" c:type="gint"/>
           </parameter>
         </parameters>
@@ -4564,33 +4620,33 @@ case.</doc>
               throws="1">
         <doc xml:space="preserve"
              filename="regress.c"
-             line="3061">Check that the return value is skipped. Succeed if a is nonzero, otherwise
+             line="3089">Check that the return value is skipped. Succeed if a is nonzero, otherwise
 raise an error.</doc>
-        <source-position filename="regress.h" line="911"/>
+        <source-position filename="regress.h" line="917"/>
         <return-value transfer-ownership="none" skip="1">
           <doc xml:space="preserve"
                filename="regress.c"
-               line="3070">%TRUE if the call succeeds, %FALSE if @error is set.</doc>
+               line="3098">%TRUE if the call succeeds, %FALSE if @error is set.</doc>
           <type name="gboolean" c:type="gboolean"/>
         </return-value>
         <parameters>
           <instance-parameter name="obj" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3063">a #RegressTestObj</doc>
+                 line="3091">a #RegressTestObj</doc>
             <type name="TestObj" c:type="RegressTestObj*"/>
           </instance-parameter>
           <parameter name="a" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="3064">Parameter.</doc>
+                 line="3092">Parameter.</doc>
             <type name="gint" c:type="gint"/>
           </parameter>
         </parameters>
       </method>
       <method name="torture_signature_0"
               c:identifier="regress_test_obj_torture_signature_0">
-        <source-position filename="regress.h" line="879"/>
+        <source-position filename="regress.h" line="885"/>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
@@ -4598,7 +4654,7 @@ raise an error.</doc>
           <instance-parameter name="obj" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="2970">A #RegressTestObj</doc>
+                 line="2998">A #RegressTestObj</doc>
             <type name="TestObj" c:type="RegressTestObj*"/>
           </instance-parameter>
           <parameter name="x" transfer-ownership="none">
@@ -4635,8 +4691,8 @@ raise an error.</doc>
               throws="1">
         <doc xml:space="preserve"
              filename="regress.c"
-             line="2993">This function throws an error if m is odd.</doc>
-        <source-position filename="regress.h" line="888"/>
+             line="3021">This function throws an error if m is odd.</doc>
+        <source-position filename="regress.h" line="894"/>
         <return-value transfer-ownership="none">
           <type name="gboolean" c:type="gboolean"/>
         </return-value>
@@ -4644,7 +4700,7 @@ raise an error.</doc>
           <instance-parameter name="obj" transfer-ownership="none">
             <doc xml:space="preserve"
                  filename="regress.c"
-                 line="2995">A #RegressTestObj</doc>
+                 line="3023">A #RegressTestObj</doc>
             <type name="TestObj" c:type="RegressTestObj*"/>
           </instance-parameter>
           <parameter name="x" transfer-ownership="none">
@@ -4676,7 +4732,10 @@ raise an error.</doc>
           </parameter>
         </parameters>
       </method>
-      <property name="bare" writable="1" transfer-ownership="none">
+      <property name="bare"
+                writable="1"
+                transfer-ownership="none"
+                setter="set_bare">
         <type name="GObject.Object"/>
       </property>
       <property name="boxed" writable="1" transfer-ownership="none">
@@ -4737,7 +4796,11 @@ raise an error.</doc>
           <type name="utf8"/>
         </array>
       </property>
-      <property name="string" writable="1" transfer-ownership="none">
+      <property name="string"
+                writable="1"
+                transfer-ownership="none"
+                setter="set_string"
+                getter="get_string">
         <type name="utf8" c:type="gchar*"/>
       </property>
       <property name="write-only"
@@ -5062,13 +5125,13 @@ the introspection client langage.</doc>
             <parameter name="obj" transfer-ownership="none">
               <doc xml:space="preserve"
                    filename="regress.c"
-                   line="3195">A #RegressTestObj</doc>
+                   line="3223">A #RegressTestObj</doc>
               <type name="TestObj" c:type="RegressTestObj*"/>
             </parameter>
             <parameter name="somestr" transfer-ownership="none">
               <doc xml:space="preserve"
                    filename="regress.c"
-                   line="3196">Meaningless string</doc>
+                   line="3224">Meaningless string</doc>
               <type name="utf8" c:type="const char*"/>
             </parameter>
           </parameters>
@@ -5131,17 +5194,20 @@ the introspection client langage.</doc>
       <member name="code1"
               value="1"
               c:identifier="REGRESS_TEST_OTHER_ERROR_CODE1"
-              glib:nick="code1">
+              glib:nick="code1"
+              glib:name="REGRESS_TEST_OTHER_ERROR_CODE1">
       </member>
       <member name="code2"
               value="2"
               c:identifier="REGRESS_TEST_OTHER_ERROR_CODE2"
-              glib:nick="code2">
+              glib:nick="code2"
+              glib:name="REGRESS_TEST_OTHER_ERROR_CODE2">
       </member>
       <member name="code3"
               value="3"
               c:identifier="REGRESS_TEST_OTHER_ERROR_CODE3"
-              glib:nick="code3">
+              glib:nick="code3"
+              glib:name="REGRESS_TEST_OTHER_ERROR_CODE3">
       </member>
       <function name="quark"
                 c:identifier="regress_test_unconventional_error_quark">
@@ -5151,7 +5217,7 @@ the introspection client langage.</doc>
       </function>
     </enumeration>
     <bitfield name="TestPrivateEnum" c:type="RegressTestPrivateEnum">
-      <source-position filename="regress.h" line="1415"/>
+      <source-position filename="regress.h" line="1421"/>
       <member name="public_enum_before"
               value="1"
               c:identifier="REGRESS_TEST_PUBLIC_ENUM_BEFORE">
@@ -5162,7 +5228,7 @@ the introspection client langage.</doc>
       </member>
     </bitfield>
     <record name="TestPrivateStruct" c:type="RegressTestPrivateStruct">
-      <source-position filename="regress.h" line="1407"/>
+      <source-position filename="regress.h" line="1413"/>
       <field name="this_is_public_before" writable="1">
         <type name="gint" c:type="gint"/>
       </field>
@@ -5174,7 +5240,7 @@ the introspection client langage.</doc>
       </field>
     </record>
     <record name="TestReferenceCounters" c:type="RegressTestReferenceCounters">
-      <source-position filename="regress.h" line="1517"/>
+      <source-position filename="regress.h" line="1523"/>
       <field name="refcount" writable="1">
         <type name="gint" c:type="grefcount"/>
       </field>
@@ -5274,7 +5340,7 @@ the introspection client langage.</doc>
       </method>
     </record>
     <callback name="TestSimpleCallback" c:type="RegressTestSimpleCallback">
-      <source-position filename="regress.h" line="1086"/>
+      <source-position filename="regress.h" line="1092"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -5481,7 +5547,7 @@ the introspection client langage.</doc>
       </field>
     </record>
     <record name="TestStructFixedArray" c:type="RegressTestStructFixedArray">
-      <source-position filename="regress.h" line="1420"/>
+      <source-position filename="regress.h" line="1426"/>
       <field name="just_int" writable="1">
         <type name="gint" c:type="gint"/>
       </field>
@@ -5491,7 +5557,7 @@ the introspection client langage.</doc>
         </array>
       </field>
       <method name="frob" c:identifier="regress_test_struct_fixed_array_frob">
-        <source-position filename="regress.h" line="1424"/>
+        <source-position filename="regress.h" line="1430"/>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
@@ -5510,17 +5576,17 @@ the introspection client langage.</doc>
            glib:type-name="RegressTestSubObj"
            glib:get-type="regress_test_sub_obj_get_type"
            glib:type-struct="TestSubObjClass">
-      <source-position filename="regress.h" line="994"/>
+      <source-position filename="regress.h" line="1000"/>
       <implements name="TestInterface"/>
       <constructor name="new" c:identifier="regress_test_sub_obj_new">
-        <source-position filename="regress.h" line="1001"/>
+        <source-position filename="regress.h" line="1007"/>
         <return-value transfer-ownership="full">
           <type name="TestObj" c:type="RegressTestObj*"/>
         </return-value>
       </constructor>
       <method name="instance_method"
               c:identifier="regress_test_sub_obj_instance_method">
-        <source-position filename="regress.h" line="1007"/>
+        <source-position filename="regress.h" line="1013"/>
         <return-value transfer-ownership="none">
           <type name="gint" c:type="int"/>
         </return-value>
@@ -5531,7 +5597,7 @@ the introspection client langage.</doc>
         </parameters>
       </method>
       <method name="unset_bare" c:identifier="regress_test_sub_obj_unset_bare">
-        <source-position filename="regress.h" line="1004"/>
+        <source-position filename="regress.h" line="1010"/>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
@@ -5560,7 +5626,7 @@ the introspection client langage.</doc>
     <record name="TestSubObjClass"
             c:type="RegressTestSubObjClass"
             glib:is-gtype-struct-for="TestSubObj">
-      <source-position filename="regress.h" line="994"/>
+      <source-position filename="regress.h" line="1000"/>
       <field name="parent_class">
         <type name="TestObjClass" c:type="RegressTestObjClass"/>
       </field>
@@ -5572,16 +5638,16 @@ the introspection client langage.</doc>
            glib:type-name="RegressTestWi8021x"
            glib:get-type="regress_test_wi_802_1x_get_type"
            glib:type-struct="TestWi8021xClass">
-      <source-position filename="regress.h" line="1240"/>
+      <source-position filename="regress.h" line="1246"/>
       <constructor name="new" c:identifier="regress_test_wi_802_1x_new">
-        <source-position filename="regress.h" line="1247"/>
+        <source-position filename="regress.h" line="1253"/>
         <return-value transfer-ownership="full">
           <type name="TestWi8021x" c:type="RegressTestWi8021x*"/>
         </return-value>
       </constructor>
       <function name="static_method"
                 c:identifier="regress_test_wi_802_1x_static_method">
-        <source-position filename="regress.h" line="1256"/>
+        <source-position filename="regress.h" line="1262"/>
         <return-value transfer-ownership="none">
           <type name="gint" c:type="int"/>
         </return-value>
@@ -5592,8 +5658,9 @@ the introspection client langage.</doc>
         </parameters>
       </function>
       <method name="get_testbool"
-              c:identifier="regress_test_wi_802_1x_get_testbool">
-        <source-position filename="regress.h" line="1250"/>
+              c:identifier="regress_test_wi_802_1x_get_testbool"
+              glib:get-property="testbool">
+        <source-position filename="regress.h" line="1256"/>
         <return-value transfer-ownership="none">
           <type name="gboolean" c:type="gboolean"/>
         </return-value>
@@ -5604,8 +5671,9 @@ the introspection client langage.</doc>
         </parameters>
       </method>
       <method name="set_testbool"
-              c:identifier="regress_test_wi_802_1x_set_testbool">
-        <source-position filename="regress.h" line="1253"/>
+              c:identifier="regress_test_wi_802_1x_set_testbool"
+              glib:set-property="testbool">
+        <source-position filename="regress.h" line="1259"/>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
@@ -5618,7 +5686,11 @@ the introspection client langage.</doc>
           </parameter>
         </parameters>
       </method>
-      <property name="testbool" writable="1" transfer-ownership="none">
+      <property name="testbool"
+                writable="1"
+                transfer-ownership="none"
+                setter="set_testbool"
+                getter="get_testbool">
         <type name="gboolean" c:type="gboolean"/>
       </property>
       <field name="parent_instance">
@@ -5631,7 +5703,7 @@ the introspection client langage.</doc>
     <record name="TestWi8021xClass"
             c:type="RegressTestWi8021xClass"
             glib:is-gtype-struct-for="TestWi8021x">
-      <source-position filename="regress.h" line="1240"/>
+      <source-position filename="regress.h" line="1246"/>
       <field name="parent_class">
         <type name="GObject.ObjectClass" c:type="GObjectClass"/>
       </field>
@@ -5639,12 +5711,12 @@ the introspection client langage.</doc>
     <constant name="UTF8_CONSTANT"
               value="const ♥ utf8"
               c:type="REGRESS_UTF8_CONSTANT">
-      <source-position filename="regress.h" line="1435"/>
+      <source-position filename="regress.h" line="1441"/>
       <type name="utf8" c:type="gchar*"/>
     </constant>
     <function name="aliased_caller_alloc"
               c:identifier="regress_aliased_caller_alloc">
-      <source-position filename="regress.h" line="1397"/>
+      <source-position filename="regress.h" line="1403"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -6301,7 +6373,7 @@ exposed to language bindings.</doc>
       </parameters>
     </function>
     <function name="func_obj_null_in" c:identifier="regress_func_obj_null_in">
-      <source-position filename="regress.h" line="957"/>
+      <source-position filename="regress.h" line="963"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -6312,14 +6384,14 @@ exposed to language bindings.</doc>
                    allow-none="1">
           <doc xml:space="preserve"
                filename="regress.c"
-               line="3210">A #RegressTestObj</doc>
+               line="3238">A #RegressTestObj</doc>
           <type name="TestObj" c:type="RegressTestObj*"/>
         </parameter>
       </parameters>
     </function>
     <function name="func_obj_nullable_in"
               c:identifier="regress_func_obj_nullable_in">
-      <source-position filename="regress.h" line="962"/>
+      <source-position filename="regress.h" line="968"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -6330,17 +6402,17 @@ exposed to language bindings.</doc>
                    allow-none="1">
           <doc xml:space="preserve"
                filename="regress.c"
-               line="3230">A #RegressTestObj</doc>
+               line="3258">A #RegressTestObj</doc>
           <type name="TestObj" c:type="RegressTestObj*"/>
         </parameter>
       </parameters>
     </function>
     <function name="get_variant" c:identifier="regress_get_variant">
-      <source-position filename="regress.h" line="1510"/>
+      <source-position filename="regress.h" line="1516"/>
       <return-value transfer-ownership="none">
         <doc xml:space="preserve"
              filename="regress.c"
-             line="4559">A new variant</doc>
+             line="4587">A new variant</doc>
         <type name="GLib.Variant" c:type="GVariant*"/>
       </return-value>
     </function>
@@ -6366,9 +6438,9 @@ exposed to language bindings.</doc>
               c:identifier="regress_has_parameter_named_attrs">
       <doc xml:space="preserve"
            filename="regress.c"
-           line="4519">This test case mirrors GnomeKeyringPasswordSchema from
+           line="4547">This test case mirrors GnomeKeyringPasswordSchema from
 libgnome-keyring.</doc>
-      <source-position filename="regress.h" line="1450"/>
+      <source-position filename="regress.h" line="1456"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -6376,13 +6448,13 @@ libgnome-keyring.</doc>
         <parameter name="foo" transfer-ownership="none">
           <doc xml:space="preserve"
                filename="regress.c"
-               line="4521">some int</doc>
+               line="4549">some int</doc>
           <type name="gint" c:type="int"/>
         </parameter>
         <parameter name="attributes" transfer-ownership="none">
           <doc xml:space="preserve"
                filename="regress.c"
-               line="4522">list of attributes</doc>
+               line="4550">list of attributes</doc>
           <array zero-terminated="0" c:type="gpointer" fixed-size="32">
             <type name="guint32" c:type="gpointer"/>
           </array>
@@ -6391,7 +6463,7 @@ libgnome-keyring.</doc>
     </function>
     <function name="introspectable_via_alias"
               c:identifier="regress_introspectable_via_alias">
-      <source-position filename="regress.h" line="1375"/>
+      <source-position filename="regress.h" line="1381"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -6404,7 +6476,7 @@ libgnome-keyring.</doc>
     <function name="not_introspectable_via_alias"
               c:identifier="regress_not_introspectable_via_alias"
               introspectable="0">
-      <source-position filename="regress.h" line="1386"/>
+      <source-position filename="regress.h" line="1392"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -6417,7 +6489,7 @@ libgnome-keyring.</doc>
     <function name="random_function_with_skipped_structure"
               c:identifier="regress_random_function_with_skipped_structure"
               introspectable="0">
-      <source-position filename="regress.h" line="1346"/>
+      <source-position filename="regress.h" line="1352"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -6460,7 +6532,7 @@ in particular, but it should be serialized in the gir nevertheless.</doc>
     </function>
     <function name="test_array_callback"
               c:identifier="regress_test_array_callback">
-      <source-position filename="regress.h" line="1141"/>
+      <source-position filename="regress.h" line="1147"/>
       <return-value transfer-ownership="none">
         <type name="gint" c:type="int"/>
       </return-value>
@@ -6472,7 +6544,7 @@ in particular, but it should be serialized in the gir nevertheless.</doc>
     </function>
     <function name="test_array_fixed_out_objects"
               c:identifier="regress_test_array_fixed_out_objects">
-      <source-position filename="regress.h" line="868"/>
+      <source-position filename="regress.h" line="874"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -6483,7 +6555,7 @@ in particular, but it should be serialized in the gir nevertheless.</doc>
                    transfer-ownership="full">
           <doc xml:space="preserve"
                filename="regress.c"
-               line="3272">An array of #RegressTestObj</doc>
+               line="3300">An array of #RegressTestObj</doc>
           <array zero-terminated="0" c:type="RegressTestObj***" fixed-size="2">
             <type name="TestObj" c:type="RegressTestObj**"/>
           </array>
@@ -6647,7 +6719,7 @@ in particular, but it should be serialized in the gir nevertheless.</doc>
     </function>
     <function name="test_array_inout_callback"
               c:identifier="regress_test_array_inout_callback">
-      <source-position filename="regress.h" line="1144"/>
+      <source-position filename="regress.h" line="1150"/>
       <return-value transfer-ownership="none">
         <type name="gint" c:type="int"/>
       </return-value>
@@ -6835,7 +6907,7 @@ in particular, but it should be serialized in the gir nevertheless.</doc>
     </function>
     <function name="test_array_static_in_int"
               c:identifier="regress_test_array_static_in_int">
-      <source-position filename="regress.h" line="876"/>
+      <source-position filename="regress.h" line="882"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -6854,12 +6926,12 @@ in particular, but it should be serialized in the gir nevertheless.</doc>
               c:identifier="regress_test_array_struct_in_full">
       <doc xml:space="preserve"
            filename="regress.c"
-           line="4651">Test flat array input with transfer full.
+           line="4679">Test flat array input with transfer full.
 
 Similar to:
 - gsf_property_settings_free() with structs but they contain pointers
 - g_byte_array_new_take() with guint8s</doc>
-      <source-position filename="regress.h" line="1532"/>
+      <source-position filename="regress.h" line="1538"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -6867,7 +6939,7 @@ Similar to:
         <parameter name="arr" transfer-ownership="full">
           <doc xml:space="preserve"
                filename="regress.c"
-               line="4653">An array</doc>
+               line="4681">An array</doc>
           <array length="1" zero-terminated="0" c:type="RegressTestStructA*">
             <type name="TestStructA" c:type="RegressTestStructA"/>
           </array>
@@ -6875,7 +6947,7 @@ Similar to:
         <parameter name="len" transfer-ownership="none">
           <doc xml:space="preserve"
                filename="regress.c"
-               line="4654">Length of @arr</doc>
+               line="4682">Length of @arr</doc>
           <type name="gsize" c:type="gsize"/>
         </parameter>
       </parameters>
@@ -6884,10 +6956,10 @@ Similar to:
               c:identifier="regress_test_array_struct_in_none">
       <doc xml:space="preserve"
            filename="regress.c"
-           line="4671">Test flat array input with transfer none.
+           line="4699">Test flat array input with transfer none.
 
 Similar to g_main_context_check() or gtk_target_list_new().</doc>
-      <source-position filename="regress.h" line="1535"/>
+      <source-position filename="regress.h" line="1541"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -6895,7 +6967,7 @@ Similar to g_main_context_check() or gtk_target_list_new().</doc>
         <parameter name="arr" transfer-ownership="none">
           <doc xml:space="preserve"
                filename="regress.c"
-               line="4673">An array.</doc>
+               line="4701">An array.</doc>
           <array length="1" zero-terminated="0" c:type="RegressTestStructA*">
             <type name="TestStructA" c:type="RegressTestStructA"/>
           </array>
@@ -6903,7 +6975,7 @@ Similar to g_main_context_check() or gtk_target_list_new().</doc>
         <parameter name="len" transfer-ownership="none">
           <doc xml:space="preserve"
                filename="regress.c"
-               line="4674">Length of @arr</doc>
+               line="4702">Length of @arr</doc>
           <type name="gsize" c:type="gsize"/>
         </parameter>
       </parameters>
@@ -6938,10 +7010,10 @@ Similar to g_main_context_check() or gtk_target_list_new().</doc>
               c:identifier="regress_test_array_struct_out_caller_alloc">
       <doc xml:space="preserve"
            filename="regress.c"
-           line="4630">Test flat caller-allocated array output.
+           line="4658">Test flat caller-allocated array output.
 
 Similar to g_main_context_query().</doc>
-      <source-position filename="regress.h" line="1529"/>
+      <source-position filename="regress.h" line="1535"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -6952,7 +7024,7 @@ Similar to g_main_context_query().</doc>
                    transfer-ownership="none">
           <doc xml:space="preserve"
                filename="regress.c"
-               line="4632">An array</doc>
+               line="4660">An array</doc>
           <array length="1" zero-terminated="0" c:type="RegressTestStructA*">
             <type name="TestStructA" c:type="RegressTestStructA"/>
           </array>
@@ -6963,7 +7035,7 @@ Similar to g_main_context_query().</doc>
                    transfer-ownership="full">
           <doc xml:space="preserve"
                filename="regress.c"
-               line="4633">Length of @arr</doc>
+               line="4661">Length of @arr</doc>
           <type name="gsize" c:type="gsize"/>
         </parameter>
       </parameters>
@@ -6972,10 +7044,10 @@ Similar to g_main_context_query().</doc>
               c:identifier="regress_test_array_struct_out_container">
       <doc xml:space="preserve"
            filename="regress.c"
-           line="4592">Test flat array output with transfer container.
+           line="4620">Test flat array output with transfer container.
 
 Similar to pango_layout_get_log_attrs().</doc>
-      <source-position filename="regress.h" line="1523"/>
+      <source-position filename="regress.h" line="1529"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -6986,7 +7058,7 @@ Similar to pango_layout_get_log_attrs().</doc>
                    transfer-ownership="container">
           <doc xml:space="preserve"
                filename="regress.c"
-               line="4594">An array</doc>
+               line="4622">An array</doc>
           <array length="1" zero-terminated="0" c:type="RegressTestStructA**">
             <type name="TestStructA" c:type="RegressTestStructA*"/>
           </array>
@@ -6997,7 +7069,7 @@ Similar to pango_layout_get_log_attrs().</doc>
                    transfer-ownership="full">
           <doc xml:space="preserve"
                filename="regress.c"
-               line="4595">Length of @arr</doc>
+               line="4623">Length of @arr</doc>
           <type name="gsize" c:type="gsize*"/>
         </parameter>
       </parameters>
@@ -7006,8 +7078,8 @@ Similar to pango_layout_get_log_attrs().</doc>
               c:identifier="regress_test_array_struct_out_full_fixed">
       <doc xml:space="preserve"
            filename="regress.c"
-           line="4614">Test flat fixed-size array output with transfer full.</doc>
-      <source-position filename="regress.h" line="1526"/>
+           line="4642">Test flat fixed-size array output with transfer full.</doc>
+      <source-position filename="regress.h" line="1532"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -7018,7 +7090,7 @@ Similar to pango_layout_get_log_attrs().</doc>
                    transfer-ownership="full">
           <doc xml:space="preserve"
                filename="regress.c"
-               line="4616">An array</doc>
+               line="4644">An array</doc>
           <array zero-terminated="0"
                  c:type="RegressTestStructA**"
                  fixed-size="4">
@@ -7031,13 +7103,13 @@ Similar to pango_layout_get_log_attrs().</doc>
               c:identifier="regress_test_array_struct_out_none">
       <doc xml:space="preserve"
            filename="regress.c"
-           line="4567">Test flat array output with transfer none.
+           line="4595">Test flat array output with transfer none.
 
 Similar to:
 - mm_modem_peek_ports() with structs
 - gdk_query_visual_types() with enums
 - gdk_event_get_axes() with doubles</doc>
-      <source-position filename="regress.h" line="1520"/>
+      <source-position filename="regress.h" line="1526"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -7048,7 +7120,7 @@ Similar to:
                    transfer-ownership="none">
           <doc xml:space="preserve"
                filename="regress.c"
-               line="4569">An array</doc>
+               line="4597">An array</doc>
           <array length="1" zero-terminated="0" c:type="RegressTestStructA**">
             <type name="TestStructA" c:type="RegressTestStructA*"/>
           </array>
@@ -7059,14 +7131,14 @@ Similar to:
                    transfer-ownership="full">
           <doc xml:space="preserve"
                filename="regress.c"
-               line="4570">Length of @arr</doc>
+               line="4598">Length of @arr</doc>
           <type name="gsize" c:type="gsize*"/>
         </parameter>
       </parameters>
     </function>
     <function name="test_async_ready_callback"
               c:identifier="regress_test_async_ready_callback">
-      <source-position filename="regress.h" line="1174"/>
+      <source-position filename="regress.h" line="1180"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -7195,7 +7267,7 @@ Similar to:
       </return-value>
     </function>
     <function name="test_callback" c:identifier="regress_test_callback">
-      <source-position filename="regress.h" line="1135"/>
+      <source-position filename="regress.h" line="1141"/>
       <return-value transfer-ownership="none">
         <type name="gint" c:type="int"/>
       </return-value>
@@ -7211,7 +7283,7 @@ Similar to:
     </function>
     <function name="test_callback_async"
               c:identifier="regress_test_callback_async">
-      <source-position filename="regress.h" line="1167"/>
+      <source-position filename="regress.h" line="1173"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -7235,9 +7307,9 @@ Similar to:
               c:identifier="regress_test_callback_destroy_notify">
       <doc xml:space="preserve"
            filename="regress.c"
-           line="3873">Notified - callback persists until a DestroyNotify delegate
+           line="3901">Notified - callback persists until a DestroyNotify delegate
 is invoked.</doc>
-      <source-position filename="regress.h" line="1154"/>
+      <source-position filename="regress.h" line="1160"/>
       <return-value transfer-ownership="none">
         <type name="gint" c:type="int"/>
       </return-value>
@@ -7265,9 +7337,9 @@ is invoked.</doc>
               c:identifier="regress_test_callback_destroy_notify_no_user_data">
       <doc xml:space="preserve"
            filename="regress.c"
-           line="3900">Adds a scope notified callback with no user data. This can invoke an error
+           line="3928">Adds a scope notified callback with no user data. This can invoke an error
 condition in bindings which needs to be tested.</doc>
-      <source-position filename="regress.h" line="1159"/>
+      <source-position filename="regress.h" line="1165"/>
       <return-value transfer-ownership="none">
         <type name="gint" c:type="int"/>
       </return-value>
@@ -7286,7 +7358,7 @@ condition in bindings which needs to be tested.</doc>
     </function>
     <function name="test_callback_return_full"
               c:identifier="regress_test_callback_return_full">
-      <source-position filename="regress.h" line="1151"/>
+      <source-position filename="regress.h" line="1157"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -7299,7 +7371,7 @@ condition in bindings which needs to be tested.</doc>
     </function>
     <function name="test_callback_thaw_async"
               c:identifier="regress_test_callback_thaw_async">
-      <source-position filename="regress.h" line="1170"/>
+      <source-position filename="regress.h" line="1176"/>
       <return-value transfer-ownership="none">
         <type name="gint" c:type="int"/>
       </return-value>
@@ -7308,14 +7380,14 @@ condition in bindings which needs to be tested.</doc>
               c:identifier="regress_test_callback_thaw_notifications">
       <doc xml:space="preserve"
            filename="regress.c"
-           line="3914">Invokes all callbacks installed by #test_callback_destroy_notify(),
+           line="3942">Invokes all callbacks installed by #test_callback_destroy_notify(),
 adding up their return values, and removes them, invoking the
 corresponding destroy notfications.</doc>
-      <source-position filename="regress.h" line="1163"/>
+      <source-position filename="regress.h" line="1169"/>
       <return-value transfer-ownership="none">
         <doc xml:space="preserve"
              filename="regress.c"
-             line="3921">Sum of the return values of the invoked callbacks.</doc>
+             line="3949">Sum of the return values of the invoked callbacks.</doc>
         <type name="gint" c:type="int"/>
       </return-value>
     </function>
@@ -7323,9 +7395,9 @@ corresponding destroy notfications.</doc>
               c:identifier="regress_test_callback_user_data">
       <doc xml:space="preserve"
            filename="regress.c"
-           line="3842">Call - callback parameter persists for the duration of the method
+           line="3870">Call - callback parameter persists for the duration of the method
 call and can be released on return.</doc>
-      <source-position filename="regress.h" line="1147"/>
+      <source-position filename="regress.h" line="1153"/>
       <return-value transfer-ownership="none">
         <type name="gint" c:type="int"/>
       </return-value>
@@ -7397,7 +7469,7 @@ call and can be released on return.</doc>
     </function>
     <function name="test_create_fundamental_hidden_class_instance"
               c:identifier="regress_test_create_fundamental_hidden_class_instance">
-      <source-position filename="regress.h" line="1083"/>
+      <source-position filename="regress.h" line="1089"/>
       <return-value transfer-ownership="full">
         <type name="TestFundamentalObject"
               c:type="RegressTestFundamentalObject*"/>
@@ -7405,7 +7477,7 @@ call and can be released on return.</doc>
     </function>
     <function name="test_date_in_gvalue"
               c:identifier="regress_test_date_in_gvalue">
-      <source-position filename="regress.h" line="1313"/>
+      <source-position filename="regress.h" line="1319"/>
       <return-value transfer-ownership="full">
         <type name="GObject.Value" c:type="GValue*"/>
       </return-value>
@@ -7490,7 +7562,7 @@ call and can be released on return.</doc>
     </function>
     <function name="test_gerror_callback"
               c:identifier="regress_test_gerror_callback">
-      <source-position filename="regress.h" line="1192"/>
+      <source-position filename="regress.h" line="1198"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -7953,7 +8025,7 @@ element-type annotation.</doc>
     </function>
     <function name="test_hash_table_callback"
               c:identifier="regress_test_hash_table_callback">
-      <source-position filename="regress.h" line="1189"/>
+      <source-position filename="regress.h" line="1195"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -7961,7 +8033,7 @@ element-type annotation.</doc>
         <parameter name="data" transfer-ownership="none">
           <doc xml:space="preserve"
                filename="regress.c"
-               line="4045">GHashTable that gets passed to callback</doc>
+               line="4073">GHashTable that gets passed to callback</doc>
           <type name="GLib.HashTable" c:type="GHashTable*">
             <type name="utf8"/>
             <type name="gint"/>
@@ -8071,7 +8143,7 @@ element-type annotation.</doc>
     </function>
     <function name="test_multi_callback"
               c:identifier="regress_test_multi_callback">
-      <source-position filename="regress.h" line="1138"/>
+      <source-position filename="regress.h" line="1144"/>
       <return-value transfer-ownership="none">
         <type name="gint" c:type="int"/>
       </return-value>
@@ -8113,14 +8185,14 @@ element-type annotation.</doc>
               c:identifier="regress_test_multiline_doc_comments">
       <doc xml:space="preserve"
            filename="regress.c"
-           line="4427">This is a function.
+           line="4455">This is a function.
 
 It has multiple lines in the documentation.
 
 The sky is blue.
 
 You will give me your credit card number.</doc>
-      <source-position filename="regress.h" line="1327"/>
+      <source-position filename="regress.h" line="1333"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -8129,7 +8201,7 @@ You will give me your credit card number.</doc>
               c:identifier="regress_test_nested_parameter">
       <doc xml:space="preserve"
            filename="regress.c"
-           line="4443">&lt;informaltable&gt;
+           line="4471">&lt;informaltable&gt;
   &lt;tgroup cols="3"&gt;
     &lt;thead&gt;
       &lt;row&gt;
@@ -8157,7 +8229,7 @@ rgb(20%, 30%, 0%)&lt;/literallayout&gt;&lt;/entry&gt;
 &lt;/informaltable&gt;
 
 What we're testing here is that the scanner ignores the @a nested inside XML.</doc>
-      <source-position filename="regress.h" line="1330"/>
+      <source-position filename="regress.h" line="1336"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -8165,14 +8237,14 @@ What we're testing here is that the scanner ignores the @a nested inside XML.</d
         <parameter name="a" transfer-ownership="none">
           <doc xml:space="preserve"
                filename="regress.c"
-               line="4445">An integer</doc>
+               line="4473">An integer</doc>
           <type name="gint" c:type="int"/>
         </parameter>
       </parameters>
     </function>
     <function name="test_noptr_callback"
               c:identifier="regress_test_noptr_callback">
-      <source-position filename="regress.h" line="1132"/>
+      <source-position filename="regress.h" line="1138"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -8188,7 +8260,7 @@ What we're testing here is that the scanner ignores the @a nested inside XML.</d
     </function>
     <function name="test_null_gerror_callback"
               c:identifier="regress_test_null_gerror_callback">
-      <source-position filename="regress.h" line="1195"/>
+      <source-position filename="regress.h" line="1201"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -8200,14 +8272,14 @@ What we're testing here is that the scanner ignores the @a nested inside XML.</d
     </function>
     <function name="test_null_strv_in_gvalue"
               c:identifier="regress_test_null_strv_in_gvalue">
-      <source-position filename="regress.h" line="1319"/>
+      <source-position filename="regress.h" line="1325"/>
       <return-value transfer-ownership="full">
         <type name="GObject.Value" c:type="GValue*"/>
       </return-value>
     </function>
     <function name="test_owned_gerror_callback"
               c:identifier="regress_test_owned_gerror_callback">
-      <source-position filename="regress.h" line="1198"/>
+      <source-position filename="regress.h" line="1204"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -8253,7 +8325,7 @@ What we're testing here is that the scanner ignores the @a nested inside XML.</d
     </function>
     <function name="test_simple_callback"
               c:identifier="regress_test_simple_callback">
-      <source-position filename="regress.h" line="1129"/>
+      <source-position filename="regress.h" line="1135"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -8283,9 +8355,9 @@ What we're testing here is that the scanner ignores the @a nested inside XML.</d
               introspectable="0">
       <doc xml:space="preserve"
            filename="regress.c"
-           line="4095">Should not emit a warning:
+           line="4123">Should not emit a warning:
 https://bugzilla.gnome.org/show_bug.cgi?id=685399</doc>
-      <source-position filename="regress.h" line="1202"/>
+      <source-position filename="regress.h" line="1208"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -8293,7 +8365,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=685399</doc>
         <parameter name="callback" transfer-ownership="none">
           <doc xml:space="preserve"
                filename="regress.c"
-               line="4097">No annotation here</doc>
+               line="4125">No annotation here</doc>
           <type name="TestCallback" c:type="RegressTestCallback"/>
         </parameter>
       </parameters>
@@ -8349,7 +8421,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=685399</doc>
     </function>
     <function name="test_strv_in_gvalue"
               c:identifier="regress_test_strv_in_gvalue">
-      <source-position filename="regress.h" line="1316"/>
+      <source-position filename="regress.h" line="1322"/>
       <return-value transfer-ownership="full">
         <type name="GObject.Value" c:type="GValue*"/>
       </return-value>
@@ -8408,7 +8480,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=685399</doc>
     </function>
     <function name="test_torture_signature_0"
               c:identifier="regress_test_torture_signature_0">
-      <source-position filename="regress.h" line="1284"/>
+      <source-position filename="regress.h" line="1290"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -8447,8 +8519,8 @@ https://bugzilla.gnome.org/show_bug.cgi?id=685399</doc>
               throws="1">
       <doc xml:space="preserve"
            filename="regress.c"
-           line="4315">This function throws an error if m is odd.</doc>
-      <source-position filename="regress.h" line="1292"/>
+           line="4343">This function throws an error if m is odd.</doc>
+      <source-position filename="regress.h" line="1298"/>
       <return-value transfer-ownership="none">
         <type name="gboolean" c:type="gboolean"/>
       </return-value>
@@ -8484,7 +8556,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=685399</doc>
     </function>
     <function name="test_torture_signature_2"
               c:identifier="regress_test_torture_signature_2">
-      <source-position filename="regress.h" line="1301"/>
+      <source-position filename="regress.h" line="1307"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
@@ -8785,7 +8857,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=685399</doc>
     <function name="test_value_get_fundamental_object"
               c:identifier="regress_test_value_get_fundamental_object"
               introspectable="0">
-      <source-position filename="regress.h" line="1057"/>
+      <source-position filename="regress.h" line="1063"/>
       <return-value>
         <type name="TestFundamentalObject"
               c:type="RegressTestFundamentalObject*"/>
@@ -8817,7 +8889,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=685399</doc>
     <function name="test_value_set_fundamental_object"
               c:identifier="regress_test_value_set_fundamental_object"
               introspectable="0">
-      <source-position filename="regress.h" line="1054"/>
+      <source-position filename="regress.h" line="1060"/>
       <return-value transfer-ownership="none">
         <type name="none" c:type="void"/>
       </return-value>
index a5d8f64..36cb4c6 100644 (file)
@@ -355,6 +355,7 @@ regress_test_obj_emit_sig_with_null_error
 regress_test_obj_emit_sig_with_obj
 regress_test_obj_emit_sig_with_uint64
 regress_forced_method
+regress_test_obj_get_string
 regress_test_obj_instance_method
 regress_test_obj_instance_method_callback
 regress_test_obj_instance_method_full
@@ -362,6 +363,7 @@ regress_test_obj_name_conflict
 regress_test_obj_not_nullable_element_typed_gpointer_in
 regress_test_obj_not_nullable_typed_gpointer_in
 regress_test_obj_set_bare
+regress_test_obj_set_string
 regress_test_obj_skip_inout_param
 regress_test_obj_skip_out_param
 regress_test_obj_skip_param
index fa7f7ec..5176b95 100644 (file)
@@ -105,19 +105,19 @@ regress_lib = shared_library('regress-1.0',
 python_path = run_command(python, ['-c', 'import sys; sys.stdout.write(sys.executable)']).stdout()
 
 gircompiler_command = [
-  gircompiler, '-o', '@OUTPUT@', '@INPUT@',
+  test_gircompiler, '-o', '@OUTPUT@', '@INPUT@',
   '--includedir', join_paths(build_root, 'gir'),
   '--includedir', meson.current_build_dir(),
 ]
 
-if glib_dep.type_name() == 'pkgconfig'
+if (glib_dep.type_name() == 'pkgconfig' and
+    get_option('build_introspection_data') == true)
   typedef_gir = custom_target('gir-typedef',
     input: ['typedefs.c', 'typedefs.h'],
     output: 'Typedefs-1.0.gir',
     depends: [typedef_lib] + typelibs,
     command: [
-      python,
-      girscanner,
+      test_girscanner,
       '--quiet',
       '--output=@OUTPUT@',
       '--no-libtool',
@@ -156,8 +156,7 @@ if glib_dep.type_name() == 'pkgconfig'
     output: 'Bar-1.0.gir',
     depends: [barapp_lib] + typelibs,
     command: [
-      python,
-      girscanner,
+      test_girscanner,
       '--quiet',
       '--output=@OUTPUT@',
       '--no-libtool',
@@ -195,8 +194,7 @@ if glib_dep.type_name() == 'pkgconfig'
     output: 'SLetter-1.0.gir',
     depends: [sletter_lib] + typelibs,
     command: [
-      python,
-      girscanner,
+      test_girscanner,
       '--quiet',
       '--output=@OUTPUT@',
       '--no-libtool',
@@ -233,8 +231,7 @@ if glib_dep.type_name() == 'pkgconfig'
     output: 'WarnLib-1.0.gir',
     depends: [warnlib_lib] + typelibs,
     command: [
-      python,
-      girscanner,
+      test_girscanner,
       '--quiet',
       '--output=@OUTPUT@',
       '--no-libtool',
@@ -269,8 +266,7 @@ if glib_dep.type_name() == 'pkgconfig'
     output: 'Utility-1.0.gir',
     depends: [utility_lib] + typelibs,
     command: [
-      python,
-      girscanner,
+      test_girscanner,
       '--quiet',
       '--output=@OUTPUT@',
       '--no-libtool',
@@ -307,8 +303,7 @@ if glib_dep.type_name() == 'pkgconfig'
     output: 'GtkFrob-1.0.gir',
     depends: [gtkfrob_lib] + typelibs,
     command: [
-      python,
-      girscanner,
+      test_girscanner,
       '--quiet',
       '--output=@OUTPUT@',
       '--no-libtool',
@@ -346,8 +341,7 @@ if glib_dep.type_name() == 'pkgconfig'
     output: 'GetType-1.0.gir',
     depends: [gettype_lib] + typelibs,
     command: [
-      python,
-      girscanner,
+      test_girscanner,
       '--quiet',
       '--output=@OUTPUT@',
       '--no-libtool',
@@ -384,8 +378,7 @@ if glib_dep.type_name() == 'pkgconfig'
     output: 'Symbolfilter-1.0.gir',
     depends: typelibs,
     command: [
-      python,
-      girscanner,
+      test_girscanner,
       '--quiet',
       '--output=@OUTPUT@',
       '--no-libtool',
@@ -412,8 +405,7 @@ if glib_dep.type_name() == 'pkgconfig'
     output: 'Identfilter-1.0.gir',
     depends: typelibs,
     command: [
-      python,
-      girscanner,
+      test_girscanner,
       '--quiet',
       '--output=@OUTPUT@',
       '--no-libtool',
@@ -441,8 +433,7 @@ if glib_dep.type_name() == 'pkgconfig'
     output: 'Headeronly-1.0.gir',
     depends: typelibs,
     command: [
-      python,
-      girscanner,
+      test_girscanner,
       '--quiet',
       '--output=@OUTPUT@',
       '--no-libtool',
@@ -477,8 +468,7 @@ if glib_dep.type_name() == 'pkgconfig'
     output: 'Regress-1.0.gir',
     depends: [regress_lib] + typelibs + [utility_gir],
     command: [
-      python,
-      girscanner,
+      test_girscanner,
       '--quiet',
       '--output=@OUTPUT@',
       '--no-libtool',
@@ -514,6 +504,8 @@ if glib_dep.type_name() == 'pkgconfig'
     command: gircompiler_command,
   )
   test_typelibs += regress_typelib
+else
+  regress_gir = disabler()
 endif
 
 gi_tester = files(join_paths('..', 'gi-tester'))
index 3a63436..26285d2 100644 (file)
@@ -2690,7 +2690,7 @@ regress_test_obj_class_init (RegressTestObjClass *klass)
 
 
   /**
-   * TestObj:int:
+   * RegressTestObj:int:
    */
   pspec = g_param_spec_int ("int",
                             "int property",
@@ -2704,7 +2704,7 @@ regress_test_obj_class_init (RegressTestObjClass *klass)
                                    pspec);
 
   /**
-   * TestObj:float:
+   * RegressTestObj:float:
    */
   pspec = g_param_spec_float ("float",
                               "float property",
@@ -2718,7 +2718,7 @@ regress_test_obj_class_init (RegressTestObjClass *klass)
                                    pspec);
 
   /**
-   * TestObj:double:
+   * RegressTestObj:double:
    */
   pspec = g_param_spec_double ("double",
                                "double property",
@@ -2732,7 +2732,7 @@ regress_test_obj_class_init (RegressTestObjClass *klass)
                                    pspec);
 
   /**
-   * TestObj:string:
+   * RegressTestObj:string: (setter set_string) (getter get_string)
    */
   pspec = g_param_spec_string ("string",
                                "string property",
@@ -2846,6 +2846,34 @@ regress_test_obj_set_bare (RegressTestObj *obj, GObject *bare)
     g_object_ref (obj->bare);
 }
 
+/**
+ * regress_test_obj_set_string: (set-property string)
+ * @obj:
+ * @str:
+ */
+void
+regress_test_obj_set_string (RegressTestObj *obj, const char *str)
+{
+  if (g_strcmp0 (str, obj->string) == 0)
+    return;
+
+  g_free (obj->string);
+  obj->string = g_strdup (str);
+  g_object_notify (G_OBJECT (obj), "string");
+}
+
+/**
+ * regress_test_obj_get_string: (get-property string)
+ * @obj:
+ *
+ * Returns: (transfer none):
+ */
+const char *
+regress_test_obj_get_string (RegressTestObj *obj)
+{
+  return obj->string;
+}
+
 void
 regress_test_obj_emit_sig_with_obj (RegressTestObj *obj)
 {
index 0b239f1..68ab062 100644 (file)
@@ -828,6 +828,12 @@ _GI_TEST_EXTERN
 void       regress_test_obj_set_bare (RegressTestObj *obj, GObject *bare);
 
 _GI_TEST_EXTERN
+void       regress_test_obj_set_string (RegressTestObj *obj, const char *str);
+
+_GI_TEST_EXTERN
+const char *regress_test_obj_get_string (RegressTestObj *obj);
+
+_GI_TEST_EXTERN
 void       regress_test_obj_emit_sig_with_obj (RegressTestObj *obj);
 
 _GI_TEST_EXTERN
index 700305e..182b00b 100644 (file)
@@ -110,6 +110,8 @@ write_out_typelib (gchar *prefix,
     }
   success = TRUE;
 out:
+  g_clear_object (&file_obj);
+  g_clear_object (&tmp_file_obj);
   g_free (filename);
   g_free (tmp_filename);
 
index 75bf759..6e98f52 100755 (executable)
@@ -81,7 +81,7 @@ if not os.path.isfile(os.path.join(pylibdir, 'giscanner', '_giscanner' + py_mod_
         builddir = os.path.abspath(os.path.join(filedir, '..'))
         pylibdir = builddir
         builtins.__dict__['GIRDIR'].append(os.path.join(filedir, os.pardir, 'gir'))
-        gdump_path = os.path.join(builddir, 'girepository', 'gdump.c')
+        gdump_path = os.path.join(builddir, 'giscanner', 'gdump.c')
         if os.path.isfile(gdump_path):
             builtins.__dict__['GDUMP_PATH'] = gdump_path
     else:
index f272c95..46b487e 100644 (file)
@@ -30,6 +30,11 @@ foreach tool : tools
     output: tool[0],
     configuration: tools_conf,
     install_dir: get_option('bindir'),
+    # Not yet supported, but put here to document intention.
+    # depends: [
+    #   giscanner_pymod
+    # ],
+    # depend_files: giscanner_built_files,
   )
   tool_output += tool_bin
   # Provide tools for others when we're a subproject and they use the Meson GNOME module
@@ -59,6 +64,7 @@ gircompiler = executable('g-ir-compiler', 'compiler.c',
   install: true,
   c_args: custom_c_args,
 )
+meson.override_find_program('g-ir-compiler', gircompiler)
 
 girgenerate = executable('g-ir-generate', 'generate.c',
   dependencies: [
@@ -68,15 +74,11 @@ girgenerate = executable('g-ir-generate', 'generate.c',
   install: true,
   c_args: custom_c_args,
 )
+meson.override_find_program('g-ir-generate', girgenerate)
 
 girinspect = executable('g-ir-inspect', 'g-ir-inspect.c',
   dependencies: girepo_dep,
   install: true,
   c_args: custom_c_args,
 )
-
-if not get_option('gi_cross_use_prebuilt_gi')
-  meson.override_find_program('g-ir-compiler', gircompiler)
-  meson.override_find_program('g-ir-generate', girgenerate)
-  meson.override_find_program('g-ir-inspect', girinspect)
-endif
+meson.override_find_program('g-ir-inspect', girinspect)