[gi-docgen/issue-117: 2/2] template: Don't check for pointer when nullables will do




commit 425b7d8dbbb80aa973854100787c8bf7d47fb87a
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Mon Nov 15 14:31:28 2021 +0000

    template: Don't check for pointer when nullables will do
    
    A nullable argument is, by definition, already a pointer argument; we
    don't need to check for additional pointers.

 gidocgen/templates/basic/class_method.html | 4 ++--
 gidocgen/templates/basic/function.html     | 4 ++--
 gidocgen/templates/basic/method.html       | 4 ++--
 gidocgen/templates/basic/signal.html       | 4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/gidocgen/templates/basic/class_method.html b/gidocgen/templates/basic/class_method.html
index 51d1148..7119bca 100644
--- a/gidocgen/templates/basic/class_method.html
+++ b/gidocgen/templates/basic/class_method.html
@@ -118,8 +118,8 @@ SPDX-License-Identifier: Apache-2.0 OR GPL-3.0-or-later
             <td>{{ arg.description|safe }}</td>
           </tr>
           {% if arg.direction != "in" %}<tr><td>&nbsp;</td><td title="direction: {{ arg.direction}}">{{ 
arg.direction_note }}</td></tr>{% endif %}
-          {% if arg.direction == "in" and arg.is_pointer and arg.nullable %}<tr><td>&nbsp;</td><td>The 
argument can be <code>NULL</code>.</td></tr>{% endif %}
-          {% if arg.direction == "out" and arg.is_pointer and arg.nullable %}<tr><td>&nbsp;</td><td>The 
argument can be set to <code>NULL</code>.</td></tr>{% endif %}
+          {% if arg.direction == "in" and arg.nullable %}<tr><td>&nbsp;</td><td>The argument can be 
<code>NULL</code>.</td></tr>{% endif %}
+          {% if arg.direction == "out" and arg.nullable %}<tr><td>&nbsp;</td><td>The argument can be set to 
<code>NULL</code>.</td></tr>{% endif %}
           {% if arg.optional %}<tr><td>&nbsp;</td><td>The argument can be <code>NULL</code>.</td></tr>{% 
endif %}
           {% if arg.is_array and arg.zero_terminated %}<tr><td>&nbsp;</td><td>The array must be 
<code>NULL</code>-terminated.</td></tr>{% endif %}
           {% if arg.is_array and arg.fixed_size > 0 %}<tr><td>&nbsp;</td><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 4f8ffcf..c1ff01d 100644
--- a/gidocgen/templates/basic/function.html
+++ b/gidocgen/templates/basic/function.html
@@ -125,8 +125,8 @@ SPDX-License-Identifier: Apache-2.0 OR GPL-3.0-or-later
             <td>{{ arg.description|safe }}</td>
           </tr>
           {% if arg.direction != "in" %}<tr><td>&nbsp;</td><td title="direction: {{ arg.direction}}">{{ 
arg.direction_note }}</td></tr>{% endif %}
-          {% if arg.direction == "in" and arg.is_pointer and arg.nullable %}<tr><td>&nbsp;</td><td>The 
argument can be <code>NULL</code>.</td></tr>{% endif %}
-          {% if arg.direction == "out" and arg.is_pointer and arg.nullable %}<tr><td>&nbsp;</td><td>The 
argument can be set to <code>NULL</code>.</td></tr>{% endif %}
+          {% if arg.direction == "in" and arg.nullable %}<tr><td>&nbsp;</td><td>The argument can be 
<code>NULL</code>.</td></tr>{% endif %}
+          {% if arg.direction == "out" and arg.nullable %}<tr><td>&nbsp;</td><td>The argument can be set to 
<code>NULL</code>.</td></tr>{% endif %}
           {% if arg.optional %}<tr><td>&nbsp;</td><td>The argument can be <code>NULL</code>.</td></tr>{% 
endif %}
           {% if arg.is_array and arg.zero_terminated %}<tr><td>&nbsp;</td><td>The array must be 
<code>NULL</code>-terminated.</td></tr>{% endif %}
           {% if arg.is_array and arg.fixed_size > 0 %}<tr><td>&nbsp;</td><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 fc8e9c2..778f180 100644
--- a/gidocgen/templates/basic/method.html
+++ b/gidocgen/templates/basic/method.html
@@ -120,8 +120,8 @@ SPDX-License-Identifier: Apache-2.0 OR GPL-3.0-or-later
             <td>{{ arg.description|safe }}</td>
           </tr>
           {% if arg.direction != "in" %}<tr><td>&nbsp;</td><td title="direction: {{ arg.direction}}">{{ 
arg.direction_note }}</td></tr>{% endif %}
-          {% if arg.direction == "in" and arg.is_pointer and arg.nullable %}<tr><td>&nbsp;</td><td>The 
argument can be <code>NULL</code>.</td></tr>{% endif %}
-          {% if arg.direction == "out" and arg.is_pointer and arg.nullable %}<tr><td>&nbsp;</td><td>The 
argument can be set to <code>NULL</code>.</td></tr>{% endif %}
+          {% if arg.direction == "in" and arg.nullable %}<tr><td>&nbsp;</td><td>The argument can be 
<code>NULL</code>.</td></tr>{% endif %}
+          {% if arg.direction == "out" and arg.nullable %}<tr><td>&nbsp;</td><td>The argument can be set to 
<code>NULL</code>.</td></tr>{% endif %}
           {% if arg.optional %}<tr><td>&nbsp;</td><td>The argument can be <code>NULL</code>.</td></tr>{% 
endif %}
           {% if arg.is_array and arg.zero_terminated %}<tr><td>&nbsp;</td><td>The array must be 
<code>NULL</code>-terminated.</td></tr>{% endif %}
           {% if arg.is_array and arg.fixed_size > 0 %}<tr><td>&nbsp;</td><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 68ef3f8..d1d7498 100644
--- a/gidocgen/templates/basic/signal.html
+++ b/gidocgen/templates/basic/signal.html
@@ -130,8 +130,8 @@ SPDX-License-Identifier: Apache-2.0 OR GPL-3.0-or-later
             <td>{{ arg.description|safe }}</td>
           </tr>
           {% if arg.direction != "in" %}<tr><td>&nbsp;</td><td title="direction: {{ arg.direction}}">{{ 
arg.direction_note }}</td></tr>{% endif %}
-          {% if arg.direction == "in" and arg.is_pointer and arg.nullable %}<tr><td>&nbsp;</td><td>The 
argument can be <code>NULL</code>.</td></tr>{% endif %}
-          {% if arg.direction == "out" and arg.is_pointer and arg.nullable %}<tr><td>&nbsp;</td><td>The 
argument can be set to <code>NULL</code>.</td></tr>{% endif %}
+          {% if arg.direction == "in" and arg.nullable %}<tr><td>&nbsp;</td><td>The argument can be 
<code>NULL</code>.</td></tr>{% endif %}
+          {% if arg.direction == "out" and arg.nullable %}<tr><td>&nbsp;</td><td>The argument can be set to 
<code>NULL</code>.</td></tr>{% endif %}
           {% if arg.optional %}<tr><td>&nbsp;</td><td>The argument can be <code>NULL</code>.</td></tr>{% 
endif %}
           {% if arg.is_array and arg.zero_terminated %}<tr><td>&nbsp;</td><td>The array must be 
<code>NULL</code>-terminated.</td></tr>{% endif %}
           {% if arg.is_array and arg.fixed_size > 0 %}<tr><td>&nbsp;</td><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]