[gi-docgen] template: Clarify nullable inout/out callable arguments



commit 0d79aeeee52089ff7846a8fe946cb93c725a340c
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Fri Aug 12 23:12:27 2022 +0100

    template: Clarify nullable inout/out callable arguments
    
    A nullable inout/out argument can be set to NULL by the callee. Right
    now, it makes it look like the argument can be set to NULL by the
    caller.

 gidocgen/templates/basic/class_method.html | 2 +-
 gidocgen/templates/basic/ctor.html         | 2 +-
 gidocgen/templates/basic/function.html     | 2 +-
 gidocgen/templates/basic/method.html       | 2 +-
 gidocgen/templates/basic/signal.html       | 2 +-
 gidocgen/templates/basic/type_func.html    | 2 +-
 gidocgen/templates/basic/vfunc.html        | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/gidocgen/templates/basic/class_method.html b/gidocgen/templates/basic/class_method.html
index 4cde111..436a321 100644
--- a/gidocgen/templates/basic/class_method.html
+++ b/gidocgen/templates/basic/class_method.html
@@ -113,7 +113,7 @@
             <table>
             {% if arg.direction != "in" %}<tr><td title="direction: {{ arg.direction}}">{{ 
arg.direction_note }}</td></tr>{% endif %}
             {% if arg.direction == "in" and arg.nullable %}<tr><td>The argument can be 
<code>NULL</code>.</td></tr>{% endif %}
-            {% if arg.direction in ["inout", "out"] and arg.nullable %}<tr><td>The argument can be set to 
<code>NULL</code>.</td></tr>{% endif %}
+            {% if arg.direction in ["inout", "out"] and arg.nullable %}<tr><td>The argument can be set to 
<code>NULL</code> by the class method</td></tr>{% endif %}
             {% if arg.optional %}<tr><td>The argument can be <code>NULL</code>.</td></tr>{% endif %}
             {% if arg.is_array and arg.zero_terminated %}<tr><td>The array must be 
<code>NULL</code>-terminated.</td></tr>{% endif %}
             {% if arg.is_array and arg.fixed_size > 0 %}<tr><td>The array must have {{ arg.fixed_size }} 
elements.</td></tr>{% endif %}
diff --git a/gidocgen/templates/basic/ctor.html b/gidocgen/templates/basic/ctor.html
index 13def57..bc06bc6 100644
--- a/gidocgen/templates/basic/ctor.html
+++ b/gidocgen/templates/basic/ctor.html
@@ -115,7 +115,7 @@
             <table>
             {% if arg.direction != "in" %}<tr><td title="direction: {{ arg.direction}}">{{ 
arg.direction_note }}</td></tr>{% endif %}
             {% if arg.direction == "in" and arg.nullable %}<tr><td>The argument can be 
<code>NULL</code>.</td></tr>{% endif %}
-            {% if arg.direction in ["inout", "out"] and arg.nullable %}<tr><td>The argument can be set to 
<code>NULL</code>.</td></tr>{% endif %}
+            {% if arg.direction in ["inout", "out"] and arg.nullable %}<tr><td>The argument can be set to 
<code>NULL</code> by the constructor.</td></tr>{% endif %}
             {% if arg.optional %}<tr><td>The argument can be <code>NULL</code>.</td></tr>{% endif %}
             {% if arg.is_array and arg.zero_terminated %}<tr><td>The array must be 
<code>NULL</code>-terminated.</td></tr>{% endif %}
             {% if arg.is_array and arg.fixed_size > 0 %}<tr><td>The array must have {{ arg.fixed_size }} 
elements.</td></tr>{% endif %}
diff --git a/gidocgen/templates/basic/function.html b/gidocgen/templates/basic/function.html
index 4c9db8b..3bfdc0e 100644
--- a/gidocgen/templates/basic/function.html
+++ b/gidocgen/templates/basic/function.html
@@ -126,7 +126,7 @@
             <table>
             {% if arg.direction != "in" %}<tr><td title="direction: {{ arg.direction}}">{{ 
arg.direction_note }}</td></tr>{% endif %}
             {% if arg.direction == "in" and arg.nullable %}<tr><td>The argument can be 
<code>NULL</code>.</td></tr>{% endif %}
-            {% if arg.direction in ["inout", "out"] and arg.nullable %}<tr><td>The argument can be set to 
<code>NULL</code>.</td></tr>{% endif %}
+            {% if arg.direction in ["inout", "out"] and arg.nullable %}<tr><td>The argument can be set to 
<code>NULL</code> by the function.</td></tr>{% endif %}
             {% if arg.optional %}<tr><td>The argument can be <code>NULL</code>.</td></tr>{% endif %}
             {% if arg.is_array and arg.zero_terminated %}<tr><td>The array must be 
<code>NULL</code>-terminated.</td></tr>{% endif %}
             {% if arg.is_array and arg.fixed_size > 0 %}<tr><td>The array must have {{ arg.fixed_size }} 
elements.</td></tr>{% endif %}
diff --git a/gidocgen/templates/basic/method.html b/gidocgen/templates/basic/method.html
index fdd3cef..cbd1894 100644
--- a/gidocgen/templates/basic/method.html
+++ b/gidocgen/templates/basic/method.html
@@ -121,7 +121,7 @@
             <table>
             {% if arg.direction != "in" %}<tr><td title="direction: {{ arg.direction}}">{{ 
arg.direction_note }}</td></tr>{% endif %}
             {% if arg.direction == "in" and arg.nullable %}<tr><td>The argument can be 
