From ce8c37d3d6665903da5cf3a6ce5fdbfb442e6e3a Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Sat, 29 Oct 2022 18:27:25 +0100 Subject: Document the newly added attributes Add the (copy-func) and (free-func) annotations to the documentation, and the copy-function and free-function attributes to the GIR schema. --- docs/gir-1.2.rnc | 8 ++++++++ docs/website/annotations/giannotations.rst | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/docs/gir-1.2.rnc b/docs/gir-1.2.rnc index 5182f7cb..b7960ffa 100644 --- a/docs/gir-1.2.rnc +++ b/docs/gir-1.2.rnc @@ -228,6 +228,10 @@ grammar { attribute foreign { "0" | "1" }?, ## Name of the GObject compatible gtype this record represents. If empty, this record will be hidden from generated public APIs. attribute glib:is-gtype-struct-for { xsd:string }?, + ## Name of the function used to copy the record + attribute copy-function { xsd:string }?, + ## Name of the function used to free the record + attribute free-function { xsd:string }?, # Other elements a record can contain # mandatory @@ -636,6 +640,10 @@ grammar { attribute glib:type-name { xsd:string }?, ## function to retrieve the GObject compatible type of the element attribute glib:get-type { xsd:string }?, + ## Name of the function used to copy the union + attribute copy-function { xsd:string }?, + ## Name of the function used to free the union + attribute free-function { xsd:string }?, (Info.elements & Field* diff --git a/docs/website/annotations/giannotations.rst b/docs/website/annotations/giannotations.rst index 8099bd5b..696f5b06 100644 --- a/docs/website/annotations/giannotations.rst +++ b/docs/website/annotations/giannotations.rst @@ -199,6 +199,14 @@ Support for non-GObject fundamental objects - ``FUNC`` is the function used to convert from a struct to a GValue, must be a GTypeInstance - + * - ``(copy-func FUNC)`` + - identifier + - ``FUNC`` is the function used to copy a struct or a union + - 1.76 + * - ``(free-func FUNC)`` + - identifier + - ``FUNC`` is the function used to free a struct or a union + - 1.76 Type signature -- cgit v1.2.1