Re: dstep instead of SWIG (was Re: CWrap - higher abstraction level for calling C functions)

2012-03-04 Thread Jacob Carlborg
On 2012-03-04 16:13, Gour wrote: On Tue, 21 Feb 2012 18:40:20 +0100 Jacob Carlborgd...@me.com wrote: DStep is currently used only for automatically generating bindings for C functions and Objective-C classes and methods. Do oyu find that dstep is capable to be used for binding whole C libs

Re: CWrap - higher abstraction level for calling C functions

2012-02-22 Thread Gour
On Tue, 21 Feb 2012 18:40:20 +0100 Jacob Carlborg d...@me.com wrote: DStep is currently used only for automatically generating bindings for C functions and Objective-C classes and methods. OK. Thank you. But it depends what code I output, I could change dstep to output code that uses CWrap.

Re: CWrap - higher abstraction level for calling C functions

2012-02-22 Thread Denis Shelomovskij
20.02.2012 19:34, Gour пишет: On Mon, 20 Feb 2012 18:02:49 +0400 Denis Shelomovskijverylonglogin@gmail.com wrote: Hello Denis, D has complete (IMHO) compiler support for calling C functions (using extern(C)). But there is a lack of library support. I'm glad you're working on (another)

Re: CWrap - higher abstraction level for calling C functions

2012-02-22 Thread Denis Shelomovskij
22.02.2012 13:41, Gour пишет: That would be nice and make the whole job of binding C functions and providing customized D API easier...and let's not forget about extra points for coordinating work. ;) I'm open for emails about using/changing/fixing CWrap.

Re: CWrap - higher abstraction level for calling C functions

2012-02-22 Thread Jacob Carlborg
On 2012-02-22 19:59, Denis Shelomovskij wrote: 22.02.2012 13:41, Gour пишет: That would be nice and make the whole job of binding C functions and providing customized D API easier...and let's not forget about extra points for coordinating work. ;) I'm open for emails about

Re: CWrap - higher abstraction level for calling C functions

2012-02-21 Thread Gour
On Mon, 20 Feb 2012 20:52:04 +0100 Jacob Carlborg d...@me.com wrote: As I understand it, CWrap provides more than just bindings for a C function. Right, but, afaik, SWIG can also make more than wrapper for a C function by using typemaps, %exception etc. Does it mean that dstep is only tool

Re: CWrap - higher abstraction level for calling C functions

2012-02-21 Thread Jacob Carlborg
On 2012-02-21 13:12, Gour wrote: On Mon, 20 Feb 2012 20:52:04 +0100 Jacob Carlborgd...@me.com wrote: As I understand it, CWrap provides more than just bindings for a C function. Right, but, afaik, SWIG can also make more than wrapper for a C function by using typemaps, %exception etc. Does

CWrap - higher abstraction level for calling C functions

2012-02-20 Thread Denis Shelomovskij
D has complete (IMHO) compiler support for calling C functions (using extern(C)). But there is a lack of library support. Microsoft .NET Framework has such support, but it's poor (see previous thread about CWrap in digitalmars.D NG). Once original function is properly described in IDL, CWrap

Re: CWrap - higher abstraction level for calling C functions

2012-02-20 Thread Gour
On Mon, 20 Feb 2012 18:02:49 +0400 Denis Shelomovskij verylonglogin@gmail.com wrote: Hello Denis, D has complete (IMHO) compiler support for calling C functions (using extern(C)). But there is a lack of library support. I'm glad you're working on (another) bindings tool being aware that

Re: Higher abstraction level for calling C functions

2012-01-30 Thread Denis Shelomovskij
30.01.2012 4:42, Timon Gehr пишет: I suppose the unary + before the second 'num' is required to disambiguate from which array length 'num' will be deduced? Shouldn't this restriction be lifted? (Obviously, if the lengths have to match, both are fine.) Yes, this restriction isn't necessary. I

Re: Higher abstraction level for calling C functions

2012-01-30 Thread Denis Shelomovskij
30.01.2012 8:59, Kagamin пишет: static assert(__traits(compiles, HANDLE.init is null)); hmm... What declaration of HANDLE do you use? Wrapper knows nothing about non-standard types, but in `CreateFileW` the last argument is `__(in?) HANDLE hTemplateFile`, so it is an optional parameter (can

Re: Higher abstraction level for calling C functions

2012-01-30 Thread Kagamin
On Monday, 30 January 2012 at 10:53:17 UTC, Denis Shelomovskij wrote: 30.01.2012 8:59, Kagamin пишет: static assert(__traits(compiles, HANDLE.init is null)); hmm... What declaration of HANDLE do you use? Wrapper knows nothing about non-standard types, but in `CreateFileW` the last argument

Re: Higher abstraction level for calling C functions

2012-01-30 Thread Kagamin
On Monday, 30 January 2012 at 15:51:40 UTC, Kagamin wrote: On Monday, 30 January 2012 at 10:53:17 UTC, Denis Shelomovskij wrote: 30.01.2012 8:59, Kagamin пишет: static assert(__traits(compiles, HANDLE.init is null)); hmm... What declaration of HANDLE do you use? Wrapper knows nothing about

Higher abstraction level for calling C functions

2012-01-29 Thread Denis Shelomovskij
D has complete (IMHO) compiler support for calling C functions (using extern(C)). But there is a lack of library support. Readers from this NG probably know this, but... Microsoft .NET Framework has such support. Look briefly at source example in:

Re: Higher abstraction level for calling C functions

2012-01-29 Thread Marco Leise
Am 29.01.2012, 21:48 Uhr, schrieb Denis Shelomovskij verylonglogin@gmail.com: D has complete (IMHO) compiler support for calling C functions (using extern(C)). But there is a lack of library support. Readers from this NG probably know this, but... Microsoft .NET Framework has such

Re: Higher abstraction level for calling C functions

2012-01-29 Thread Timon Gehr
On 01/29/2012 09:48 PM, Denis Shelomovskij wrote: D has complete (IMHO) compiler support for calling C functions (using extern(C)). But there is a lack of library support. Readers from this NG probably know this, but... Microsoft .NET Framework has such support. Look briefly at source example

Re: Higher abstraction level for calling C functions

2012-01-29 Thread Kagamin
static assert(__traits(compiles, HANDLE.init is null)); hmm... What declaration of HANDLE do you use?