* garrow_schema_export: * @schema: A #GArrowSchema. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: (transfer full) (nullable): An exported #GArrowSchema as * `struct ArrowStruct *` on success, %NULL on error. * * It should be freed with the `ArrowSchema::release` callback then * g_free() when no longer needed. * * Since: 6.0.0 */
| 178 | * Since: 6.0.0 |
| 179 | */ |
| 180 | gpointer |
| 181 | garrow_schema_export(GArrowSchema *schema, GError **error) |
| 182 | { |
| 183 | const auto arrow_schema = garrow_schema_get_raw(schema); |
| 184 | auto c_abi_schema = g_new(ArrowSchema, 1); |
| 185 | auto status = arrow::ExportSchema(*arrow_schema, c_abi_schema); |
| 186 | if (garrow::check(error, status, "[schema][export]")) { |
| 187 | return c_abi_schema; |
| 188 | } else { |
| 189 | g_free(c_abi_schema); |
| 190 | return NULL; |
| 191 | } |
| 192 | } |
| 193 | |
| 194 | /** |
| 195 | * garrow_schema_equal: |
nothing calls this directly
no test coverage detected