Re: DStep - Bindings Generator 0.0.1

2012-07-10 Thread Jakob Ovrum
On Saturday, 7 July 2012 at 21:20:53 UTC, Walter Bright wrote: If it can be made complete enough, I'd like to add support into D for it, so you could do things like: import "stdio.h"; I don't think this syntax makes it clear enough. The following has been making rounds in the community f

Re: DStep - Bindings Generator 0.0.1

2012-07-10 Thread Jonathan Andrew
On Monday, 9 July 2012 at 06:30:39 UTC, Jacob Carlborg wrote: On 2012-07-08 23:22, Jonathan Andrew wrote: Jacob, The only disadvantage to the single-file limitation is that in the case of GTK at least, it has preprocessor directives to keep you from just #include-ing the single file you wan

Re: DStep - Bindings Generator 0.0.1

2012-07-10 Thread Jonathan Andrew
--- If the .h has: typedef struct _Booger Booger; struct Booger { int a; }; Oops, typo! should be: typedef struct _Booger Booger; struct _Booger { int a; };

Re: Link: on Software inventory

2012-07-10 Thread Nick Sabalausky
On Mon, 09 Jul 2012 17:48:21 +0200 "Roman D. Boiko" wrote: > http://www.joelonsoftware.com/items/2012/07/09.html > > This is not about D only, but for me looks relevant enough to > discuss and possibly learn from. If not, please ignore and sorry > for off-topic. It's interesting, as Joel usua

Re: DStep - Bindings Generator 0.0.1

2012-07-10 Thread Jacob Carlborg
On 2012-07-11 02:38, Jonathan Andrew wrote: OK, as far as the empty struct-s, it looks like it has to do with typedef struct. --- //Test.h: typedef struct _Booger Booger; //Results in: ---

Re: DStep - Bindings Generator 0.0.1

2012-07-10 Thread Andrea Fontana
On Monday, 9 July 2012 at 19:24:52 UTC, Jacob Carlborg wrote: On 2012-07-09 17:49, Andrea Fontana wrote: - struct gives error if used on function ( " is used as a type") I'm not sure I understand what you mean. Do you have an example of the C code and the generated D code. Ok that was a

Re: DStep - Bindings Generator 0.0.1

2012-07-10 Thread Andrea Fontana
On Monday, 9 July 2012 at 19:24:52 UTC, Jacob Carlborg wrote: On 2012-07-09 17:49, Andrea Fontana wrote: - struct gives error if used on function ( " is used as a type") I'm not sure I understand what you mean. Do you have an example of the C code and the generated D code. Ok that was a

Re: DStep - Bindings Generator 0.0.1

2012-07-10 Thread Jacob Carlborg
On 2012-07-10 09:57, Andrea Fontana wrote: struct test { int var; }; struct test* first(); Dstep translate first() => first(...) in this case. As far as I know that is legal C code is a variadic function. It's the old K&R style which is discouraged now but still legal: http://en.wikipedia