MCPcopy Create free account
hub / github.com/apache/arrow / gaflight_path_descriptor_get_paths

Function gaflight_path_descriptor_get_paths

c_glib/arrow-flight-glib/common.cpp:470–487  ·  view source on GitHub ↗

* gaflight_path_descriptor_get_paths: * @descriptor: A #GAFlightPathDescriptor. * * Returns: (nullable) (array zero-terminated=1) (transfer full): * The paths in this descriptor. * * It must be freed with g_strfreev() when no longer needed. * * Since: 5.0.0 */

Source from the content-addressed store, hash-verified

468 * Since: 5.0.0
469 */
470gchar **
471gaflight_path_descriptor_get_paths(GAFlightPathDescriptor *descriptor)
472{
473 const auto flight_descriptor =
474 gaflight_descriptor_get_raw(GAFLIGHT_DESCRIPTOR(descriptor));
475 const auto &flight_paths = flight_descriptor->path;
476 if (flight_paths.empty()) {
477 return NULL;
478 } else {
479 auto paths = g_new(gchar *, flight_paths.size() + 1);
480 gsize i = 0;
481 for (const auto &flight_path : flight_paths) {
482 paths[i++] = g_strdup(flight_path.c_str());
483 }
484 paths[i] = NULL;
485 return paths;
486 }
487}
488
489G_DEFINE_TYPE(GAFlightCommandDescriptor,
490 gaflight_command_descriptor,

Callers

nothing calls this directly

Calls 3

emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected