From 5151c2b668e76eac73a044c478319887e3fa9acb Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Thu, 31 Dec 2020 00:28:27 +0200 Subject: [PATCH] [introspection] Replace deprecated allow-none Use optional or nullable as appropriate. --- src/hb-aat-layout.cc | 2 +- src/hb-buffer-serialize.cc | 16 ++++++++-------- src/hb-ot-layout.cc | 32 ++++++++++++++++---------------- src/hb-ot-name.cc | 8 ++++---- src/hb-ot-tag.cc | 14 +++++++------- src/hb-ot-var.cc | 6 +++--- src/hb-shape.cc | 6 +++--- 7 files changed, 42 insertions(+), 42 deletions(-) diff --git a/src/hb-aat-layout.cc b/src/hb-aat-layout.cc index 5a6954a62..0e9f2b495 100644 --- a/src/hb-aat-layout.cc +++ b/src/hb-aat-layout.cc @@ -350,7 +350,7 @@ hb_aat_layout_track (const hb_ot_shape_plan_t *plan, * hb_aat_layout_get_feature_types: * @face: #hb_face_t to work upon * @start_offset: offset of the first feature type to retrieve - * @feature_count: (inout) (allow-none): Input = the maximum number of feature types to return; + * @feature_count: (inout) (optional): Input = the maximum number of feature types to return; * Output = the actual number of feature types returned (may be zero) * @features: (out caller-allocates) (array length=feature_count): Array of feature types found * diff --git a/src/hb-buffer-serialize.cc b/src/hb-buffer-serialize.cc index 1fef1b275..6539b8964 100644 --- a/src/hb-buffer-serialize.cc +++ b/src/hb-buffer-serialize.cc @@ -400,8 +400,8 @@ _hb_buffer_serialize_unicode_text (hb_buffer_t *buffer, * @buf: (out) (array length=buf_size) (element-type uint8_t): output string to * write serialized buffer into. * @buf_size: the size of @buf. - * @buf_consumed: (out) (allow-none): if not %NULL, will be set to the number of byes written into @buf. - * @font: (allow-none): the #hb_font_t used to shape this buffer, needed to + * @buf_consumed: (out) (optional): if not %NULL, will be set to the number of byes written into @buf. + * @font: (nullable): the #hb_font_t used to shape this buffer, needed to * read glyph names and extents. If %NULL, and empty font will be used. * @format: the #hb_buffer_serialize_format_t to use for formatting the output. * @flags: the #hb_buffer_serialize_flags_t that control what glyph properties @@ -514,7 +514,7 @@ hb_buffer_serialize_glyphs (hb_buffer_t *buffer, * @buf: (out) (array length=buf_size) (element-type uint8_t): output string to * write serialized buffer into. * @buf_size: the size of @buf. - * @buf_consumed: (out) (allow-none): if not %NULL, will be set to the number of byes written into @buf. + * @buf_consumed: (out) (optional): if not %NULL, will be set to the number of byes written into @buf. * @format: the #hb_buffer_serialize_format_t to use for formatting the output. * @flags: the #hb_buffer_serialize_flags_t that control what glyph properties * to serialize. @@ -637,8 +637,8 @@ _hb_buffer_serialize_invalid (hb_buffer_t *buffer, * @buf: (out) (array length=buf_size) (element-type uint8_t): output string to * write serialized buffer into. * @buf_size: the size of @buf. - * @buf_consumed: (out) (allow-none): if not %NULL, will be set to the number of byes written into @buf. - * @font: (allow-none): the #hb_font_t used to shape this buffer, needed to + * @buf_consumed: (out) (optional): if not %NULL, will be set to the number of byes written into @buf. + * @font: (nullable): the #hb_font_t used to shape this buffer, needed to * read glyph names and extents. If %NULL, and empty font will be used. * @format: the #hb_buffer_serialize_format_t to use for formatting the output. * @flags: the #hb_buffer_serialize_flags_t that control what glyph properties @@ -728,9 +728,9 @@ parse_hex (const char *pp, const char *end, uint32_t *pv) * @buffer: an #hb_buffer_t buffer. * @buf: (array length=buf_len): string to deserialize * @buf_len: the size of @buf, or -1 if it is %NULL-terminated - * @end_ptr: (out) (allow-none): output pointer to the character after last + * @end_ptr: (out) (optional): output pointer to the character after last * consumed one. - * @font: (allow-none): font for getting glyph IDs + * @font: (nullable): font for getting glyph IDs * @format: the #hb_buffer_serialize_format_t of the input @buf * * Deserializes glyphs @buffer from textual representation in the format @@ -801,7 +801,7 @@ hb_buffer_deserialize_glyphs (hb_buffer_t *buffer, * @buffer: an #hb_buffer_t buffer. * @buf: (array length=buf_len): string to deserialize * @buf_len: the size of @buf, or -1 if it is %NULL-terminated - * @end_ptr: (out) (allow-none): output pointer to the character after last + * @end_ptr: (out) (optional): output pointer to the character after last * consumed one. * @format: the #hb_buffer_serialize_format_t of the input @buf * diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc index 17cff3fb0..089c7948c 100644 --- a/src/hb-ot-layout.cc +++ b/src/hb-ot-layout.cc @@ -322,7 +322,7 @@ hb_ot_layout_get_glyphs_in_class (hb_face_t *face, * @face: The #hb_face_t to work on * @glyph: The #hb_codepoint_t code point to query * @start_offset: offset of the first attachment point to retrieve - * @point_count: (inout) (allow-none): Input = the maximum number of attachment points to return; + * @point_count: (inout) (optional): Input = the maximum number of attachment points to return; * Output = the actual number of attachment points returned (may be zero) * @point_array: (out) (array length=point_count): The array of attachment points found for the query * @@ -350,7 +350,7 @@ hb_ot_layout_get_attach_points (hb_face_t *face, * @direction: The #hb_direction_t text direction to use * @glyph: The #hb_codepoint_t code point to query * @start_offset: offset of the first caret position to retrieve - * @caret_count: (inout) (allow-none): Input = the maximum number of caret positions to return; + * @caret_count: (inout) (optional): Input = the maximum number of caret positions to return; * Output = the actual number of caret positions returned (may be zero) * @caret_array: (out) (array length=caret_count): The array of caret positions found for the query * @@ -412,7 +412,7 @@ get_gsubgpos_table (hb_face_t *face, * @face: #hb_face_t to work upon * @table_tag: #HB_OT_TAG_GSUB or #HB_OT_TAG_GPOS * @start_offset: offset of the first script tag to retrieve - * @script_count: (inout) (allow-none): Input = the maximum number of script tags to return; + * @script_count: (inout) (optional): Input = the maximum number of script tags to return; * Output = the actual number of script tags returned (may be zero) * @script_tags: (out) (array length=script_count): The array of #hb_tag_t script tags found for the query * @@ -579,7 +579,7 @@ hb_ot_layout_table_select_script (hb_face_t *face, * @face: #hb_face_t to work upon * @table_tag: #HB_OT_TAG_GSUB or #HB_OT_TAG_GPOS * @start_offset: offset of the first feature tag to retrieve - * @feature_count: (inout) (allow-none): Input = the maximum number of feature tags to return; + * @feature_count: (inout) (optional): Input = the maximum number of feature tags to return; * Output = the actual number of feature tags returned (may be zero) * @feature_tags: (out) (array length=feature_count): Array of feature tags found in the table * @@ -640,7 +640,7 @@ hb_ot_layout_table_find_feature (hb_face_t *face, * @table_tag: #HB_OT_TAG_GSUB or #HB_OT_TAG_GPOS * @script_index: The index of the requested script tag * @start_offset: offset of the first language tag to retrieve - * @language_count: (inout) (allow-none): Input = the maximum number of language tags to return; + * @language_count: (inout) (optional): Input = the maximum number of language tags to return; * Output = the actual number of language tags returned (may be zero) * @language_tags: (out) (array length=language_count): Array of language tags found in the table * @@ -811,7 +811,7 @@ hb_ot_layout_language_get_required_feature (hb_face_t *face, * @script_index: The index of the requested script tag * @language_index: The index of the requested language tag * @start_offset: offset of the first feature tag to retrieve - * @feature_count: (inout) (allow-none): Input = the maximum number of feature tags to return; + * @feature_count: (inout) (optional): Input = the maximum number of feature tags to return; * Output: the actual number of feature tags returned (may be zero) * @feature_indexes: (out) (array length=feature_count): The array of feature indexes found for the query * @@ -842,7 +842,7 @@ hb_ot_layout_language_get_feature_indexes (hb_face_t *face, * @script_index: The index of the requested script tag * @language_index: The index of the requested language tag * @start_offset: offset of the first feature tag to retrieve - * @feature_count: (inout) (allow-none): Input = the maximum number of feature tags to return; + * @feature_count: (inout) (optional): Input = the maximum number of feature tags to return; * Output = the actual number of feature tags returned (may be zero) * @feature_tags: (out) (array length=feature_count): The array of #hb_tag_t feature tags found for the query * @@ -924,7 +924,7 @@ hb_ot_layout_language_find_feature (hb_face_t *face, * @table_tag: #HB_OT_TAG_GSUB or #HB_OT_TAG_GPOS * @feature_index: The index of the requested feature * @start_offset: offset of the first lookup to retrieve - * @lookup_count: (inout) (allow-none): Input = the maximum number of lookups to return; + * @lookup_count: (inout) (optional): Input = the maximum number of lookups to return; * Output = the actual number of lookups returned (may be zero) * @lookup_indexes: (out) (array length=lookup_count): The array of lookup indexes found for the query * @@ -1283,7 +1283,7 @@ hb_ot_layout_table_find_feature_variations (hb_face_t *face, * @feature_index: The index of the feature to query * @variations_index: The index of the feature variation to query * @start_offset: offset of the first lookup to retrieve - * @lookup_count: (inout) (allow-none): Input = the maximum number of lookups to return; + * @lookup_count: (inout) (optional): Input = the maximum number of lookups to return; * Output = the actual number of lookups returned (may be zero) * @lookup_indexes: (out) (array length=lookup_count): The array of lookups found for the query * @@ -1623,15 +1623,15 @@ hb_ot_layout_get_size_params (hb_face_t *face, * @face: #hb_face_t to work upon * @table_tag: table tag to query, "GSUB" or "GPOS". * @feature_index: index of feature to query. - * @label_id: (out) (allow-none): The ‘name’ table name ID that specifies a string + * @label_id: (out) (optional): The ‘name’ table name ID that specifies a string * for a user-interface label for this feature. (May be NULL.) - * @tooltip_id: (out) (allow-none): The ‘name’ table name ID that specifies a string + * @tooltip_id: (out) (optional): The ‘name’ table name ID that specifies a string * that an application can use for tooltip text for this * feature. (May be NULL.) - * @sample_id: (out) (allow-none): The ‘name’ table name ID that specifies sample text + * @sample_id: (out) (optional): The ‘name’ table name ID that specifies sample text * that illustrates the effect of this feature. (May be NULL.) - * @num_named_parameters: (out) (allow-none): Number of named parameters. (May be zero.) - * @first_param_id: (out) (allow-none): The first ‘name’ table name ID used to specify + * @num_named_parameters: (out) (optional): Number of named parameters. (May be zero.) + * @first_param_id: (out) (optional): The first ‘name’ table name ID used to specify * strings for user-interface labels for the feature * parameters. (Must be zero if numParameters is zero.) * @@ -1698,7 +1698,7 @@ hb_ot_layout_feature_get_name_ids (hb_face_t *face, * @table_tag: table tag to query, "GSUB" or "GPOS". * @feature_index: index of feature to query. * @start_offset: offset of the first character to retrieve - * @char_count: (inout) (allow-none): Input = the maximum number of characters to return; + * @char_count: (inout) (optional): Input = the maximum number of characters to return; * Output = the actual number of characters returned (may be zero) * @characters: (out caller-allocates) (array length=char_count): A buffer pointer. * The Unicode codepoints of the characters for which this feature provides @@ -1977,7 +1977,7 @@ struct hb_get_glyph_alternates_dispatch_t : * @lookup_index: index of the feature lookup to query. * @glyph: a glyph id. * @start_offset: starting offset. - * @alternate_count: (inout) (allow-none): Input = the maximum number of alternate glyphs to return; + * @alternate_count: (inout) (optional): Input = the maximum number of alternate glyphs to return; * Output = the actual number of alternate glyphs returned (may be zero). * @alternate_glyphs: (out caller-allocates) (array length=alternate_count): A glyphs buffer. * Alternate glyphs associated with the glyph id. diff --git a/src/hb-ot-name.cc b/src/hb-ot-name.cc index 10122b8c2..4588226e6 100644 --- a/src/hb-ot-name.cc +++ b/src/hb-ot-name.cc @@ -46,7 +46,7 @@ /** * hb_ot_name_list_names: * @face: font face. - * @num_entries: (out) (allow-none): number of returned entries. + * @num_entries: (out) (optional): number of returned entries. * * Enumerates all available name IDs and language combinations. Returned * array is owned by the @face and should not be modified. It can be @@ -150,7 +150,7 @@ hb_ot_name_get_utf (hb_face_t *face, * @face: font face. * @name_id: OpenType name identifier to fetch. * @language: language to fetch the name for. - * @text_size: (inout) (allow-none): input size of @text buffer, and output size of + * @text_size: (inout) (optional): input size of @text buffer, and output size of * text written to buffer. * @text: (out caller-allocates) (array length=text_size): buffer to write fetched name into. * @@ -177,7 +177,7 @@ hb_ot_name_get_utf8 (hb_face_t *face, * @face: font face. * @name_id: OpenType name identifier to fetch. * @language: language to fetch the name for. - * @text_size: (inout) (allow-none): input size of @text buffer, and output size of + * @text_size: (inout) (optional): input size of @text buffer, and output size of * text written to buffer. * @text: (out caller-allocates) (array length=text_size): buffer to write fetched name into. * @@ -203,7 +203,7 @@ hb_ot_name_get_utf16 (hb_face_t *face, * @face: font face. * @name_id: OpenType name identifier to fetch. * @language: language to fetch the name for. - * @text_size: (inout) (allow-none): input size of @text buffer, and output size of + * @text_size: (inout) (optional): input size of @text buffer, and output size of * text written to buffer. * @text: (out caller-allocates) (array length=text_size): buffer to write fetched name into. * diff --git a/src/hb-ot-tag.cc b/src/hb-ot-tag.cc index 9ced76a12..fc145a41f 100644 --- a/src/hb-ot-tag.cc +++ b/src/hb-ot-tag.cc @@ -360,13 +360,13 @@ parse_private_use_subtag (const char *private_use_subtag, * hb_ot_tags_from_script_and_language: * @script: an #hb_script_t to convert. * @language: an #hb_language_t to convert. - * @script_count: (allow-none): maximum number of script tags to retrieve (IN) + * @script_count: (inout) (optional): maximum number of script tags to retrieve (IN) * and actual number of script tags retrieved (OUT) - * @script_tags: (out) (allow-none): array of size at least @script_count to store the + * @script_tags: (out) (optional): array of size at least @script_count to store the * script tag results - * @language_count: (allow-none): maximum number of language tags to retrieve + * @language_count: (inout) (optional): maximum number of language tags to retrieve * (IN) and actual number of language tags retrieved (OUT) - * @language_tags: (out) (allow-none): array of size at least @language_count to store + * @language_tags: (out) (optional): array of size at least @language_count to store * the language tag results * * Converts an #hb_script_t and an #hb_language_t to script and language tags. @@ -489,9 +489,9 @@ hb_ot_tag_to_language (hb_tag_t tag) * hb_ot_tags_to_script_and_language: * @script_tag: a script tag * @language_tag: a language tag - * @script: (allow-none): the #hb_script_t corresponding to @script_tag (OUT). - * @language: (allow-none): the #hb_language_t corresponding to @script_tag and - * @language_tag (OUT). + * @script: (out) (optional): the #hb_script_t corresponding to @script_tag. + * @language: (out) (optional): the #hb_language_t corresponding to @script_tag and + * @language_tag. * * Converts a script tag and a language tag to an #hb_script_t and an * #hb_language_t. diff --git a/src/hb-ot-var.cc b/src/hb-ot-var.cc index 29a4c2ced..6b42b45cd 100644 --- a/src/hb-ot-var.cc +++ b/src/hb-ot-var.cc @@ -87,7 +87,7 @@ hb_ot_var_get_axis_count (hb_face_t *face) * hb_ot_var_get_axes: * @face: #hb_face_t to work upon * @start_offset: offset of the first lookup to retrieve - * @axes_count: (inout) (allow-none): Input = the maximum number of variation axes to return; + * @axes_count: (inout) (optional): Input = the maximum number of variation axes to return; * Output = the actual number of variation axes returned (may be zero) * @axes_array: (out caller-allocates) (array length=axes_count): The array of variation axes found * @@ -133,7 +133,7 @@ hb_ot_var_find_axis (hb_face_t *face, * hb_ot_var_get_axis_infos: * @face: #hb_face_t to work upon * @start_offset: offset of the first lookup to retrieve - * @axes_count: (inout) (allow-none): Input = the maximum number of variation axes to return; + * @axes_count: (inout) (optional): Input = the maximum number of variation axes to return; * Output = the actual number of variation axes returned (may be zero) * @axes_array: (out caller-allocates) (array length=axes_count): The array of variation axes found * @@ -237,7 +237,7 @@ hb_ot_var_named_instance_get_postscript_name_id (hb_face_t *face, * hb_ot_var_named_instance_get_design_coords: * @face: The #hb_face_t to work on * @instance_index: The index of the named instance to query - * @coords_length: (inout) (allow-none): Input = the maximum number of coordinates to return; + * @coords_length: (inout) (optional): Input = the maximum number of coordinates to return; * Output = the actual number of coordinates returned (may be zero) * @coords: (out) (array length=coords_length): The array of coordinates found for the query * diff --git a/src/hb-shape.cc b/src/hb-shape.cc index a3debce39..c442f4403 100644 --- a/src/hb-shape.cc +++ b/src/hb-shape.cc @@ -111,10 +111,10 @@ hb_shape_list_shapers () * hb_shape_full: * @font: an #hb_font_t to use for shaping * @buffer: an #hb_buffer_t to shape - * @features: (array length=num_features) (allow-none): an array of user + * @features: (array length=num_features) (nullable): an array of user * specified #hb_feature_t or %NULL * @num_features: the length of @features array - * @shaper_list: (array zero-terminated=1) (allow-none): a %NULL-terminated + * @shaper_list: (array zero-terminated=1) (nullable): a %NULL-terminated * array of shapers to use or %NULL * * See hb_shape() for details. If @shaper_list is not %NULL, the specified @@ -146,7 +146,7 @@ hb_shape_full (hb_font_t *font, * hb_shape: * @font: an #hb_font_t to use for shaping * @buffer: an #hb_buffer_t to shape - * @features: (array length=num_features) (allow-none): an array of user + * @features: (array length=num_features) (nullable): an array of user * specified #hb_feature_t or %NULL * @num_features: the length of @features array *