Re: Interfacing with C libs: weeding through C/C++ macros and such in header files

2019-01-13 Thread Mike Parker via Digitalmars-d-learn
On Sunday, 13 January 2019 at 22:40:57 UTC, Alec Stewart wrote: Example without code; for some reason a macro is defined for the stdlib functions `malloc`, `realloc`, and `free`. Maybe it's just because I don't have any pro experience with C or C++, but that seems a bit excessive. Or I

Re: Interfacing with C libs: weeding through C/C++ macros and such in header files

2019-01-13 Thread Alec Stewart via Digitalmars-d-learn
On Sunday, 13 January 2019 at 23:23:50 UTC, Alex wrote: These three are members of the standard library in D. https://dlang.org/phobos/core_memory.html Ah, yea that's way easier. At first, I would suggest to try out some automatic converters, which are written by the community:

Re: Interfacing with C libs: weeding through C/C++ macros and such in header files

2019-01-13 Thread Alex via Digitalmars-d-learn
On Sunday, 13 January 2019 at 22:40:57 UTC, Alec Stewart wrote: Example without code; for some reason a macro is defined for the stdlib functions `malloc`, `realloc`, and `free`. Maybe it's just because I don't have any pro experience with C or C++, but that seems a bit excessive. Or I could

Interfacing with C libs: weeding through C/C++ macros and such in header files

2019-01-13 Thread Alec Stewart via Digitalmars-d-learn
Hello all! So while I have a decent grasp on D, I've been having trouble figuring out specific projects that I could do in D, so I thought I'd maybe find a little C or C++ library I could transfer over to D. I decided to make my life easier and look for something that's just a single header

Re: Building Libraries in the face of API and ABI changes [was Understanding SIGSEGV issues]

2019-01-13 Thread Jacob Carlborg via Digitalmars-d-learn
On 2019-01-11 06:31, Russel Winder wrote: DStep generated bindings tend to need some manual tweaking that cannot be automated, which is surprising given that bindgen can do things without manual intervention for Rust. It's not surprising at all. Different tools, different approaches,

one path skips constructor

2019-01-13 Thread Kagamin via Digitalmars-d-learn
--- struct A { int a; this(int) { if(__ctfe)this(0,0); //Error: one path skips constructor else a=0; } this(int,int){ a=1; } } --- Is this supposed to not compile?

Re: Generating API documention

2019-01-13 Thread George via Digitalmars-d-learn
On Friday, 11 January 2019 at 14:16:45 UTC, Adam D. Ruppe wrote: On Thursday, 10 January 2019 at 07:04:52 UTC, George wrote: What do people use to generate nice looking and simple html documentation for their projects? If you like my style