plugins/out_kafka/librdkafka-1.5.0/src/rdkafka_admin.c
static rd_kafka_NewPartitions_t *
rd_kafka_NewPartitions_copy (const rd_kafka_NewPartitions_t *src) {
        rd_kafka_NewPartitions_t *dst;

        dst = rd_kafka_NewPartitions_new(src->topic, src->total_cnt, NULL, 0);

        rd_list_destroy(&dst->replicas); /* created in .._new() */
        rd_list_init_copy(&dst->replicas, &src->replicas);
        rd_list_copy_to(&dst->replicas, &src->replicas,
                        rd_list_copy_preallocated, NULL);

        return dst;
}
/**
 * @brief Allocate a new CreatePartitions and make a copy of \p src
 */
@brief Allocate a new CreatePartitions and make a copy of \p src
@brief Allocate a new CreatePartitions and make a copy of \ p src
static rd_kafka_NewPartitions_t *
rd_kafka_NewPartitions_copy (const rd_kafka_NewPartitions_t *src) {
        rd_kafka_NewPartitions_t *dst;
        dst = rd_kafka_NewPartitions_new(src->topic, src->total_cnt, NULL, 0);
        rd_list_destroy(&dst->replicas); 
        rd_list_init_copy(&dst->replicas, &src->replicas);
        rd_list_copy_to(&dst->replicas, &src->replicas,
                        rd_list_copy_preallocated, NULL);
        return dst;
}
static rd_kafka_NewPartitions_t * rd_kafka_NewPartitions_copy ( const rd_kafka_NewPartitions_t * src ) { rd_kafka_NewPartitions_t * dst ; dst = rd_kafka_NewPartitions_new ( src -> topic , src -> total_cnt , NULL , 0 ) ; rd_list_destroy ( & dst -> replicas ) ; rd_list_init_copy ( & dst -> replicas , & src -> replicas ) ; rd_list_copy_to ( & dst -> replicas , & src -> replicas , rd_list_copy_preallocated , NULL ) ; return dst ; }
@brief Allocate a new CreatePartitions and make a copy of \p src
@brief Allocate a new CreatePartitions and make a copy of \ p src
/* created in .._new() */