<code>NULL</code>.</td></tr>{% endif %}
-            {% if arg.direction in ["inout", "out"] and arg.nullable %}<tr><td>The argument can be set to 
<code>NULL</code>.</td></tr>{% endif %}
+            {% if arg.direction in ["inout", "out"] and arg.nullable %}<tr><td>The argument can be set to 
<code>NULL</code> by the method.</td></tr>{% endif %}
             {% if arg.optional %}<tr><td>The argument can be <code>NULL</code>.</td></tr>{% endif %}
             {% if arg.is_array and arg.zero_terminated %}<tr><td>The array must be 
<code>NULL</code>-terminated.</td></tr>{% endif %}
             {% if arg.is_array and arg.fixed_size > 0 %}<tr><td>The array must have {{ arg.fixed_size }} 
elements.</td></tr>{% endif %}
diff --git a/gidocgen/templates/basic/signal.html b/gidocgen/templates/basic/signal.html
index 90e2c9a..b8eb801 100644
--- a/gidocgen/templates/basic/signal.html
+++ b/gidocgen/templates/basic/signal.html
@@ -122,7 +122,7 @@
             <table>
             {% if arg.direction != "in" %}<tr><td title="direction: {{ arg.direction}}">{{ 
arg.direction_note }}</td></tr>{% endif %}
             {% if arg.direction == "in" and arg.nullable %}<tr><td>The argument can be 
<code>NULL</code>.</td></tr>{% endif %}
-            {% if arg.direction in ["inout", "out"] and arg.nullable %}<tr><td>The argument can be set to 
<code>NULL</code>.</td></tr>{% endif %}
+            {% if arg.direction in ["inout", "out"] and arg.nullable %}<tr><td>The argument can be set to 
<code>NULL</code> by the signal handler.</td></tr>{% endif %}
             {% if arg.optional %}<tr><td>The argument can be <code>NULL</code>.</td></tr>{% endif %}
             {% if arg.is_array and arg.zero_terminated %}<tr><td>The array must be 
<code>NULL</code>-terminated.</td></tr>{% endif %}
             {% if arg.is_array and arg.fixed_size > 0 %}<tr><td>The array must have {{ arg.fixed_size }} 
elements.</td></tr>{% endif %}
diff --git a/gidocgen/templates/basic/type_func.html b/gidocgen/templates/basic/type_func.html
index f1b9bc1..dc57c9e 100644
--- a/gidocgen/templates/basic/type_func.html
+++ b/gidocgen/templates/basic/type_func.html
@@ -112,7 +112,7 @@
             <table>
             {% if arg.direction != "in" %}<tr><td title="direction: {{ arg.direction}}">{{ 
arg.direction_note }}</td></tr>{% endif %}
             {% if arg.direction == "in" and arg.is_pointer and arg.nullable %}<tr><td>The argument can be 
<code>NULL</code>.</td></tr>{% endif %}
-            {% if arg.direction == "out" and arg.is_pointer and arg.nullable %}<tr><td>The argument can be 
set to <code>NULL</code>.</td></tr>{% endif %}
+            {% if arg.direction == "out" and arg.is_pointer and arg.nullable %}<tr><td>The argument can be 
set to <code>NULL</code> by the function.</td></tr>{% endif %}
             {% if arg.optional %}<tr><td>The argument can be <code>NULL</code>.</td></tr>{% endif %}
             {% if arg.is_array and arg.zero_terminated %}<tr><td>The array must be 
<code>NULL</code>-terminated.</td></tr>{% endif %}
             {% if arg.is_array and arg.fixed_size > 0 %}<tr><td>The array must have {{ arg.fixed_size }} 
elements.</td></tr>{% endif %}
diff --git a/gidocgen/templates/basic/vfunc.html b/gidocgen/templates/basic/vfunc.html
index 2a7eb8b..8b8c30d 100644
--- a/gidocgen/templates/basic/vfunc.html
+++ b/gidocgen/templates/basic/vfunc.html
@@ -112,7 +112,7 @@
             <table>
             {% if arg.direction != "in" %}<tr><td title="direction: {{ arg.direction}}">{{ 
arg.direction_note }}</td></tr>{% endif %}
             {% if arg.direction == "in" and arg.is_pointer and arg.nullable %}<tr><td>The argument can be 
<code>NULL</code>.</td></tr>{% endif %}
-            {% if arg.direction == "out" and arg.is_pointer and arg.nullable %}<tr><td>The argument can be 
set to <code>NULL</code>.</td></tr>{% endif %}
+            {% if arg.direction == "out" and arg.is_pointer and arg.nullable %}<tr><td>The argument can be 
set to <code>NULL</code> by the virtual function.</td></tr>{% endif %}
             {% if arg.optional %}<tr><td>The argument can be <code>NULL</code>.</td></tr>{% endif %}
             {% if arg.is_array and arg.zero_terminated %}<tr><td>The array must be 
<code>NULL</code>-terminated.</td></tr>{% endif %}
             {% if arg.is_array and arg.fixed_size > 0 %}<tr><td>The array must have {{ arg.fixed_size }} 
elements.</td></tr>{% endif %}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]