diff --git a/c_glib/arrow-glib/composite-data-type.cpp b/c_glib/arrow-glib/composite-data-type.cpp index 5ddc1c3dd8..675900a5be 100644 --- a/c_glib/arrow-glib/composite-data-type.cpp +++ b/c_glib/arrow-glib/composite-data-type.cpp @@ -88,9 +88,26 @@ garrow_list_data_type_new(GArrowField *field) * @list_data_type: A #GArrowListDataType. * * Returns: (transfer full): The field of value. + * + * Deprecated: 0.13.0: + * Use garrow_list_data_type_get_field() instead. */ GArrowField * garrow_list_data_type_get_value_field(GArrowListDataType *list_data_type) +{ + return garrow_list_data_type_get_field(list_data_type); +} + +/** + * garrow_list_data_type_get_field: + * @list_data_type: A #GArrowListDataType. + * + * Returns: (transfer full): The field of value. + * + * Since: 0.13.0 + */ +GArrowField * +garrow_list_data_type_get_field(GArrowListDataType *list_data_type) { auto data_type = GARROW_DATA_TYPE(list_data_type); auto arrow_data_type = garrow_data_type_get_raw(data_type); diff --git a/c_glib/arrow-glib/composite-data-type.h b/c_glib/arrow-glib/composite-data-type.h index f60a9cdeb6..beb312597d 100644 --- a/c_glib/arrow-glib/composite-data-type.h +++ b/c_glib/arrow-glib/composite-data-type.h @@ -22,6 +22,7 @@ #include <arrow-glib/basic-array.h> #include <arrow-glib/basic-data-type.h> #include <arrow-glib/field.h> +#include <arrow-glib/version.h> G_BEGIN_DECLS @@ -67,7 +68,12 @@ struct _GArrowListDataTypeClass GType garrow_list_data_type_get_type (void) G_GNUC_CONST; GArrowListDataType *garrow_list_data_type_new (GArrowField *field); +#ifndef GARROW_DISABLE_DEPRECATED +GARROW_DEPRECATED_IN_0_13_FOR(garrow_list_data_type_get_field) GArrowField *garrow_list_data_type_get_value_field (GArrowListDataType *list_data_type); +#endif +GARROW_AVAILABLE_IN_0_13 +GArrowField *garrow_list_data_type_get_field (GArrowListDataType *list_data_type); #define GARROW_TYPE_STRUCT_DATA_TYPE (garrow_struct_data_type_get_type()) diff --git a/c_glib/arrow-glib/version.h.in b/c_glib/arrow-glib/version.h.in index 501827d06e..827b9c9a81 100644 --- a/c_glib/arrow-glib/version.h.in +++ b/c_glib/arrow-glib/version.h.in @@ -110,6 +110,15 @@ # define GARROW_UNAVAILABLE(major, minor) G_UNAVAILABLE(major, minor) #endif +/** + * GARROW_VERSION_0_13: + * + * You can use this macro value for compile time API version check. + * + * Since: 0.13.0 + */ +#define GARROW_VERSION_0_13 G_ENCODE_VERSION(0, 13) + /** * GARROW_VERSION_0_12: * @@ -175,6 +184,20 @@ #define GARROW_AVAILABLE_IN_ALL +#if GARROW_VERSION_MIN_REQUIRED >= GARROW_VERSION_0_13 +# define GARROW_DEPRECATED_IN_0_13 GARROW_DEPRECATED +# define GARROW_DEPRECATED_IN_0_13_FOR(function) GARROW_DEPRECATED_FOR(function) +#else +# define GARROW_DEPRECATED_IN_0_13 +# define GARROW_DEPRECATED_IN_0_13_FOR(function) +#endif + +#if GARROW_VERSION_MAX_ALLOWED < GARROW_VERSION_0_13 +# define GARROW_AVAILABLE_IN_0_13 GARROW_UNAVAILABLE(0, 13) +#else +# define GARROW_AVAILABLE_IN_0_13 +#endif + #if GARROW_VERSION_MIN_REQUIRED >= GARROW_VERSION_0_12 # define GARROW_DEPRECATED_IN_0_12 GARROW_DEPRECATED # define GARROW_DEPRECATED_IN_0_12_FOR(function) GARROW_DEPRECATED_FOR(function) diff --git a/c_glib/doc/arrow-glib/arrow-glib-docs.xml b/c_glib/doc/arrow-glib/arrow-glib-docs.xml index f9f01fe23e..1016703001 100644 --- a/c_glib/doc/arrow-glib/arrow-glib-docs.xml +++ b/c_glib/doc/arrow-glib/arrow-glib-docs.xml @@ -163,6 +163,10 @@ <title>Index of deprecated API</title> <xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include> </index> + <index id="api-index-0-13-0" role="0.13.0"> + <title>Index of new symbols in 0.13.0</title> + <xi:include href="xml/api-index-0.13.0.xml"><xi:fallback /></xi:include> + </index> <index id="api-index-0-12-0" role="0.12.0"> <title>Index of new symbols in 0.12.0</title> <xi:include href="xml/api-index-0.12.0.xml"><xi:fallback /></xi:include> diff --git a/c_glib/test/test-list-data-type.rb b/c_glib/test/test-list-data-type.rb index 2d96fcb21e..78df28a144 100644 --- a/c_glib/test/test-list-data-type.rb +++ b/c_glib/test/test-list-data-type.rb @@ -30,14 +30,14 @@ def test_to_s assert_equal("list<enabled: bool>", @data_type.to_s) end - def test_value_field + def test_field assert_equal([ @field, @field_data_type, ], [ - @data_type.value_field, - @data_type.value_field.data_type, + @data_type.field, + @data_type.field.data_type, ]) end end
With regards, Apache Git Services