C bindings: typedef struct conflicts with method
Jacob Carlborg via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Jul 20 23:13:05 PDT 2015
On 2015-07-21 07:53, yawniek wrote:
> i tried to automagically create bindings for librdkafka
> (https://github.com/edenhill/librdkafka)
> with dstep.
>
> now the code contains typedefs structs with the same name as methods:
>
> ```
> typedef struct rd_kafka_metadata {
> int broker_cnt; /* Number of brokers in 'brokers' */
> struct rd_kafka_metadata_broker *brokers; /* Brokers */
>
> int topic_cnt; /* Number of topics in 'topics' */
> struct rd_kafka_metadata_topic *topics; /* Topics */
>
> int32_t orig_broker_id; /* Broker originating this metadata */
> char *orig_broker_name; /* Name of originating broker */
> } rd_kafka_metadata_t;
>
>
> rd_kafka_metadata (rd_kafka_t *rk, int all_topics,
> rd_kafka_topic_t *only_rkt,
> const struct rd_kafka_metadata **metadatap,
> int timeout_ms);
> ```
>
> what the correct way to bind these?
Please report an issue for this. In this case "rd_kafka_metadata_t"
should be used for the struct name.
--
/Jacob Carlborg
More information about the Digitalmars-d-learn
mailing list