* garrow_array_export: * @array: A #GArrowArray. * @c_abi_array: (out): Return location for a `struct ArrowArray *`. * It should be freed with the `ArrowArray::release` callback then * g_free() when no longer needed. * @c_abi_schema: (out) (nullable): Return location for a * `struct ArrowSchema *` or %NULL. * It should be freed with the `ArrowSchema::release` callback then * g_fr
| 888 | * Since: 6.0.0 |
| 889 | */ |
| 890 | gboolean |
| 891 | garrow_array_export(GArrowArray *array, |
| 892 | gpointer *c_abi_array, |
| 893 | gpointer *c_abi_schema, |
| 894 | GError **error) |
| 895 | { |
| 896 | const auto arrow_array = garrow_array_get_raw(array); |
| 897 | *c_abi_array = g_new(ArrowArray, 1); |
| 898 | arrow::Status status; |
| 899 | if (c_abi_schema) { |
| 900 | *c_abi_schema = g_new(ArrowSchema, 1); |
| 901 | status = arrow::ExportArray(*arrow_array, |
| 902 | static_cast<ArrowArray *>(*c_abi_array), |
| 903 | static_cast<ArrowSchema *>(*c_abi_schema)); |
| 904 | } else { |
| 905 | status = arrow::ExportArray(*arrow_array, static_cast<ArrowArray *>(*c_abi_array)); |
| 906 | } |
| 907 | if (garrow::check(error, status, "[array][export]")) { |
| 908 | return true; |
| 909 | } else { |
| 910 | g_free(*c_abi_array); |
| 911 | *c_abi_array = nullptr; |
| 912 | if (c_abi_schema) { |
| 913 | g_free(*c_abi_schema); |
| 914 | *c_abi_schema = nullptr; |
| 915 | } |
| 916 | return false; |
| 917 | } |
| 918 | } |
| 919 | |
| 920 | /** |
| 921 | * garrow_array_equal: |
nothing calls this directly
no test coverage detected