summaryrefslogtreecommitdiff
path: root/gtksourceview
diff options
context:
space:
mode:
authorPaolo Borelli <pborelli@gnome.org>2015-08-16 10:13:14 +0200
committerPaolo Borelli <pborelli@gnome.org>2015-08-16 10:18:14 +0200
commit4a67b42fe6b70963415c0c63da7cb4d22d6be0e9 (patch)
tree322afefd9aa3d76ea06982a3c51e41ecdd3877c2 /gtksourceview
parentac48c29562ccee45cd876f277a83ec4b8e52d52d (diff)
downloadgtksourceview-4a67b42fe6b70963415c0c63da7cb4d22d6be0e9.tar.gz
Add nullable annotations
Diffstat (limited to 'gtksourceview')
-rw-r--r--gtksourceview/gtksourcebuffer.c7
-rw-r--r--gtksourceview/gtksourcecompletion.c2
-rw-r--r--gtksourceview/gtksourcecompletionproposal.c5
-rw-r--r--gtksourceview/gtksourcefileloader.c8
-rw-r--r--gtksourceview/gtksourcegutter.c2
-rw-r--r--gtksourceview/gtksourcelanguage.c36
-rw-r--r--gtksourceview/gtksourcelanguagemanager.c10
-rw-r--r--gtksourceview/gtksourcestyleschememanager.c6
8 files changed, 40 insertions, 36 deletions
diff --git a/gtksourceview/gtksourcebuffer.c b/gtksourceview/gtksourcebuffer.c
index c6c7bf04..2a5cc496 100644
--- a/gtksourceview/gtksourcebuffer.c
+++ b/gtksourceview/gtksourcebuffer.c
@@ -1619,7 +1619,8 @@ gtk_source_buffer_set_language (GtkSourceBuffer *buffer,
* see gtk_source_buffer_set_language(). The returned object should not be
* unreferenced by the user.
*
- * Returns: (transfer none): the #GtkSourceLanguage associated with the buffer, or %NULL.
+ * Returns: (nullable) (transfer none): the #GtkSourceLanguage associated
+ * with the buffer, or %NULL.
*/
GtkSourceLanguage *
gtk_source_buffer_get_language (GtkSourceBuffer *buffer)
@@ -1738,8 +1739,8 @@ gtk_source_buffer_set_style_scheme (GtkSourceBuffer *buffer,
* see gtk_source_buffer_set_style_scheme().
* The returned object should not be unreferenced by the user.
*
- * Returns: (transfer none): the #GtkSourceStyleScheme associated
- * with the buffer, or %NULL.
+ * Returns: (nullable) (transfer none): the #GtkSourceStyleScheme
+ * associated with the buffer, or %NULL.
*/
GtkSourceStyleScheme *
gtk_source_buffer_get_style_scheme (GtkSourceBuffer *buffer)
diff --git a/gtksourceview/gtksourcecompletion.c b/gtksourceview/gtksourcecompletion.c
index 65fd3e83..76c7b502 100644
--- a/gtksourceview/gtksourcecompletion.c
+++ b/gtksourceview/gtksourcecompletion.c
@@ -2949,7 +2949,7 @@ gtk_source_completion_get_info_window (GtkSourceCompletion *completion)
* The #GtkSourceView associated with @completion, or %NULL if the view has been
* destroyed.
*
- * Returns: (type GtkSource.View) (transfer none):
+ * Returns: (type GtkSource.View) (nullable) (transfer none):
* The #GtkSourceView associated with @completion, or %NULL.
*/
GtkSourceView *
diff --git a/gtksourceview/gtksourcecompletionproposal.c b/gtksourceview/gtksourcecompletionproposal.c
index cb09ef85..b79f55c6 100644
--- a/gtksourceview/gtksourcecompletionproposal.c
+++ b/gtksourceview/gtksourcecompletionproposal.c
@@ -266,8 +266,9 @@ gtk_source_completion_proposal_get_gicon (GtkSourceCompletionProposal *proposal)
* used to present the user with extra, detailed information about the
* selected proposal. The returned string must be freed with g_free().
*
- * Returns: a new string containing extra information of @proposal or %NULL if
- * no extra information is associated to @proposal.
+ * Returns: (nullable) (transfer full): a newly-allocated string containing
+ * extra information of @proposal or %NULL if no extra information is associated
+ * to @proposal.
*/
gchar *
gtk_source_completion_proposal_get_info (GtkSourceCompletionProposal *proposal)
diff --git a/gtksourceview/gtksourcefileloader.c b/gtksourceview/gtksourcefileloader.c
index a65889b3..5c6af723 100644
--- a/gtksourceview/gtksourcefileloader.c
+++ b/gtksourceview/gtksourcefileloader.c
@@ -955,8 +955,8 @@ gtk_source_file_loader_get_file (GtkSourceFileLoader *loader)
* gtk_source_file_loader_get_location:
* @loader: a #GtkSourceFileLoader.
*
- * Returns: (transfer none): the #GFile to load, or %NULL if an input stream is
- * used.
+ * Returns: (nullable) (transfer none): the #GFile to load, or %NULL
+ * if an input stream is used.
* Since: 3.14
*/
GFile *
@@ -971,8 +971,8 @@ gtk_source_file_loader_get_location (GtkSourceFileLoader *loader)
* gtk_source_file_loader_get_input_stream:
* @loader: a #GtkSourceFileLoader.
*
- * Returns: (transfer none): the #GInputStream to load, or %NULL if a #GFile is
- * used.
+ * Returns: (nullabe) (transfer none): the #GInputStream to load, or %NULL
+ * if a #GFile is used.
* Since: 3.14
*/
GInputStream *
diff --git a/gtksourceview/gtksourcegutter.c b/gtksourceview/gtksourcegutter.c
index 9b8d2cc0..e16272a7 100644
--- a/gtksourceview/gtksourcegutter.c
+++ b/gtksourceview/gtksourcegutter.c
@@ -1713,7 +1713,7 @@ gtk_source_gutter_get_padding (GtkSourceGutter *gutter,
*
* Finds the #GtkSourceGutterRenderer at (x, y).
*
- * Returns: (transfer none): the renderer at (x, y) or %NULL.
+ * Returns: (nullable) (transfer none): the renderer at (x, y) or %NULL.
*/
/* FIXME: to insert a renderer in a gutter, only one position is needed. Here to
* retrieve a renderer, two positions are needed? Document why.
diff --git a/gtksourceview/gtksourcelanguage.c b/gtksourceview/gtksourcelanguage.c
index 68d0df2e..bda8ee64 100644
--- a/gtksourceview/gtksourcelanguage.c
+++ b/gtksourceview/gtksourcelanguage.c
@@ -548,8 +548,9 @@ gtk_source_language_get_hidden (GtkSourceLanguage *language)
* @language: a #GtkSourceLanguage.
* @name: metadata property name.
*
- * Returns: value of property @name stored in the metadata of @language
- * or %NULL if language doesn't contain that metadata property.
+ * Returns: (nullable) (transfer none): value of property @name stored in
+ * the metadata of @language or %NULL if language does not contain the
+ * specified metadata property.
* The returned string is owned by @language and should not be freed
* or modified.
**/
@@ -572,9 +573,9 @@ gtk_source_language_get_metadata (GtkSourceLanguage *language,
* retrieve the "mimetypes" metadata property and split it into an
* array.
*
- * Returns: (array zero-terminated=1) (transfer full): a newly-allocated
- * %NULL terminated array containing the mime types or %NULL if no
- * mime types are found.
+ * Returns: (nullable) (array zero-terminated=1) (transfer full):
+ * a newly-allocated %NULL terminated array containing the mime types
+ * or %NULL if no mime types are found.
* The returned array must be freed with g_strfreev().
**/
gchar **
@@ -599,8 +600,9 @@ gtk_source_language_get_mime_types (GtkSourceLanguage *language)
* an utility wrapper around gtk_source_language_get_metadata() to
* retrieve the "globs" metadata property and split it into an array.
*
- * Returns: (array zero-terminated=1) (transfer full): a newly-allocated
- * %NULL terminated array containing the globs or %NULL if no globs are found.
+ * Returns: (nullable) (array zero-terminated=1) (transfer full):
+ * a newly-allocated %NULL terminated array containing the globs or %NULL
+ * if no globs are found.
* The returned array must be freed with g_strfreev().
**/
gchar **
@@ -833,9 +835,9 @@ force_styles (GtkSourceLanguage *language)
*
* Returns the ids of the styles defined by this @language.
*
- * Returns: (array zero-terminated=1) (transfer full): a %NULL terminated
- * array containing ids of the styles defined by this @language or
- * %NULL if no style is defined.
+ * Returns: (nullable) (array zero-terminated=1) (transfer full):
+ * a newly-allocated %NULL terminated array containing ids of the
+ * styles defined by this @language or %NULL if no style is defined.
* The returned array must be freed with g_strfreev().
*/
gchar **
@@ -872,10 +874,10 @@ get_style_info (GtkSourceLanguage *language, const char *style_id)
*
* Returns the name of the style with ID @style_id defined by this @language.
*
- * Returns: the name of the style with ID @style_id defined by this @language or
- * %NULL if the style has no name or there is no style with ID @style_id defined
- * by this @language. The returned string is owned by the @language and must
- * not be modified.
+ * Returns: (nullable) (transfer none): the name of the style with ID @style_id
+ * defined by this @language or %NULL if the style has no name or there is no
+ * style with ID @style_id defined by this @language.
+ * The returned string is owned by the @language and must not be modified.
*/
const gchar *
gtk_source_language_get_style_name (GtkSourceLanguage *language,
@@ -900,9 +902,9 @@ gtk_source_language_get_style_name (GtkSourceLanguage *language,
* Returns the ID of the style to use if the specified @style_id
* is not present in the current style scheme.
*
- * Returns: the ID of the style to use if the specified @style_id
- * is not present in the current style scheme or %NULL if the style has
- * no fallback defined.
+ * Returns: (nullable) (transfer none): the ID of the style to use if the
+ * specified @style_id is not present in the current style scheme or %NULL
+ * if the style has no fallback defined.
* The returned string is owned by the @language and must not be modified.
*
* Since: 3.4
diff --git a/gtksourceview/gtksourcelanguagemanager.c b/gtksourceview/gtksourcelanguagemanager.c
index 0481e5fe..e5abb828 100644
--- a/gtksourceview/gtksourcelanguagemanager.c
+++ b/gtksourceview/gtksourcelanguagemanager.c
@@ -404,11 +404,11 @@ ensure_languages (GtkSourceLanguageManager *lm)
*
* Returns the ids of the available languages.
*
- * Returns: (nullable) (transfer none): a %NULL-terminated array of
- * string containing the ids of the available languages or %NULL if no
- * language is available. The array is sorted alphabetically
- * according to the language name. The array is owned by @lm and must
- * not be modified.
+ * Returns: (nullable) (array zero-terminated=1) (transfer none):
+ * a %NULL-terminated array of strings containing the ids of the available
+ * languages or %NULL if no language is available.
+ * The array is sorted alphabetically according to the language name.
+ * The array is owned by @lm and must not be modified.
*/
const gchar * const *
gtk_source_language_manager_get_language_ids (GtkSourceLanguageManager *lm)
diff --git a/gtksourceview/gtksourcestyleschememanager.c b/gtksourceview/gtksourcestyleschememanager.c
index 68f4c0c7..81c64b87 100644
--- a/gtksourceview/gtksourcestyleschememanager.c
+++ b/gtksourceview/gtksourcestyleschememanager.c
@@ -541,9 +541,9 @@ gtk_source_style_scheme_manager_force_rescan (GtkSourceStyleSchemeManager *manag
*
* Returns the ids of the available style schemes.
*
- * Returns: (array zero-terminated=1) (transfer none): a %NULL-terminated array
- * of string containing the ids of the available style schemes or %NULL if no
- * style scheme is available.
+ * Returns: (nullable) (array zero-terminated=1) (transfer none):
+ * a %NULL-terminated array of strings containing the ids of the available
+ * style schemes or %NULL if no style scheme is available.
* The array is sorted alphabetically according to the scheme name.
* The array is owned by the @manager and must not be modified.
*/