Commit 4bdcd7a3 authored by Christian Persch's avatar Christian Persch

widget: Add nullable annotations

Add nullable annotations to functions returning a char* that may
be nullptr. (vte_terminal_get_window_title() actually doesn't ever
return nullptr in 0.53 but may have before, and it may do so again,
so add the annoation on it, too.)

#21
parent 3a36e1da
...@@ -3613,9 +3613,9 @@ vte_terminal_set_delete_binding(VteTerminal *terminal, ...@@ -3613,9 +3613,9 @@ vte_terminal_set_delete_binding(VteTerminal *terminal,
* @terminal: a #VteTerminal * @terminal: a #VteTerminal
* *
* Determines the name of the encoding in which the terminal expects data to be * Determines the name of the encoding in which the terminal expects data to be
* encoded. * encoded, or %NULL if UTF-8 is in use.
* *
* Returns: (transfer none): the current encoding for the terminal * Returns: (nullable) (transfer none): the current encoding for the terminal
* *
* Deprecated: 0.54: Support for non-UTF-8 is deprecated. * Deprecated: 0.54: Support for non-UTF-8 is deprecated.
*/ */
...@@ -3934,14 +3934,13 @@ vte_terminal_get_has_selection(VteTerminal *terminal) ...@@ -3934,14 +3934,13 @@ vte_terminal_get_has_selection(VteTerminal *terminal)
* vte_terminal_get_icon_title: * vte_terminal_get_icon_title:
* @terminal: a #VteTerminal * @terminal: a #VteTerminal
* *
* Returns: (transfer none): %NULL * Returns: (nullable) (transfer none): %NULL
* *
* Deprecated: 0.54: * Deprecated: 0.54:
*/ */
const char * const char *
vte_terminal_get_icon_title(VteTerminal *terminal) vte_terminal_get_icon_title(VteTerminal *terminal)
{ {
g_return_val_if_fail(VTE_IS_TERMINAL(terminal), "");
return nullptr; return nullptr;
} }
...@@ -4222,12 +4221,12 @@ vte_terminal_get_scroll_on_output(VteTerminal *terminal) ...@@ -4222,12 +4221,12 @@ vte_terminal_get_scroll_on_output(VteTerminal *terminal)
* vte_terminal_get_window_title: * vte_terminal_get_window_title:
* @terminal: a #VteTerminal * @terminal: a #VteTerminal
* *
* Returns: (transfer none): the window title * Returns: (nullable) (transfer none): the window title, or %NULL
*/ */
const char * const char *
vte_terminal_get_window_title(VteTerminal *terminal) vte_terminal_get_window_title(VteTerminal *terminal)
{ {
g_return_val_if_fail(VTE_IS_TERMINAL(terminal), ""); g_return_val_if_fail(VTE_IS_TERMINAL(terminal), nullptr);
return IMPL(terminal)->m_window_title.data(); return IMPL(terminal)->m_window_title.data();
} }
...@@ -4241,7 +4240,7 @@ vte_terminal_get_window_title(VteTerminal *terminal) ...@@ -4241,7 +4240,7 @@ vte_terminal_get_window_title(VteTerminal *terminal)
* *
* If %NULL, a built-in set is used. * If %NULL, a built-in set is used.
* *
* Returns: (transfer none): a string, or %NULL * Returns: (nullable) (transfer none): a string, or %NULL
* *
* Since: 0.40 * Since: 0.40
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment