summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDieter Verfaillie <dieterv@optionexplicit.be>2013-07-25 17:49:11 +0200
committerDieter Verfaillie <dieterv@optionexplicit.be>2013-10-08 20:55:50 +0200
commitb6954536f32352c0c29fe5a9a73de1018559a9c5 (patch)
treef0e50185f5c8f0fbe7b0f425fa66a214e926d3e9
parenta2b22ce75937d2d996ef90e0ab683d36031365d0 (diff)
downloadgobject-introspection-b6954536f32352c0c29fe5a9a73de1018559a9c5.tar.gz
giscanner: deprecate GObject-Introspection GTK-Doc tags
After discussing a different issue with the GTK-Doc maintainers, we learned that our g-i specific top level tags should never have existed in the first place. The prefered notation for annotations that apply to the identifier should be written on the identifier line, for example like what we already do with (skip). As a result, this patch deprecates g-i specific top level tags and implements them as annotations on the identifier instead but still keeps support for malformed comment blocks using g-i specific top level tags. This means that all annotated code "out there" will continue to work just fine with this version of g-i, but when a developer decides to fix deprecation warnings in his/her comment blocks, the dependency on g-i needs to be raised to a version that contains at least this patch. #676133 https://bugzilla.gnome.org/show_bug.cgi?id=676133
-rw-r--r--gir/gio-2.0.c79
-rw-r--r--gir/glib-2.0.c18
-rw-r--r--gir/gobject-2.0.c9
-rw-r--r--giscanner/annotationparser.py85
-rw-r--r--giscanner/maintransformer.py69
-rw-r--r--tests/gimarshallingtests.c9
-rw-r--r--tests/scanner/annotation.c8
-rw-r--r--tests/scanner/annotation.h8
-rw-r--r--tests/scanner/annotationparser/gi/annotation_get_value_func.xml116
-rw-r--r--tests/scanner/annotationparser/gi/annotation_ref_func.xml116
-rw-r--r--tests/scanner/annotationparser/gi/annotation_rename_to.xml160
-rw-r--r--tests/scanner/annotationparser/gi/annotation_set_value_func.xml85
-rw-r--r--tests/scanner/annotationparser/gi/annotation_transfer.xml89
-rw-r--r--tests/scanner/annotationparser/gi/annotation_type.xml172
-rw-r--r--tests/scanner/annotationparser/gi/annotation_unref_func.xml85
-rw-r--r--tests/scanner/annotationparser/gi/annotation_value.xml85
-rw-r--r--tests/scanner/annotationparser/gi/annotation_virtual.xml102
-rw-r--r--tests/scanner/foo.c4
-rw-r--r--tests/scanner/regress.c31
19 files changed, 1074 insertions, 256 deletions
diff --git a/gir/gio-2.0.c b/gir/gio-2.0.c
index 5da24c27..e7e69417 100644
--- a/gir/gio-2.0.c
+++ b/gir/gio-2.0.c
@@ -10333,7 +10333,7 @@
/**
- * g_app_info_delete:
+ * g_app_info_delete: (virtual do_delete)
* @appinfo: a #GAppInfo
*
* Tries to delete a #GAppInfo.
@@ -10342,7 +10342,6 @@
* #GAppInfo<!-- -->s which can be deleted, and system-wide ones which
* cannot. See g_app_info_can_delete().
*
- * Virtual: do_delete
* Returns: %TRUE if @appinfo has been deleted
* Since: 2.20
*/
@@ -12122,7 +12121,7 @@
/**
- * g_bus_own_name_on_connection_with_closures:
+ * g_bus_own_name_on_connection_with_closures: (rename-to g_bus_own_name_on_connection)
* @connection: A #GDBusConnection.
* @name: The well-known name to own.
* @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
@@ -12133,13 +12132,12 @@
* easier binding in other languages.
*
* Returns: An identifier (never 0) that an be used with g_bus_unown_name() to stop owning the name.
- * Rename to: g_bus_own_name_on_connection
* Since: 2.26
*/
/**
- * g_bus_own_name_with_closures:
+ * g_bus_own_name_with_closures: (rename-to g_bus_own_name)
* @bus_type: The type of bus to own a name on.
* @name: The well-known name to own.
* @flags: A set of flags from the #GBusNameOwnerFlags enumeration.
@@ -12151,7 +12149,6 @@
* easier binding in other languages.
*
* Returns: An identifier (never 0) that an be used with g_bus_unown_name() to stop owning the name.
- * Rename to: g_bus_own_name
* Since: 2.26
*/
@@ -12240,7 +12237,7 @@
/**
- * g_bus_watch_name_on_connection_with_closures:
+ * g_bus_watch_name_on_connection_with_closures: (rename-to g_bus_watch_name_on_connection)
* @connection: A #GDBusConnection.
* @name: The name (well-known or unique) to watch.
* @flags: Flags from the #GBusNameWatcherFlags enumeration.
@@ -12251,13 +12248,12 @@
* easier binding in other languages.
*
* Returns: An identifier (never 0) that an be used with g_bus_unwatch_name() to stop watching the name.
- * Rename to: g_bus_watch_name_on_connection
* Since: 2.26
*/
/**
- * g_bus_watch_name_with_closures:
+ * g_bus_watch_name_with_closures: (rename-to g_bus_watch_name)
* @bus_type: The type of bus to watch a name on.
* @name: The name (well-known or unique) to watch.
* @flags: Flags from the #GBusNameWatcherFlags enumeration.
@@ -12268,7 +12264,6 @@
* easier binding in other languages.
*
* Returns: An identifier (never 0) that an be used with g_bus_unwatch_name() to stop watching the name.
- * Rename to: g_bus_watch_name
* Since: 2.26
*/
@@ -15136,14 +15131,13 @@
/**
- * g_dbus_interface_dup_object:
+ * g_dbus_interface_dup_object: (rename-to g_dbus_interface_get_object)
* @interface_: An exported D-Bus interface.
*
* Gets the #GDBusObject that @interface_ belongs to, if any.
*
* Returns: (transfer full): A #GDBusObject or %NULL. The returned reference should be freed with g_object_unref().
* Since: 2.32
- * Rename to: g_dbus_interface_get_object
*/
@@ -18943,7 +18937,7 @@
/**
- * g_file_delete:
+ * g_file_delete: (virtual delete_file)
* @file: input #GFile
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
* @error: a #GError, or %NULL
@@ -18955,13 +18949,12 @@
* triggering the cancellable object from another thread. If the operation
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
*
- * Virtual: delete_file
* Returns: %TRUE if the file was deleted. %FALSE otherwise.
*/
/**
- * g_file_delete_async:
+ * g_file_delete_async: (virtual delete_file_async)
* @file: input #GFile
* @io_priority: the <link linkend="io-priority">I/O priority</link> of the request
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
@@ -18972,20 +18965,18 @@
* only be deleted if it is empty. This has the same semantics as
* g_unlink().
*
- * Virtual: delete_file_async
* Since: 2.34
*/
/**
- * g_file_delete_finish:
+ * g_file_delete_finish: (virtual delete_file_finish)
* @file: input #GFile
* @result: a #GAsyncResult
* @error: a #GError, or %NULL
*
* Finishes deleting a file started with g_file_delete_async().
*
- * Virtual: delete_file_finish
* Returns: %TRUE if the file was deleted. %FALSE otherwise.
* Since: 2.34
*/
@@ -19575,7 +19566,7 @@
/**
- * g_file_has_prefix:
+ * g_file_has_prefix: (virtual prefix_matches)
* @file: input #GFile
* @prefix: input #GFile
*
@@ -19591,7 +19582,6 @@
* filesystem point of view), because the prefix of @file is an alias
* of @prefix.
*
- * Virtual: prefix_matches
* Returns: %TRUE if the @files's parent, grandparent, etc is @prefix, %FALSE otherwise.
*/
@@ -19610,14 +19600,13 @@
/**
- * g_file_hash:
+ * g_file_hash: (virtual hash)
* @file: (type GFile): #gconstpointer to a #GFile
*
* Creates a hash value for a #GFile.
*
* This call does no blocking I/O.
*
- * Virtual: hash
* Returns: 0 if @file is not a valid #GFile, otherwise an integer that can be used as hash value for the #GFile. This function is intended for easily hashing a #GFile to add to a #GHashTable or similar data structure.
*/
@@ -20613,7 +20602,7 @@
/**
- * g_file_make_directory_async:
+ * g_file_make_directory_async: (virtual make_directory_async)
* @file: input #GFile
* @io_priority: the <link linkend="io-priority">I/O priority</link> of the request
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
@@ -20622,13 +20611,12 @@
*
* Asynchronously creates a directory.
*
- * Virtual: make_directory_async
* Since: 2.38
*/
/**
- * g_file_make_directory_finish:
+ * g_file_make_directory_finish: (virtual make_directory_finish)
* @file: input #GFile
* @result: a #GAsyncResult
* @error: a #GError, or %NULL
@@ -20636,7 +20624,6 @@
* Finishes an asynchronous directory creation, started with
* g_file_make_directory_async().
*
- * Virtual: make_directory_finish
* Returns: %TRUE on successful directory creation, %FALSE otherwise.
* Since: 2.38
*/
@@ -20789,7 +20776,7 @@
/**
- * g_file_monitor_directory:
+ * g_file_monitor_directory: (virtual monitor_dir)
* @file: input #GFile
* @flags: a set of #GFileMonitorFlags
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
@@ -20808,7 +20795,6 @@
* directory for changes made via hard links; if you want to do this then
* you must register individual watches with g_file_monitor().
*
- * Virtual: monitor_dir
* Returns: (transfer full): a #GFileMonitor for the given @file, or %NULL on error. Free the returned object with g_object_unref().
*/
@@ -21525,7 +21511,7 @@
/**
- * g_file_read:
+ * g_file_read: (virtual read_fn)
* @file: #GFile to read
* @cancellable: (allow-none): a #GCancellable
* @error: a #GError, or %NULL
@@ -21542,7 +21528,6 @@
* error will be returned. Other errors are possible too, and depend
* on what kind of filesystem the file is on.
*
- * Virtual: read_fn
* Returns: (transfer full): #GFileInputStream or %NULL on error. Free the returned object with g_object_unref().
*/
@@ -22182,7 +22167,7 @@
/**
- * g_file_trash:
+ * g_file_trash: (virtual trash)
* @file: #GFile to send to trash
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
* @error: a #GError, or %NULL
@@ -22196,13 +22181,12 @@
* triggering the cancellable object from another thread. If the operation
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
*
- * Virtual: trash
* Returns: %TRUE on successful trash, %FALSE otherwise.
*/
/**
- * g_file_trash_async:
+ * g_file_trash_async: (virtual trash_async)
* @file: input #GFile
* @io_priority: the <link linkend="io-priority">I/O priority</link> of the request
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore
@@ -22211,13 +22195,12 @@
*
* Asynchronously sends @file to the Trash location, if possible.
*
- * Virtual: trash_async
* Since: 2.38
*/
/**
- * g_file_trash_finish:
+ * g_file_trash_finish: (virtual trash_finish)
* @file: input #GFile
* @result: a #GAsyncResult
* @error: a #GError, or %NULL
@@ -22225,7 +22208,6 @@
* Finishes an asynchronous file trashing operation, started with
* g_file_trash_async().
*
- * Virtual: trash_finish
* Returns: %TRUE on successful trash, %FALSE otherwise.
* Since: 2.38
*/
@@ -22433,12 +22415,11 @@
/**
- * g_icon_hash:
+ * g_icon_hash: (virtual hash)
* @icon: #gconstpointer to an icon object.
*
* Gets a hash for an icon.
*
- * Virtual: hash
* Returns: a #guint containing a hash for the @icon, suitable for use in a #GHashTable or similar data structure.
*/
@@ -22476,7 +22457,7 @@
/**
- * g_icon_to_string:
+ * g_icon_to_string: (virtual to_tokens)
* @icon: a #GIcon.
*
* Generates a textual representation of @icon that can be used for
@@ -22501,7 +22482,6 @@
* </para></listitem>
* </itemizedlist>
*
- * Virtual: to_tokens
* Returns: An allocated NUL-terminated UTF8 string or %NULL if @icon can't be serialized. Use g_free() to free.
* Since: 2.20
*/
@@ -26204,7 +26184,7 @@
/**
- * g_output_stream_write:
+ * g_output_stream_write: (virtual write_fn)
* @stream: a #GOutputStream.
* @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
* @count: the number of bytes to write
@@ -26232,7 +26212,6 @@
*
* On error -1 is returned and @error is set accordingly.
*
- * Virtual: write_fn
* Returns: Number of bytes written, or -1 on error
*/
@@ -26621,7 +26600,7 @@
/**
- * g_pollable_input_stream_read_nonblocking:
+ * g_pollable_input_stream_read_nonblocking: (virtual read_nonblocking)
* @stream: a #GPollableInputStream
* @buffer: a buffer to read data into (which should be at least @count bytes long).
* @count: the number of bytes you want to read
@@ -26640,7 +26619,6 @@
* may happen if you call this method after a source triggers due
* to having been cancelled.
*
- * Virtual: read_nonblocking
* Returns: the number of bytes read, or -1 on error (including %G_IO_ERROR_WOULD_BLOCK).
*/
@@ -26700,7 +26678,7 @@
/**
- * g_pollable_output_stream_write_nonblocking:
+ * g_pollable_output_stream_write_nonblocking: (virtual write_nonblocking)
* @stream: a #GPollableOutputStream
* @buffer: (array length=count) (element-type guint8): a buffer to write data from
* @count: the number of bytes you want to write
@@ -26719,7 +26697,6 @@
* may happen if you call this method after a source triggers due
* to having been cancelled.
*
- * Virtual: write_nonblocking
* Returns: the number of bytes written, or -1 on error (including %G_IO_ERROR_WOULD_BLOCK).
*/
@@ -27788,7 +27765,7 @@
/**
- * g_seekable_truncate:
+ * g_seekable_truncate: (virtual truncate_fn)
* @seekable: a #GSeekable.
* @offset: a #goffset.
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
@@ -27802,7 +27779,6 @@
* operation was partially finished when the operation was cancelled the
* partial result will be returned, without an error.
*
- * Virtual: truncate_fn
* Returns: %TRUE if successful. If an error has occurred, this function will return %FALSE and set @error appropriately if present.
*/
@@ -33988,7 +33964,7 @@
/**
- * g_tls_password_set_value_full:
+ * g_tls_password_set_value_full: (virtual set_value)
* @password: a #GTlsPassword object
* @value: the value for the password
* @length: the length of the password, or -1
@@ -34004,7 +33980,6 @@
* calculated automatically. (Note that the terminating nul is not
* considered part of the password in this case.)
*
- * Virtual: set_value
* Since: 2.30
*/
@@ -35435,7 +35410,7 @@
/**
- * g_volume_mount:
+ * g_volume_mount: (virtual mount_fn)
* @volume: a #GVolume.
* @flags: flags affecting the operation
* @mount_operation: (allow-none): a #GMountOperation or %NULL to avoid user interaction.
@@ -35446,8 +35421,6 @@
* Mounts a volume. This is an asynchronous operation, and is
* finished by calling g_volume_mount_finish() with the @volume
* and #GAsyncResult returned in the @callback.
- *
- * Virtual: mount_fn
*/
diff --git a/gir/glib-2.0.c b/gir/glib-2.0.c
index 12e79f46..c18fda50 100644
--- a/gir/glib-2.0.c
+++ b/gir/glib-2.0.c
@@ -11182,7 +11182,7 @@
/**
- * g_child_watch_add_full:
+ * 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.
* @pid: process to watch. On POSIX the pid of a child process. On Windows a handle for a process (which doesn't have to be a child).
* @function: function to call
@@ -11213,7 +11213,6 @@
* need greater control.
*
* Returns: the ID (greater than 0) of the event source.
- * Rename to: g_child_watch_add
* Since: 2.4
*/
@@ -16027,7 +16026,7 @@
/**
- * g_idle_add_full:
+ * 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.
* @function: function to call
* @data: data to pass to @function
@@ -16042,7 +16041,6 @@
* You can do these steps manually if you need greater control.
*
* Returns: the ID (greater than 0) of the event source.
- * Rename to: g_idle_add
*/
@@ -16179,7 +16177,7 @@
/**
- * g_io_add_watch_full:
+ * g_io_add_watch_full: (rename-to g_io_add_watch)
* @channel: a #GIOChannel
* @priority: the priority of the #GIOChannel source
* @condition: the condition to watch for
@@ -16195,7 +16193,6 @@
* You can do these steps manually if you need greater control.
*
* Returns: the event source id
- * Rename to: g_io_add_watch
*/
@@ -29106,7 +29103,7 @@
/**
- * g_timeout_add_full:
+ * 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.
* @interval: the time between calls to the function, in milliseconds (1/1000ths of a second)
* @function: function to call
@@ -29134,7 +29131,6 @@
* See g_get_monotonic_time().
*
* Returns: the ID (greater than 0) of the event source.
- * Rename to: g_timeout_add
*/
@@ -29167,7 +29163,7 @@
/**
- * g_timeout_add_seconds_full:
+ * 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.
* @interval: the time between calls to the function, in seconds
* @function: function to call
@@ -29209,7 +29205,6 @@
* time. See g_get_monotonic_time().
*
* Returns: the ID (greater than 0) of the event source.
- * Rename to: g_timeout_add_seconds
* Since: 2.14
*/
@@ -30367,7 +30362,7 @@
/**
- * g_unix_signal_add_full:
+ * g_unix_signal_add_full: (rename-to g_unix_signal_add)
* @priority: the priority of the signal source. Typically this will be in the range between #G_PRIORITY_DEFAULT and #G_PRIORITY_HIGH.
* @signum: Signal number
* @handler: Callback
@@ -30379,7 +30374,6 @@
* using g_source_remove().
*
* Returns: An ID (greater than 0) for the event source
- * Rename to: g_unix_signal_add
* Since: 2.30
*/
diff --git a/gir/gobject-2.0.c b/gir/gobject-2.0.c
index cb50341a..98879df0 100644
--- a/gir/gobject-2.0.c
+++ b/gir/gobject-2.0.c
@@ -1770,7 +1770,7 @@
/**
- * g_object_bind_property_with_closures:
+ * g_object_bind_property_with_closures: (rename-to g_object_bind_property_full)
* @source: (type GObject.Object): the source #GObject
* @source_property: the property on @source to bind
* @target: (type GObject.Object): the target #GObject
@@ -1787,7 +1787,6 @@
* g_object_bind_property_full(), using #GClosure<!-- -->s instead of
* function pointers.
*
- * Rename to: g_object_bind_property_full
* Returns: (transfer none): the #GBinding instance representing the binding between the two #GObject instances. The binding is released whenever the #GBinding reference count reaches zero.
* Since: 2.26
*/
@@ -2300,7 +2299,7 @@
/**
- * g_object_newv:
+ * g_object_newv: (rename-to g_object_new)
* @object_type: the type id of the #GObject subtype to instantiate
* @n_parameters: the length of the @parameters array
* @parameters: (array length=n_parameters): an array of #GParameter
@@ -2310,7 +2309,6 @@
* Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY)
* which are not explicitly specified are set to their default values.
*
- * Rename to: g_object_new
* Returns: (type GObject.Object) (transfer full): a new instance of @object_type
*/
@@ -5218,7 +5216,7 @@
/**
- * g_value_array_sort_with_data:
+ * g_value_array_sort_with_data: (rename-to g_value_array_sort)
* @value_array: #GValueArray to sort
* @compare_func: (scope call): function to compare elements
* @user_data: (closure): extra data argument provided for @compare_func
@@ -5229,7 +5227,6 @@
* The current implementation uses the same sorting algorithm as standard
* C qsort() function.
*
- * Rename to: g_value_array_sort
* Returns: (transfer none): the #GValueArray passed in as @value_array
* Deprecated: 2.32: Use #GArray and g_array_sort_with_data().
*/
diff --git a/giscanner/annotationparser.py b/giscanner/annotationparser.py
index 25445b49..8351365e 100644
--- a/giscanner/annotationparser.py
+++ b/giscanner/annotationparser.py
@@ -148,7 +148,12 @@ TAG_RETURNS_VALUE = 'returns value'
DEPRECATED_GI_TAGS = [TAG_RETURN,
TAG_RETURNS_VALUE]
-# 4) GObject-Introspection annotation tags.
+# 4) Deprecated GObject-Introspection annotation tags.
+# Accepted by old versions of this module while they should have been
+# annotations on the identifier part instead.
+# Note: This list can not be extended ever again. The GObject-Introspection project is not
+# allowed to invent GTK-Doc tags. Please create new annotations instead.
+TAG_ATTRIBUTES = 'attributes'
TAG_GET_VALUE_FUNC = 'get value func'
TAG_REF_FUNC = 'ref func'
TAG_RENAME_TO = 'rename to'
@@ -159,27 +164,18 @@ TAG_UNREF_FUNC = 'unref func'
TAG_VALUE = 'value'
TAG_VFUNC = 'virtual'
-GI_ANN_TAGS = [TAG_GET_VALUE_FUNC,
- TAG_REF_FUNC,
- TAG_RENAME_TO,
- TAG_SET_VALUE_FUNC,
- TAG_TRANSFER,
- TAG_TYPE,
- TAG_UNREF_FUNC,
- TAG_VALUE,
- TAG_VFUNC]
-
-# 5) Deprecated GObject-Introspection annotation tags.
-# Accepted by old versions of this module while they should have been
-# annotations on the identifier part instead.
-# Note: This list can not be extended ever again. The GObject-Introspection project is not
-# allowed to invent GTK-Doc tags. Please create new annotations instead.
-TAG_ATTRIBUTES = 'attributes'
+DEPRECATED_GI_ANN_TAGS = [TAG_ATTRIBUTES,
+ TAG_GET_VALUE_FUNC,
+ TAG_REF_FUNC,
+ TAG_RENAME_TO,
+ TAG_SET_VALUE_FUNC,
+ TAG_TRANSFER,
+ TAG_TYPE,
+ TAG_UNREF_FUNC,
+ TAG_VALUE,
+ TAG_VFUNC]
-DEPRECATED_GI_ANN_TAGS = [TAG_ATTRIBUTES]
-
-ALL_TAGS = (GTKDOC_TAGS + DEPRECATED_GTKDOC_TAGS + DEPRECATED_GI_TAGS + GI_ANN_TAGS +
- DEPRECATED_GI_ANN_TAGS)
+ALL_TAGS = GTKDOC_TAGS + DEPRECATED_GTKDOC_TAGS + DEPRECATED_GI_TAGS + DEPRECATED_GI_ANN_TAGS
# GObject-Introspection annotation start/end tokens
ANN_LPAR = '('
@@ -196,14 +192,21 @@ ANN_CONSTRUCTOR = 'constructor'
ANN_DESTROY = 'destroy'
ANN_ELEMENT_TYPE = 'element-type'
ANN_FOREIGN = 'foreign'
+ANN_GET_VALUE_FUNC = 'get-value-func'
ANN_IN = 'in'
ANN_INOUT = 'inout'
ANN_METHOD = 'method'
ANN_OUT = 'out'
+ANN_REF_FUNC = 'ref-func'
+ANN_RENAME_TO = 'rename-to'
ANN_SCOPE = 'scope'
+ANN_SET_VALUE_FUNC = 'set-value-func'
ANN_SKIP = 'skip'
ANN_TRANSFER = 'transfer'
ANN_TYPE = 'type'
+ANN_UNREF_FUNC = 'unref-func'
+ANN_VFUNC = 'virtual'
+ANN_VALUE = 'value'
GI_ANNS = [ANN_ALLOW_NONE,
ANN_ARRAY,
@@ -213,14 +216,21 @@ GI_ANNS = [ANN_ALLOW_NONE,
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_TYPE,
+ ANN_UNREF_FUNC,
+ ANN_VFUNC,
+ ANN_VALUE]
# 2) Deprecated GObject-Introspection annotations
ANN_ATTRIBUTE = 'attribute'
@@ -507,8 +517,7 @@ class GtkDocTag(object):
s = 'one value'
else:
s = '%d values' % (n_params, )
- if ((n_params > 0 and (len(options) == 0 or len(options) != n_params))
- or n_params == 0 and len(options) != 0):
+ if len(options) != n_params:
length = len(options)
warn('%s annotation needs %s, not %d' % (ann_name, s, length),
self.position)
@@ -696,14 +705,29 @@ class GtkDocCommentBlock(object):
return '<GtkDocCommentBlock %r %r>' % (self.name, self.annotations)
def to_gtk_doc(self):
- annotations = ''
- if self.annotations:
- annotations += ' '
- annotations += ' '.join('(%s)' % o for o in self.annotations)
+ def serialize_one(option, value, fmt, fmt2):
+ if value:
+ if type(value) != str:
+ if isinstance(value, list):
+ value = ' '.join(value)
+ else:
+ value = ' '.join((serialize_one(k, v, '%s=%s', '%s')
+ for k, v in value.items()))
+ return fmt % (option, value)
+ else:
+ return fmt2 % (option, )
+
lines = [self.name]
if 'SECTION' not in self.name:
lines[0] += ':'
- lines[0] += annotations
+
+ annotations = []
+ for ann_name, options in self.annotations.items():
+ annotations.append(serialize_one(ann_name, options, '(%s %s)', '(%s)'))
+ if annotations:
+ annotations = ' '.join(annotations)
+ lines[0] += ' ' + annotations
+
for param in self.params.values():
lines.append(param.to_gtk_doc_param())
if self.description:
@@ -1196,9 +1220,6 @@ class GtkDocCommentBlockParser(object):
result = TAG_VALUE_STABILITY_RE.match(d)
tag.value = result.group('value').capitalize()
tag.description = result.group('description')
- elif tag_name_lower in GI_ANN_TAGS:
- tag.value = d
- tag.description = ''
comment_block.tags[tag_name_lower] = tag
current_tag = tag
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index 6dd35bcb..b4418b64 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -21,19 +21,16 @@ import re
from . import ast
from . import message
-from .annotationparser import (TAG_VFUNC, TAG_SINCE, TAG_DEPRECATED, TAG_RETURNS,
- TAG_ATTRIBUTES, TAG_RENAME_TO, TAG_TYPE,
- TAG_UNREF_FUNC, TAG_REF_FUNC, TAG_SET_VALUE_FUNC,
- TAG_GET_VALUE_FUNC, TAG_VALUE, TAG_TRANSFER,
- TAG_STABILITY)
-from .annotationparser import (ANN_ALLOW_NONE, ANN_ARRAY, ANN_ATTRIBUTES,
- ANN_ELEMENT_TYPE, ANN_IN, ANN_INOUT,
- ANN_INOUT_ALT, ANN_OUT, ANN_SCOPE,
- ANN_TYPE, ANN_CLOSURE, ANN_DESTROY, ANN_TRANSFER, ANN_SKIP,
- ANN_FOREIGN, ANN_CONSTRUCTOR, ANN_METHOD,
- OPT_ARRAY_FIXED_SIZE, OPT_ARRAY_LENGTH, OPT_ARRAY_ZERO_TERMINATED,
- OPT_OUT_CALLER_ALLOCATES, OPT_OUT_CALLEE_ALLOCATES,
- OPT_TRANSFER_NONE, OPT_TRANSFER_FLOATING)
+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)
+from .annotationparser import (OPT_ARRAY_FIXED_SIZE, OPT_ARRAY_LENGTH, OPT_ARRAY_ZERO_TERMINATED,
+ OPT_OUT_CALLEE_ALLOCATES, OPT_OUT_CALLER_ALLOCATES,
+ OPT_TRANSFER_FLOATING, OPT_TRANSFER_NONE)
from .utils import to_underscores_noprefix
@@ -136,12 +133,10 @@ class MainTransformer(object):
def _apply_annotation_rename_to(self, node, chain, block):
if not block:
return
- rename_to = block.tags.get(TAG_RENAME_TO)
- if not rename_to:
- return
- rename_to = rename_to.value
+ rename_to = block.annotations.get(ANN_RENAME_TO)
if not rename_to:
return
+ rename_to = rename_to[0]
target = self._namespace.get_by_symbol(rename_to)
if not target:
message.warn_node(node,
@@ -229,14 +224,14 @@ class MainTransformer(object):
if isinstance(node, ast.Class):
block = self._get_block(node)
if block:
- tag = block.tags.get(TAG_UNREF_FUNC)
- node.unref_func = tag.value if tag else None
- tag = block.tags.get(TAG_REF_FUNC)
- node.ref_func = tag.value if tag else None
- tag = block.tags.get(TAG_SET_VALUE_FUNC)
- node.set_value_func = tag.value if tag else None
- tag = block.tags.get(TAG_GET_VALUE_FUNC)
- node.get_value_func = tag.value if tag else None
+ annotation = block.annotations.get(ANN_UNREF_FUNC)
+ node.unref_func = annotation[0] if annotation else None
+ annotation = block.annotations.get(ANN_REF_FUNC)
+ node.ref_func = annotation[0] if annotation else None
+ annotation = block.annotations.get(ANN_SET_VALUE_FUNC)
+ node.set_value_func = annotation[0] if annotation else None
+ annotation = block.annotations.get(ANN_GET_VALUE_FUNC)
+ node.get_value_func = annotation[0] if annotation else None
if isinstance(node, ast.Constant):
self._apply_annotations_constant(node)
return True
@@ -733,17 +728,17 @@ class MainTransformer(object):
self._apply_annotations_annotated(prop, block)
if not block:
return
- transfer_tag = block.tags.get(TAG_TRANSFER)
- if transfer_tag is not None:
- transfer = transfer_tag.value
+ transfer_annotation = block.annotations.get(ANN_TRANSFER)
+ if transfer_annotation is not None:
+ transfer = transfer_annotation[0]
if transfer == OPT_TRANSFER_FLOATING:
transfer = OPT_TRANSFER_NONE
prop.transfer = transfer
else:
prop.transfer = self._get_transfer_default(parent, prop)
- type_tag = block.tags.get(TAG_TYPE)
- if type_tag:
- prop.type = self._resolve_toplevel(type_tag.value, prop.type, prop, parent)
+ type_annotation = block.annotations.get(ANN_TYPE)
+ if type_annotation:
+ prop.type = self._resolve_toplevel(type_annotation[0], prop.type, prop, parent)
def _apply_annotations_signal(self, parent, signal):
names = []
@@ -788,9 +783,9 @@ class MainTransformer(object):
self._apply_annotations_annotated(node, block)
- tag = block.tags.get(TAG_VALUE)
- if tag:
- node.value = tag.value
+ value_annotation = block.annotations.get(ANN_VALUE)
+ if value_annotation:
+ node.value = value_annotation[0]
def _apply_annotations_enum_members(self, node, block):
if block is None:
@@ -810,9 +805,9 @@ class MainTransformer(object):
# Handle virtual invokers
parent = chain[-1] if chain else None
if (block and parent):
- virtual_annotation = block.tags.get(TAG_VFUNC)
+ virtual_annotation = block.annotations.get(ANN_VFUNC)
if virtual_annotation:
- invoker_name = virtual_annotation.value
+ invoker_name = virtual_annotation[0]
matched = False
for vfunc in parent.virtual_methods:
if vfunc.name == invoker_name:
@@ -824,7 +819,7 @@ class MainTransformer(object):
if not matched:
message.warn_node(node,
"Virtual slot %r not found for %r annotation" % (invoker_name,
- TAG_VFUNC))
+ ANN_VFUNC))
return True
def _resolve_and_filter_type_list(self, typelist):
diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c
index 05502951..02c33de2 100644
--- a/tests/gimarshallingtests.c
+++ b/tests/gimarshallingtests.c
@@ -4114,11 +4114,9 @@ static void
}
/**
- * gi_marshalling_tests_object_vfunc_with_callback:
+ * gi_marshalling_tests_object_vfunc_with_callback: (virtual vfunc_with_callback)
* @callback: (scope call) (closure callback_data):
* @callback_data: (allow-none):
- *
- * Virtual: vfunc_with_callback
*/
void
gi_marshalling_tests_object_vfunc_with_callback (GIMarshallingTestsObject *
@@ -5312,10 +5310,7 @@ static void gi_marshalling_tests_properties_object_class_init (GIMarshallingTest
(), G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
/**
- * GIMarshallingTestsPropertiesObject:some-boxed-glist:
- *
- * Type: GLib.List(gint)
- * Transfer: none
+ * GIMarshallingTestsPropertiesObject:some-boxed-glist: (type GLib.List(gint)) (transfer none):
*/
g_object_class_install_property (object_class, SOME_BOXED_GLIST_PROPERTY,
g_param_spec_boxed ("some-boxed-glist",
diff --git a/tests/scanner/annotation.c b/tests/scanner/annotation.c
index 32187d38..30dc72ef 100644
--- a/tests/scanner/annotation.c
+++ b/tests/scanner/annotation.c
@@ -163,9 +163,7 @@ regress_annotation_object_class_init (RegressAnnotationObjectClass *klass)
NULL,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
/**
- * RegressAnnotationObject:function-property:
- *
- * Type: RegressAnnotationCallback
+ * RegressAnnotationObject:function-property: (type RegressAnnotationCallback)
*/
g_object_class_install_property (gobject_class,
PROP_FUNCTION_PROPERTY,
@@ -616,15 +614,13 @@ regress_annotation_object_watch (RegressAnnotationObject *object,
}
/**
- * regress_annotation_object_watch_full:
+ * regress_annotation_object_watch_full: (rename-to regress_annotation_object_watch)
* @object: A #RegressAnnotationObject
* @func: The callback
* @user_data: The callback data
* @destroy: Destroy notification
*
* Test overriding via the "Rename To" annotation.
- *
- * Rename to: regress_annotation_object_watch
*/
void
regress_annotation_object_watch_full (RegressAnnotationObject *object,
diff --git a/tests/scanner/annotation.h b/tests/scanner/annotation.h
index b982a5b7..2084da29 100644
--- a/tests/scanner/annotation.h
+++ b/tests/scanner/annotation.h
@@ -173,22 +173,18 @@ GObject * regress_annotation_transfer_floating(void);
#define REGRESS_ANNOTATION_CALCULATED_DEFINE (10 * 10)
/**
- * REGRESS_ANNOTATION_CALCULATED_LARGE:
+ * REGRESS_ANNOTATION_CALCULATED_LARGE: (value 10000000000UL)
*
* Constant to define a calculated large value
*
- * Value: 10000000000UL
- *
* Since: 1.4
*/
#define REGRESS_ANNOTATION_CALCULATED_LARGE (1000 * G_GINT64_CONSTANT (10000000))
/**
- * REGRESS_ANNOTATION_CALCULATED_LARGE_DIV:
+ * REGRESS_ANNOTATION_CALCULATED_LARGE_DIV: (value 1000000UL)
*
* Constant to define a calculated large value
- *
- * Value: 1000000UL
*/
#define REGRESS_ANNOTATION_CALCULATED_LARGE_DIV (1000 / G_GINT64_CONSTANT (10000000))
diff --git a/tests/scanner/annotationparser/gi/annotation_get_value_func.xml b/tests/scanner/annotationparser/gi/annotation_get_value_func.xml
index cfc64281..7d1551f7 100644
--- a/tests/scanner/annotationparser/gi/annotation_get_value_func.xml
+++ b/tests/scanner/annotationparser/gi/annotation_get_value_func.xml
@@ -3,8 +3,34 @@
<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test">
<test>
+ <input>/**
+ * RegressTestFundamentalObject: (get-value-func regress_test_value_get_fundamental_object)
+ *
+ * This object tests regressions...
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>RegressTestFundamentalObject</name>
+ <annotations>
+ <annotation>
+ <name>get-value-func</name>
+ <options>
+ <option>
+ <name>regress_test_value_get_fundamental_object</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ </identifier>
+ <description>This object tests regressions...</description>
+ </docblock>
+ </parser>
+</test>
+
+<test>
<!--
- "Get value func:" tag syntax
+ Deprecated "Get value func:" tag syntax
-->
<input>/**
* RegressTestFundamentalObject:
@@ -17,15 +43,91 @@
<docblock>
<identifier>
<name>RegressTestFundamentalObject</name>
+ <annotations>
+ <annotation>
+ <name>get-value-func</name>
+ <options>
+ <option>
+ <name>regress_test_value_get_fundamental_object</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ </identifier>
+ <description>This object tests regressions...</description>
+ </docblock>
+ <messages>
+ <message>6: Warning: Test: GObject-Introspection specific GTK-Doc tag "Get value func" has been deprecated, please use annotations on the identifier instead:
+ * Get value func: regress_test_value_get_fundamental_object
+ ^</message>
+ </messages>
+ </parser>
+</test>
+
+<test>
+ <!--
+ Deprecated "Get value func:" tag syntax in the wrong location
+ -->
+ <input>/**
+ * RegressTestFundamentalObject:
+ *
+ * Get value func: regress_test_value_get_fundamental_object
+ *
+ * This object tests regressions...
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>RegressTestFundamentalObject</name>
+ <annotations>
+ <annotation>
+ <name>get-value-func</name>
+ <options>
+ <option>
+ <name>regress_test_value_get_fundamental_object</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ </identifier>
+ <description>This object tests regressions...</description>
+ </docblock>
+ <messages>
+ <message>4: Warning: Test: GObject-Introspection specific GTK-Doc tag "Get value func" has been deprecated, please use annotations on the identifier instead:
+ * Get value func: regress_test_value_get_fundamental_object
+ ^</message>
+ </messages>
+ </parser>
+</test>
+
+<test>
+ <input>/**
+ * RegressTestFundamentalObject: (get-value-func regress_test_value_get_fundamental_object=invalid)
+ *
+ * This object tests regressions...
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>RegressTestFundamentalObject</name>
+ <annotations>
+ <annotation>
+ <name>get-value-func</name>
+ <options>
+ <option>
+ <name>regress_test_value_get_fundamental_object=invalid</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
</identifier>
<description>This object tests regressions...</description>
- <tags>
- <tag>
- <name>get value func</name>
- <value>regress_test_value_get_fundamental_object</value>
- </tag>
- </tags>
</docblock>
+ <messages>
+ <message>2: Warning: Test: invalid annotation options: expected a "list" but received "key=value pairs":
+ * RegressTestFundamentalObject: (get-value-func regress_test_value_get_fundamental_object=invalid)
+ ^</message>
+ </messages>
</parser>
</test>
diff --git a/tests/scanner/annotationparser/gi/annotation_ref_func.xml b/tests/scanner/annotationparser/gi/annotation_ref_func.xml
index 5f945701..c97683b2 100644
--- a/tests/scanner/annotationparser/gi/annotation_ref_func.xml
+++ b/tests/scanner/annotationparser/gi/annotation_ref_func.xml
@@ -3,8 +3,34 @@
<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test">
<test>
+ <input>/**
+ * RegressTestFundamentalObject: (ref-func regress_test_fundamental_object_ref)
+ *
+ * This object tests regressions...
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>RegressTestFundamentalObject</name>
+ <annotations>
+ <annotation>
+ <name>ref-func</name>
+ <options>
+ <option>
+ <name>regress_test_fundamental_object_ref</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ </identifier>
+ <description>This object tests regressions...</description>
+ </docblock>
+ </parser>
+</test>
+
+<test>
<!--
- "Ref func:" tag syntax
+ Deprecated "Ref func:" tag syntax
-->
<input>/**
* RegressTestFundamentalObject:
@@ -17,15 +43,91 @@
<docblock>
<identifier>
<name>RegressTestFundamentalObject</name>
+ <annotations>
+ <annotation>
+ <name>ref-func</name>
+ <options>
+ <option>
+ <name>regress_test_fundamental_object_ref</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ </identifier>
+ <description>This object tests regressions...</description>
+ </docblock>
+ <messages>
+ <message>6: Warning: Test: GObject-Introspection specific GTK-Doc tag "Ref func" has been deprecated, please use annotations on the identifier instead:
+ * Ref func: regress_test_fundamental_object_ref
+ ^</message>
+ </messages>
+ </parser>
+</test>
+
+<test>
+ <!--
+ Deprecated "Ref func:" tag syntax in the wrong location
+ -->
+ <input>/**
+ * RegressTestFundamentalObject:
+ *
+ * Ref func: regress_test_fundamental_object_ref
+ *
+ * This object tests regressions...
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>RegressTestFundamentalObject</name>
+ <annotations>
+ <annotation>
+ <name>ref-func</name>
+ <options>
+ <option>
+ <name>regress_test_fundamental_object_ref</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ </identifier>
+ <description>This object tests regressions...</description>
+ </docblock>
+ <messages>
+ <message>4: Warning: Test: GObject-Introspection specific GTK-Doc tag "Ref func" has been deprecated, please use annotations on the identifier instead:
+ * Ref func: regress_test_fundamental_object_ref
+ ^</message>
+ </messages>
+ </parser>
+</test>
+
+<test>
+ <input>/**
+ * RegressTestFundamentalObject: (ref-func regress_test_fundamental_object_ref=invalid)
+ *
+ * This object tests regressions...
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>RegressTestFundamentalObject</name>
+ <annotations>
+ <annotation>
+ <name>ref-func</name>
+ <options>
+ <option>
+ <name>regress_test_fundamental_object_ref=invalid</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
</identifier>
<description>This object tests regressions...</description>
- <tags>
- <tag>
- <name>ref func</name>
- <value>regress_test_fundamental_object_ref</value>
- </tag>
- </tags>
</docblock>
+ <messages>
+ <message>2: Warning: Test: invalid annotation options: expected a "list" but received "key=value pairs":
+ * RegressTestFundamentalObject: (ref-func regress_test_fundamental_object_ref=invalid)
+ ^</message>
+ </messages>
</parser>
</test>
diff --git a/tests/scanner/annotationparser/gi/annotation_rename_to.xml b/tests/scanner/annotationparser/gi/annotation_rename_to.xml
index 5d9d3b1b..9fecdaf5 100644
--- a/tests/scanner/annotationparser/gi/annotation_rename_to.xml
+++ b/tests/scanner/annotationparser/gi/annotation_rename_to.xml
@@ -3,8 +3,56 @@
<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test">
<test>
+ <input>/**
+ * annotation_object_watch_full: (rename-to annotation_object_watch)
+ * @object: A #AnnotationObject
+ * @func: The callback
+ * @user_data: The callback data
+ * @destroy: Destroy notification
+ *
+ * Test overriding via the "Rename To" annotation.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>annotation_object_watch_full</name>
+ <annotations>
+ <annotation>
+ <name>rename-to</name>
+ <options>
+ <option>
+ <name>annotation_object_watch</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>object</name>
+ <description>A #AnnotationObject</description>
+ </parameter>
+ <parameter>
+ <name>func</name>
+ <description>The callback</description>
+ </parameter>
+ <parameter>
+ <name>user_data</name>
+ <description>The callback data</description>
+ </parameter>
+ <parameter>
+ <name>destroy</name>
+ <description>Destroy notification</description>
+ </parameter>
+ </parameters>
+ <description>Test overriding via the "Rename To" annotation.</description>
+ </docblock>
+ </parser>
+</test>
+
+<test>
<!--
- "Rename to:" tag syntax
+ Deprecated "Rename to:" tag syntax
-->
<input>/**
* annotation_object_watch_full:
@@ -21,6 +69,105 @@
<docblock>
<identifier>
<name>annotation_object_watch_full</name>
+ <annotations>
+ <annotation>
+ <name>rename-to</name>
+ <options>
+ <option>
+ <name>annotation_object_watch</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>object</name>
+ <description>A #AnnotationObject</description>
+ </parameter>
+ <parameter>
+ <name>func</name>
+ <description>The callback</description>
+ </parameter>
+ <parameter>
+ <name>user_data</name>
+ <description>The callback data</description>
+ </parameter>
+ <parameter>
+ <name>destroy</name>
+ <description>Destroy notification</description>
+ </parameter>
+ </parameters>
+ <description>Test overriding via the "Rename To" annotation.</description>
+ </docblock>
+ <messages>
+ <message>10: Warning: Test: GObject-Introspection specific GTK-Doc tag "Rename to" has been deprecated, please use annotations on the identifier instead:
+ * Rename to: annotation_object_watch
+ ^</message>
+ </messages>
+ </parser>
+</test>
+
+<test>
+ <!--
+ Deprecated "Rename to:" tag syntax in the wrong location
+ -->
+ <input>/**
+ * annotation_object_watch_full:
+ *
+ * Rename to: annotation_object_watch
+ *
+ * Test overriding via the "Rename To" annotation.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>annotation_object_watch_full</name>
+ <annotations>
+ <annotation>
+ <name>rename-to</name>
+ <options>
+ <option>
+ <name>annotation_object_watch</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ </identifier>
+ <description>Test overriding via the "Rename To" annotation.</description>
+ </docblock>
+ <messages>
+ <message>4: Warning: Test: GObject-Introspection specific GTK-Doc tag "Rename to" has been deprecated, please use annotations on the identifier instead:
+ * Rename to: annotation_object_watch
+ ^</message>
+ </messages>
+ </parser>
+</test>
+
+<test>
+ <input>/**
+ * annotation_object_watch_full: (rename-to annotation_object_watch=invalid)
+ * @object: A #AnnotationObject
+ * @func: The callback
+ * @user_data: The callback data
+ * @destroy: Destroy notification
+ *
+ * Test overriding via the "Rename To" annotation.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>annotation_object_watch_full</name>
+ <annotations>
+ <annotation>
+ <name>rename-to</name>
+ <options>
+ <option>
+ <name>annotation_object_watch=invalid</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
</identifier>
<parameters>
<parameter>
@@ -41,13 +188,12 @@
</parameter>
</parameters>
<description>Test overriding via the "Rename To" annotation.</description>
- <tags>
- <tag>
- <name>rename to</name>
- <value>annotation_object_watch</value>
- </tag>
- </tags>
</docblock>
+ <messages>
+ <message>2: Warning: Test: invalid annotation options: expected a "list" but received "key=value pairs":
+ * annotation_object_watch_full: (rename-to annotation_object_watch=invalid)
+ ^</message>
+ </messages>
</parser>
</test>
diff --git a/tests/scanner/annotationparser/gi/annotation_set_value_func.xml b/tests/scanner/annotationparser/gi/annotation_set_value_func.xml
index 0164a5b8..4619fb9f 100644
--- a/tests/scanner/annotationparser/gi/annotation_set_value_func.xml
+++ b/tests/scanner/annotationparser/gi/annotation_set_value_func.xml
@@ -3,8 +3,34 @@
<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test">
<test>
+ <input>/**
+ * RegressTestFundamentalObject: (set-value-func regress_test_value_set_fundamental_object)
+ *
+ * This object tests regressions...
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>RegressTestFundamentalObject</name>
+ <annotations>
+ <annotation>
+ <name>set-value-func</name>
+ <options>
+ <option>
+ <name>regress_test_value_set_fundamental_object</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ </identifier>
+ <description>This object tests regressions...</description>
+ </docblock>
+ </parser>
+</test>
+
+<test>
<!--
- "Set value func:" tag syntax
+ Deprecated "Set value func:" tag syntax
-->
<input>/**
* RegressTestFundamentalObject:
@@ -17,15 +43,60 @@
<docblock>
<identifier>
<name>RegressTestFundamentalObject</name>
+ <annotations>
+ <annotation>
+ <name>set-value-func</name>
+ <options>
+ <option>
+ <name>regress_test_value_set_fundamental_object</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
</identifier>
<description>This object tests regressions...</description>
- <tags>
- <tag>
- <name>set value func</name>
- <value>regress_test_value_set_fundamental_object</value>
- </tag>
- </tags>
</docblock>
+ <messages>
+ <message>6: Warning: Test: GObject-Introspection specific GTK-Doc tag "Set value func" has been deprecated, please use annotations on the identifier instead:
+ * Set value func: regress_test_value_set_fundamental_object
+ ^</message>
+ </messages>
+ </parser>
+</test>
+
+<test>
+ <!--
+ Deprecated "Set value func:" tag syntax in the wrong location
+ -->
+ <input>/**
+ * RegressTestFundamentalObject:
+ *
+ * Set value func: regress_test_value_set_fundamental_object
+ *
+ * This object tests regressions...
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>RegressTestFundamentalObject</name>
+ <annotations>
+ <annotation>
+ <name>set-value-func</name>
+ <options>
+ <option>
+ <name>regress_test_value_set_fundamental_object</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ </identifier>
+ <description>This object tests regressions...</description>
+ </docblock>
+ <messages>
+ <message>4: Warning: Test: GObject-Introspection specific GTK-Doc tag "Set value func" has been deprecated, please use annotations on the identifier instead:
+ * Set value func: regress_test_value_set_fundamental_object
+ ^</message>
+ </messages>
</parser>
</test>
diff --git a/tests/scanner/annotationparser/gi/annotation_transfer.xml b/tests/scanner/annotationparser/gi/annotation_transfer.xml
index 535a4d28..3bbb8c49 100644
--- a/tests/scanner/annotationparser/gi/annotation_transfer.xml
+++ b/tests/scanner/annotationparser/gi/annotation_transfer.xml
@@ -139,8 +139,36 @@ known by GObject as it's only marked as G_TYPE_POINTER</description>
</test>
<test>
+ <input>/**
+ * FsSession:codecs-without-config: (transfer full)
+ *
+ * This is the same list of codecs as #FsSession:codecs
+ * without....
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>FsSession:codecs-without-config</name>
+ <annotations>
+ <annotation>
+ <name>transfer</name>
+ <options>
+ <option>
+ <name>full</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ </identifier>
+ <description>This is the same list of codecs as #FsSession:codecs
+without....</description>
+ </docblock>
+ </parser>
+</test>
+
+<test>
<!--
- "Transfer:" tag syntax
+ Deprecated "Transfer:" tag syntax
-->
<input>/**
* FsSession:codecs-without-config:
@@ -154,16 +182,63 @@ known by GObject as it's only marked as G_TYPE_POINTER</description>
<docblock>
<identifier>
<name>FsSession:codecs-without-config</name>
+ <annotations>
+ <annotation>
+ <name>transfer</name>
+ <options>
+ <option>
+ <name>full</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
</identifier>
<description>This is the same list of codecs as #FsSession:codecs
without....</description>
- <tags>
- <tag>
- <name>transfer</name>
- <value>full</value>
- </tag>
- </tags>
</docblock>
+ <messages>
+ <message>7: Warning: Test: GObject-Introspection specific GTK-Doc tag "Transfer" has been deprecated, please use annotations on the identifier instead:
+ * Transfer: full
+ ^</message>
+ </messages>
+ </parser>
+</test>
+
+<test>
+ <!--
+ Deprecated "Transfer:" tag syntax in the wrong location
+ -->
+ <input>/**
+ * FsSession:codecs-without-config:
+ *
+ * Transfer: full
+ *
+ * This is the same list of codecs as #FsSession:codecs
+ * without....
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>FsSession:codecs-without-config</name>
+ <annotations>
+ <annotation>
+ <name>transfer</name>
+ <options>
+ <option>
+ <name>full</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ </identifier>
+ <description>This is the same list of codecs as #FsSession:codecs
+without....</description>
+ </docblock>
+ <messages>
+ <message>4: Warning: Test: GObject-Introspection specific GTK-Doc tag "Transfer" has been deprecated, please use annotations on the identifier instead:
+ * Transfer: full
+ ^</message>
+ </messages>
</parser>
</test>
diff --git a/tests/scanner/annotationparser/gi/annotation_type.xml b/tests/scanner/annotationparser/gi/annotation_type.xml
index 885b4bcc..f2e35d4b 100644
--- a/tests/scanner/annotationparser/gi/annotation_type.xml
+++ b/tests/scanner/annotationparser/gi/annotation_type.xml
@@ -59,29 +59,175 @@ known by GObject as it's only marked as G_TYPE_POINTER</description>
</test>
<test>
+ <input>/**
+ * AnnotationObject:hash-table: (type GLib.HashTable(utf8,gint8)) (transfer container)
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>AnnotationObject:hash-table</name>
+ <annotations>
+ <annotation>
+ <name>type</name>
+ <options>
+ <option>
+ <name>GLib.HashTable(utf8,gint8)</name>
+ </option>
+ </options>
+ </annotation>
+ <annotation>
+ <name>transfer</name>
+ <options>
+ <option>
+ <name>container</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ </identifier>
+ </docblock>
+ </parser>
+</test>
+
+<test>
<!--
- "Type:" tag syntax
+ Deprecated inequality sign/angled brackets notation.
+ -->
+ <input><![CDATA[/**
+ * AnnotationObject:hash-table: (type GLib.HashTable<utf8,gint8>) (transfer container)
+ */]]></input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>AnnotationObject:hash-table</name>
+ <annotations>
+ <annotation>
+ <name>type</name>
+ <options>
+ <option>
+ <name>GLib.HashTable(utf8,gint8)</name>
+ </option>
+ </options>
+ </annotation>
+ <annotation>
+ <name>transfer</name>
+ <options>
+ <option>
+ <name>container</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ </identifier>
+ </docblock>
+ </parser>
+</test>
+
+<test>
+ <!--
+ Deprecated "Type:" tag syntax
-->
<input>/**
- * RegressTestObj:hash-table:
- *
- * Test.
- *
- * Type: GLib.HashTable(utf8,gint8)
- */</input>
+ * RegressTestObj:hash-table:
+ *
+ * Test.
+ *
+ * Type: GLib.HashTable(utf8,gint8)
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>RegressTestObj:hash-table</name>
+ <annotations>
+ <annotation>
+ <name>type</name>
+ <options>
+ <option>
+ <name>GLib.HashTable(utf8,gint8)</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ </identifier>
+ <description>Test.</description>
+ </docblock>
+ <messages>
+ <message>6: Warning: Test: GObject-Introspection specific GTK-Doc tag "Type" has been deprecated, please use annotations on the identifier instead:
+ * Type: GLib.HashTable(utf8,gint8)
+ ^</message>
+ </messages>
+ </parser>
+</test>
+
+<test>
+ <!--
+ Deprecated "Type:" tag syntax in the wrong location
+ -->
+ <input>/**
+ * RegressTestObj:hash-table:
+ *
+ * Type: GLib.HashTable(utf8,gint8)
+ *
+ * Test.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>RegressTestObj:hash-table</name>
+ <annotations>
+ <annotation>
+ <name>type</name>
+ <options>
+ <option>
+ <name>GLib.HashTable(utf8,gint8)</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ </identifier>
+ <description>Test.</description>
+ </docblock>
+ <messages>
+ <message>4: Warning: Test: GObject-Introspection specific GTK-Doc tag "Type" has been deprecated, please use annotations on the identifier instead:
+ * Type: GLib.HashTable(utf8,gint8)
+ ^</message>
+ </messages>
+ </parser>
+</test>
+
+<test>
+ <!--
+ Deprecated angled brackets in deprecated "Type:" tag syntax
+ -->
+ <input><![CDATA[/**
+ * RegressTestObj:hash-table:
+ *
+ * Test.
+ *
+ * Type: GLib.HashTable<utf8,gint8>
+ */]]></input>
<parser>
<docblock>
<identifier>
<name>RegressTestObj:hash-table</name>
+ <annotations>
+ <annotation>
+ <name>type</name>
+ <options>
+ <option>
+ <name>GLib.HashTable(utf8,gint8)</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
</identifier>
<description>Test.</description>
- <tags>
- <tag>
- <name>type</name>
- <value>GLib.HashTable(utf8,gint8)</value>
- </tag>
- </tags>
</docblock>
+ <messages>
+ <message><![CDATA[6: Warning: Test: GObject-Introspection specific GTK-Doc tag "Type" has been deprecated, please use annotations on the identifier instead:
+ * Type: GLib.HashTable<utf8,gint8>
+ ^]]></message>
+ </messages>
</parser>
</test>
diff --git a/tests/scanner/annotationparser/gi/annotation_unref_func.xml b/tests/scanner/annotationparser/gi/annotation_unref_func.xml
index 528923b2..a8a911c4 100644
--- a/tests/scanner/annotationparser/gi/annotation_unref_func.xml
+++ b/tests/scanner/annotationparser/gi/annotation_unref_func.xml
@@ -3,8 +3,34 @@
<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test">
<test>
+ <input>/**
+ * RegressTestFundamentalObject: (unref-func regress_test_fundamental_object_unref)
+ *
+ * This object tests regressions...
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>RegressTestFundamentalObject</name>
+ <annotations>
+ <annotation>
+ <name>unref-func</name>
+ <options>
+ <option>
+ <name>regress_test_fundamental_object_unref</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ </identifier>
+ <description>This object tests regressions...</description>
+ </docblock>
+ </parser>
+</test>
+
+<test>
<!--
- "Unref func:" tag syntax
+ Deprecated "Unref func:" tag syntax
-->
<input>/**
* RegressTestFundamentalObject:
@@ -17,15 +43,60 @@
<docblock>
<identifier>
<name>RegressTestFundamentalObject</name>
+ <annotations>
+ <annotation>
+ <name>unref-func</name>
+ <options>
+ <option>
+ <name>regress_test_fundamental_object_unref</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
</identifier>
<description>This object tests regressions...</description>
- <tags>
- <tag>
- <name>unref func</name>
- <value>regress_test_fundamental_object_unref</value>
- </tag>
- </tags>
</docblock>
+ <messages>
+ <message>6: Warning: Test: GObject-Introspection specific GTK-Doc tag "Unref func" has been deprecated, please use annotations on the identifier instead:
+ * Unref func: regress_test_fundamental_object_unref
+ ^</message>
+ </messages>
+ </parser>
+</test>
+
+<test>
+ <!--
+ Deprecated "Unref func:" tag syntax in the wrong location
+ -->
+ <input>/**
+ * RegressTestFundamentalObject:
+ *
+ * Unref func: regress_test_fundamental_object_unref
+ *
+ * This object tests regressions...
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>RegressTestFundamentalObject</name>
+ <annotations>
+ <annotation>
+ <name>unref-func</name>
+ <options>
+ <option>
+ <name>regress_test_fundamental_object_unref</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ </identifier>
+ <description>This object tests regressions...</description>
+ </docblock>
+ <messages>
+ <message>4: Warning: Test: GObject-Introspection specific GTK-Doc tag "Unref func" has been deprecated, please use annotations on the identifier instead:
+ * Unref func: regress_test_fundamental_object_unref
+ ^</message>
+ </messages>
</parser>
</test>
diff --git a/tests/scanner/annotationparser/gi/annotation_value.xml b/tests/scanner/annotationparser/gi/annotation_value.xml
index c5acb4ed..06f2bf2c 100644
--- a/tests/scanner/annotationparser/gi/annotation_value.xml
+++ b/tests/scanner/annotationparser/gi/annotation_value.xml
@@ -3,8 +3,34 @@
<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test">
<test>
+ <input>/**
+ * ANNOTATION_CALCULATED_LARGE: (value 10000000000UL)
+ *
+ * Constant to define a calculated large value
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>ANNOTATION_CALCULATED_LARGE</name>
+ <annotations>
+ <annotation>
+ <name>value</name>
+ <options>
+ <option>
+ <name>10000000000UL</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ </identifier>
+ <description>Constant to define a calculated large value</description>
+ </docblock>
+ </parser>
+</test>
+
+<test>
<!--
- "Value:" tag syntax
+ Deprecated "Value:" tag syntax
-->
<input>/**
* ANNOTATION_CALCULATED_LARGE:
@@ -17,15 +43,60 @@
<docblock>
<identifier>
<name>ANNOTATION_CALCULATED_LARGE</name>
+ <annotations>
+ <annotation>
+ <name>value</name>
+ <options>
+ <option>
+ <name>10000000000UL</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
</identifier>
<description>Constant to define a calculated large value</description>
- <tags>
- <tag>
- <name>value</name>
- <value>10000000000UL</value>
- </tag>
- </tags>
</docblock>
+ <messages>
+ <message>6: Warning: Test: GObject-Introspection specific GTK-Doc tag "Value" has been deprecated, please use annotations on the identifier instead:
+ * Value: 10000000000UL
+ ^</message>
+ </messages>
+ </parser>
+</test>
+
+<test>
+ <!--
+ Deprecated "Value:" tag syntax in the wrong location
+ -->
+ <input>/**
+ * ANNOTATION_CALCULATED_LARGE:
+ *
+ * Value: 10000000000UL
+ *
+ * Constant to define a calculated large value
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>ANNOTATION_CALCULATED_LARGE</name>
+ <annotations>
+ <annotation>
+ <name>value</name>
+ <options>
+ <option>
+ <name>10000000000UL</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ </identifier>
+ <description>Constant to define a calculated large value</description>
+ </docblock>
+ <messages>
+ <message>4: Warning: Test: GObject-Introspection specific GTK-Doc tag "Value" has been deprecated, please use annotations on the identifier instead:
+ * Value: 10000000000UL
+ ^</message>
+ </messages>
</parser>
</test>
diff --git a/tests/scanner/annotationparser/gi/annotation_virtual.xml b/tests/scanner/annotationparser/gi/annotation_virtual.xml
index e01d9933..7439a699 100644
--- a/tests/scanner/annotationparser/gi/annotation_virtual.xml
+++ b/tests/scanner/annotationparser/gi/annotation_virtual.xml
@@ -3,8 +3,51 @@
<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test">
<test>
+ <input>/**
+ * foo_object_read: (virtual read_fn)
+ * @object: obj
+ * @offset: offset
+ * @length: length
+ *
+ * Read some stuff.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>foo_object_read</name>
+ <annotations>
+ <annotation>
+ <name>virtual</name>
+ <options>
+ <option>
+ <name>read_fn</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ </identifier>
+ <parameters>
+ <parameter>
+ <name>object</name>
+ <description>obj</description>
+ </parameter>
+ <parameter>
+ <name>offset</name>
+ <description>offset</description>
+ </parameter>
+ <parameter>
+ <name>length</name>
+ <description>length</description>
+ </parameter>
+ </parameters>
+ <description>Read some stuff.</description>
+ </docblock>
+ </parser>
+</test>
+
+<test>
<!--
- "Virtual:" tag syntax
+ Deprecated "Virtual:" tag syntax
-->
<input>/**
* foo_object_read:
@@ -20,6 +63,16 @@
<docblock>
<identifier>
<name>foo_object_read</name>
+ <annotations>
+ <annotation>
+ <name>virtual</name>
+ <options>
+ <option>
+ <name>read_fn</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
</identifier>
<parameters>
<parameter>
@@ -36,13 +89,48 @@
</parameter>
</parameters>
<description>Read some stuff.</description>
- <tags>
- <tag>
- <name>virtual</name>
- <value>read_fn</value>
- </tag>
- </tags>
</docblock>
+ <messages>
+ <message>9: Warning: Test: GObject-Introspection specific GTK-Doc tag "Virtual" has been deprecated, please use annotations on the identifier instead:
+ * Virtual: read_fn
+ ^</message>
+ </messages>
+ </parser>
+</test>
+
+<test>
+ <!--
+ Deprecated "Virtual:" tag syntax in the wrong location
+ -->
+ <input>/**
+ * foo_object_read:
+ *
+ * Virtual: read_fn
+ *
+ * Read some stuff.
+ */</input>
+ <parser>
+ <docblock>
+ <identifier>
+ <name>foo_object_read</name>
+ <annotations>
+ <annotation>
+ <name>virtual</name>
+ <options>
+ <option>
+ <name>read_fn</name>
+ </option>
+ </options>
+ </annotation>
+ </annotations>
+ </identifier>
+ <description>Read some stuff.</description>
+ </docblock>
+ <messages>
+ <message>4: Warning: Test: GObject-Introspection specific GTK-Doc tag "Virtual" has been deprecated, please use annotations on the identifier instead:
+ * Virtual: read_fn
+ ^</message>
+ </messages>
</parser>
</test>
diff --git a/tests/scanner/foo.c b/tests/scanner/foo.c
index 4d5090b6..52b9054e 100644
--- a/tests/scanner/foo.c
+++ b/tests/scanner/foo.c
@@ -285,14 +285,12 @@ regress_foo_object_dup_name (RegressFooObject *object)
}
/**
- * regress_foo_object_read:
+ * regress_foo_object_read: (virtual read_fn)
* @object: obj
* @offset: offset
* @length: length
*
* Read some stuff.
- *
- * Virtual: read_fn
*/
void
regress_foo_object_read (RegressFooObject *object, int offset, int length)
diff --git a/tests/scanner/regress.c b/tests/scanner/regress.c
index d32c52be..aa9f83a8 100644
--- a/tests/scanner/regress.c
+++ b/tests/scanner/regress.c
@@ -2455,10 +2455,7 @@ regress_test_obj_class_init (RegressTestObjClass *klass)
pspec);
/**
- * RegressTestObj:hash-table:
- *
- * Type: GLib.HashTable(utf8,gint8)
- * Transfer: container
+ * RegressTestObj:hash-table: (type GLib.HashTable(utf8,gint8)) (transfer container)
*/
pspec = g_param_spec_boxed ("hash-table",
"GHashTable property",
@@ -2470,10 +2467,7 @@ regress_test_obj_class_init (RegressTestObjClass *klass)
pspec);
/**
- * RegressTestObj:list:
- *
- * Type: GLib.List(utf8)
- * Transfer: none
+ * RegressTestObj:list: (type GLib.List(utf8)) (transfer none)
*/
pspec = g_param_spec_pointer ("list",
"GList property",
@@ -2484,10 +2478,7 @@ regress_test_obj_class_init (RegressTestObjClass *klass)
pspec);
/**
- * RegressTestObj:hash-table-old:
- *
- * Type: GLib.HashTable<utf8,gint8>
- * Transfer: container
+ * RegressTestObj:hash-table-old: (type GLib.HashTable<utf8,gint8>) (transfer container)
*/
pspec = g_param_spec_boxed ("hash-table-old",
"GHashTable property with <>",
@@ -2499,10 +2490,7 @@ regress_test_obj_class_init (RegressTestObjClass *klass)
pspec);
/**
- * RegressTestObj:list-old:
- *
- * Type: GLib.List<utf8>
- * Transfer: none
+ * RegressTestObj:list-old: (type GLib.List<utf8>) (transfer none)
*/
pspec = g_param_spec_pointer ("list-old",
"GList property with ()",
@@ -2923,15 +2911,13 @@ regress_test_obj_skip_inout_param (RegressTestObj *obj,
}
/**
- * regress_test_obj_do_matrix:
+ * regress_test_obj_do_matrix: (virtual matrix)
* @obj: A #RegressTestObj
* @somestr: Meaningless string
*
* This method is virtual. Notably its name differs from the virtual
* slot name, which makes it useful for testing bindings handle this
* case.
- *
- * Virtual: matrix
*/
int
regress_test_obj_do_matrix (RegressTestObj *obj, const char *somestr)
@@ -3181,12 +3167,7 @@ regress_test_fundamental_object_init (GTypeInstance * instance, gpointer klass)
}
/**
- * RegressTestFundamentalObject:
- *
- * Ref Func: regress_test_fundamental_object_ref
- * Unref Func: regress_test_fundamental_object_unref
- * Set Value Func: regress_test_value_set_fundamental_object
- * Get Value Func: regress_test_value_get_fundamental_object
+ * RegressTestFundamentalObject: (ref-func regress_test_fundamental_object_ref) (unref-func regress_test_fundamental_object_unref) (set-value-func regress_test_value_set_fundamental_object) (get-value-func regress_test_value_get_fundamental_object)
*/
GType