Re: Create D binding for C struct containing templated class

2018-06-28 Thread evilrat via Digitalmars-d-learn
On Friday, 29 June 2018 at 06:04:10 UTC, Andre Pany wrote: Thanks a lot for the great help. You are right, until now I haven't looked at the include folder, I thought the "surface" folder is the folder with the public api. But it seems also in the include folder, the header files contains ref

Re: Create D binding for C struct containing templated class

2018-06-28 Thread Andre Pany via Digitalmars-d-learn
On Friday, 29 June 2018 at 01:38:23 UTC, evilrat wrote: On Thursday, 28 June 2018 at 18:43:11 UTC, Andre Pany wrote: [...] No, unfortunately D cannot interface with C templates, only C++ templates. But just by coincidence this is C++ source code (and so the templates). So it is possible b

Re: Create D binding for C struct containing templated class

2018-06-28 Thread evilrat via Digitalmars-d-learn
On Thursday, 28 June 2018 at 18:43:11 UTC, Andre Pany wrote: Hi, I try to write a binding for the GRPC core. There is a struct which has some ugly fields: (https://github.com/grpc/grpc/blob/master/src/core/lib/surface/call.cc#L229) struct grpc_call { gpr_refcount ext_ref; gpr_arena* arena

Create D binding for C struct containing templated class

2018-06-28 Thread Andre Pany via Digitalmars-d-learn
Hi, I try to write a binding for the GRPC core. There is a struct which has some ugly fields: (https://github.com/grpc/grpc/blob/master/src/core/lib/surface/call.cc#L229) struct grpc_call { gpr_refcount ext_ref; gpr_arena* arena; ... grpc_core::ManualConstructor sending_stream; grpc