Re: C bindings: typedef struct conflicts with method

2015-07-23 Thread Jacob Carlborg via Digitalmars-d-learn
On 2015-07-23 03:57, Mike Parker wrote: In your case, rd_kafka_metadata is the name of the struct, but in C instances would need to be declared like so: struct rd_kafka_metadata instance; Since the struct is declared directly in the typedef, is the struct name actually available? --

Re: C bindings: typedef struct conflicts with method

2015-07-23 Thread Mike Parker via Digitalmars-d-learn
On Thursday, 23 July 2015 at 06:26:28 UTC, Jacob Carlborg wrote: On 2015-07-23 03:57, Mike Parker wrote: In your case, rd_kafka_metadata is the name of the struct, but in C instances would need to be declared like so: struct rd_kafka_metadata instance; Since the struct is declared directly

Re: C bindings: typedef struct conflicts with method

2015-07-22 Thread Mike Parker via Digitalmars-d-learn
On Tuesday, 21 July 2015 at 05:53:26 UTC, 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

Re: C bindings: typedef struct conflicts with method

2015-07-21 Thread Jacob Carlborg via Digitalmars-d-learn
On 2015-07-21 14:24, yawniek wrote: done, https://github.com/jacob-carlborg/dstep/issues/40 i was under the impression that there is already a ticked as https://github.com/jacob-carlborg/dstep/issues/8 looks very similar (but was closed). Yeah, looks very similar. Issue 8 i still open and has

Re: C bindings: typedef struct conflicts with method

2015-07-21 Thread Jacob Carlborg via Digitalmars-d-learn
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; /*

Re: C bindings: typedef struct conflicts with method

2015-07-21 Thread Rikki Cattermole via Digitalmars-d-learn
On 21/07/2015 5:53 p.m., 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;

Re: C bindings: typedef struct conflicts with method

2015-07-21 Thread yawniek via Digitalmars-d-learn
On Tuesday, 21 July 2015 at 06:12:53 UTC, Jacob Carlborg wrote: 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. done, https://github.com/jacob-carlborg/dstep/issues/40 i was under the impression that