From 5e7c51260948a0c10ab52e6a670bc707efd15701 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Sat, 14 Oct 2023 18:48:43 +0100 Subject: [PATCH] docs: Fix various invalid links --- glib/gdate.c | 34 +++++++++------------------------- glib/gdatetime.h | 2 +- glib/gkeyfile.c | 1 - glib/gpattern.c | 6 +++--- glib/gstringchunk.c | 8 ++++---- glib/gthreadpool.c | 10 +++++----- glib/gtimezone.c | 4 ++-- glib/gtree.c | 2 +- 8 files changed, 25 insertions(+), 42 deletions(-) diff --git a/glib/gdate.c b/glib/gdate.c index 11d852ce5..09872db0a 100644 --- a/glib/gdate.c +++ b/glib/gdate.c @@ -61,6 +61,14 @@ /** * GDate: + * @julian_days: the Julian representation of the date + * @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 + * @month: the day of the day-month-year representation of the date, + * as a number between 1 and 12 + * @year: the day of the day-month-year representation of the date * * `GDate` is a struct for calendrical calculations. * @@ -85,7 +93,7 @@ * Julian period, Jan 1, 4713 BC). * * `GDate` is simple to use. First you need a "blank" date; you can get a - * dynamically allocated date from [method@GLib.Date.new], or you can declare an + * dynamically allocated date from [ctor@GLib.Date.new], or you can declare an * automatic variable or array and initialize it by calling [method@GLib.Date.clear]. * A cleared date is safe; it's safe to call [method@GLib.Date.set_dmy] and the other * mutator functions to initialize the value of a cleared date. However, a cleared date @@ -129,30 +137,6 @@ * Deprecated: 2.62: Use #GDateTime or #guint64 instead. */ -/** - * GDate: - * @julian_days: the Julian representation of the date - * @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 - * @month: the day of the day-month-year representation of the date, - * 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` 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 - * initialized with g_date_clear(). g_date_clear() makes the date invalid - * but safe. An invalid date doesn't represent a day, it's "empty." A date - * becomes valid after you set it to a Julian day or you set a day, month, - * and year. - */ - /** * GTime: * diff --git a/glib/gdatetime.h b/glib/gdatetime.h index b257b057f..95614f50c 100644 --- a/glib/gdatetime.h +++ b/glib/gdatetime.h @@ -106,7 +106,7 @@ typedef gint64 GTimeSpan; * of range, in which case %NULL will be returned. * * `GDateTime` is reference counted: the reference count is increased by calling - * [metohd@GLib.DateTime.ref] and decreased by calling [method@GLib.DateTime.unref]. + * [method@GLib.DateTime.ref] and decreased by calling [method@GLib.DateTime.unref]. * When the reference count drops to 0, the resources allocated by the `GDateTime` * structure are released. * diff --git a/glib/gkeyfile.c b/glib/gkeyfile.c index f4252b7c0..637ac9c15 100644 --- a/glib/gkeyfile.c +++ b/glib/gkeyfile.c @@ -102,7 +102,6 @@ * Welcome[de]=Hallo * Welcome[fr_FR]=Bonjour * Welcome[it]=Ciao - * Welcome[be@latin]=Hello * * [Another Group] * diff --git a/glib/gpattern.c b/glib/gpattern.c index b0045059c..bf61da36f 100644 --- a/glib/gpattern.c +++ b/glib/gpattern.c @@ -35,7 +35,7 @@ * * A `GPatternSpec` struct is the 'compiled' form of a glob-style pattern. * - * The [func@g_pattern_match_simple] and [method@GLib.PatternSpec.match] functions + * The [func@GLib.pattern_match_simple] and [method@GLib.PatternSpec.match] functions * match a string against a pattern containing '*' and '?' wildcards with similar * semantics as the standard `glob()` function: '*' matches an arbitrary, * possibly empty, string, '?' matches an arbitrary character. @@ -46,8 +46,8 @@ * * When multiple strings must be matched against the same pattern, it is better * to compile the pattern to a [struct@GLib.PatternSpec] using - * [method@GLib.PatternSpec.new] and use [method@GLib.PatternSpec.match_string] - * instead of [func@g_pattern_match_simple]. This avoids the overhead of repeated + * [ctor@GLib.PatternSpec.new] and use [method@GLib.PatternSpec.match_string] + * instead of [func@GLib.pattern_match_simple]. This avoids the overhead of repeated * pattern compilation. */ diff --git a/glib/gstringchunk.c b/glib/gstringchunk.c index 7e131e6f7..fb9514623 100644 --- a/glib/gstringchunk.c +++ b/glib/gstringchunk.c @@ -52,20 +52,20 @@ * is full a new block is allocated. * * When storing a large number of strings, string chunks are more - * efficient than using [func@g_strdup] since fewer calls to `malloc()` + * efficient than using [func@GLib.strdup] since fewer calls to `malloc()` * are needed, and less memory is wasted in memory allocation overheads. * * By adding strings with [method@GLib.StringChunk.insert_const] it is also * possible to remove duplicates. * - * To create a new `GStringChunk` use [method@GLib.StringChunk.new]. + * To create a new `GStringChunk` use [func@GLib.StringChunk.new]. * - * To add strings to a `GStringChunk` use [method@GLib.Stringchunk.insert]. + * To add strings to a `GStringChunk` use [method@GLib.StringChunk.insert]. * * To add strings to a `GStringChunk`, but without duplicating strings * which are already in the `GStringChunk`, use [method@GLib.StringChunk.insert_const]. * - * To free the entire `GStringChunk` use [method@GLib.Stringchunk.free]. + * To free the entire `GStringChunk` use [method@GLib.StringChunk.free]. * It is not possible to free individual strings. */ diff --git a/glib/gthreadpool.c b/glib/gthreadpool.c index 15e3737c2..6ca051e79 100644 --- a/glib/gthreadpool.c +++ b/glib/gthreadpool.c @@ -59,7 +59,7 @@ typedef struct _GRealThreadPool GRealThreadPool; * Therefore GLib provides thread pools for your convenience. An added advantage is, that the * threads can be shared between the different subsystems of your program, when they are using GLib. * - * To create a new thread pool, you use [method@GLib.ThreadPool.new]. + * To create a new thread pool, you use [func@GLib.ThreadPool.new]. * It is destroyed by [method@GLib.ThreadPool.free]. * * If you want to execute a certain task within a thread pool, use [method@GLib.ThreadPool.push]. @@ -70,10 +70,10 @@ typedef struct _GRealThreadPool GRealThreadPool; * [method@GLib.ThreadPool.get_max_threads]. and [method@GLib.ThreadPool.set_max_threads]. * * Finally you can control the number of unused threads, that are kept alive by GLib for future use. - * The current number can be fetched with [method@GLib.ThreadPool.get_num_unused_threads]. - * The maximum number can be controlled by [method@GLib.ThreadPool.get_max_unused_threads] and - * [method@GLib.ThreadPool.set_max_unused_threads]. All currently unused threads - * can be stopped by calling [method@GLib.ThreadPool.stop_unused_threads()]. + * The current number can be fetched with [func@GLib.ThreadPool.get_num_unused_threads]. + * The maximum number can be controlled by [func@GLib.ThreadPool.get_max_unused_threads] and + * [func@GLib.ThreadPool.set_max_unused_threads]. All currently unused threads + * can be stopped by calling [func@GLib.ThreadPool.stop_unused_threads]. */ struct _GRealThreadPool { diff --git a/glib/gtimezone.c b/glib/gtimezone.c index e64528a0a..0c3cae3f7 100644 --- a/glib/gtimezone.c +++ b/glib/gtimezone.c @@ -60,7 +60,7 @@ * The `GTimeZone` struct is refcounted and immutable. * * Each time zone has an identifier (for example, ‘Europe/London’) which is - * platform dependent. See [method@GLib.TimeZone.new] for information on the + * platform dependent. See [ctor@GLib.TimeZone.new] for information on the * identifier formats. The identifier of a time zone can be retrieved using * [method@GLib.TimeZone.get_identifier]. * @@ -69,7 +69,7 @@ * if the daylight savings time is in effect during that interval. A time zone * always has at least one interval — interval 0. Note that interval abbreviations * are not the same as time zone identifiers (apart from ‘UTC’), and cannot be - * passed to [method@GLib.TimeZone.new]. + * passed to [ctor@GLib.TimeZone.new]. * * Every UTC time is contained within exactly one interval, but a given * local time may be contained within zero, one or two intervals (due to diff --git a/glib/gtree.c b/glib/gtree.c index 1b63d10a9..f7b6fce22 100644 --- a/glib/gtree.c +++ b/glib/gtree.c @@ -120,7 +120,7 @@ g_tree_node_new (gpointer key, } /** - * g_tree_new: + * g_tree_new: (constructor) * @key_compare_func: the function used to order the nodes in the #GTree. * It should return values similar to the standard strcmp() function - * 0 if the two arguments are equal, a negative value if the first argument