From 4a6c66e3552c353e982c7c6fe451ac4975c48b4c Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Mon, 26 Apr 2021 18:43:59 +0200 Subject: qmi-codegen,gir: all output TLV field readers are optional The user can give a NULL pointer if the specific field isn't required. --- build-aux/qmi-codegen/VariableArray.py | 4 ++-- build-aux/qmi-codegen/VariableInteger.py | 2 +- build-aux/qmi-codegen/VariableString.py | 2 +- build-aux/qmi-codegen/VariableStruct.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build-aux/qmi-codegen/VariableArray.py b/build-aux/qmi-codegen/VariableArray.py index 9afc0a85..a7addb30 100644 --- a/build-aux/qmi-codegen/VariableArray.py +++ b/build-aux/qmi-codegen/VariableArray.py @@ -377,10 +377,10 @@ class VariableArray(Variable): template = '' if self.array_sequence_element != '': template += ( - '${lp}@${name}_sequence: (out): a placeholder for the output sequence number, or %NULL if not required.\n') + '${lp}@${name}_sequence: (out)(optional): a placeholder for the output sequence number, or %NULL if not required.\n') template += ( - '${lp}@${name}: (out)(element-type ${public_array_element_type})(transfer none): a placeholder for the output #GArray of #${public_array_element_format} elements, or %NULL if not required. Do not free it, it is owned by @self.\n') + '${lp}@${name}: (out)(optional)(element-type ${public_array_element_type})(transfer none): a placeholder for the output #GArray of #${public_array_element_format} elements, or %NULL if not required. Do not free it, it is owned by @self.\n') return string.Template(template).substitute(translations) diff --git a/build-aux/qmi-codegen/VariableInteger.py b/build-aux/qmi-codegen/VariableInteger.py index 2eda4843..6fecb17b 100644 --- a/build-aux/qmi-codegen/VariableInteger.py +++ b/build-aux/qmi-codegen/VariableInteger.py @@ -298,7 +298,7 @@ class VariableInteger(Variable): 'name' : variable_name } template = ( - '${lp}@${name}: (out): a placeholder for the output #${public_format}, or %NULL if not required.\n') + '${lp}@${name}: (out)(optional): a placeholder for the output #${public_format}, or %NULL if not required.\n') return string.Template(template).substitute(translations) """ diff --git a/build-aux/qmi-codegen/VariableString.py b/build-aux/qmi-codegen/VariableString.py index 26d2e610..8ec032f3 100644 --- a/build-aux/qmi-codegen/VariableString.py +++ b/build-aux/qmi-codegen/VariableString.py @@ -214,7 +214,7 @@ class VariableString(Variable): 'name' : variable_name } template = ( - '${lp}@${name}: (out)(transfer none): a placeholder for the output constant string, or %NULL if not required.\n') + '${lp}@${name}: (out)(optional)(transfer none): a placeholder for the output constant string, or %NULL if not required.\n') return string.Template(template).substitute(translations) diff --git a/build-aux/qmi-codegen/VariableStruct.py b/build-aux/qmi-codegen/VariableStruct.py index 83c2b8b4..71eed0f3 100644 --- a/build-aux/qmi-codegen/VariableStruct.py +++ b/build-aux/qmi-codegen/VariableStruct.py @@ -196,7 +196,7 @@ class VariableStruct(Variable): 'name' : variable_name } template = ( - '${lp}@${name}: (out)(transfer none): a placeholder for the output constant #${format}, or %NULL if not required.\n') + '${lp}@${name}: (out)(optional)(transfer none): a placeholder for the output constant #${format}, or %NULL if not required.\n') return string.Template(template).substitute(translations) -- cgit v1.2.1