Re: How to pass a null pointer to a C function

2013-11-30 Thread Craig Dillabaugh
On Sunday, 1 December 2013 at 04:11:57 UTC, Simen Kjærås wrote: On 2013-12-01 04:46, Craig Dillabaugh wrote: Since questions about calling C from D seem to be popular today, I thought I would throw this one out there. I am trying to call a C function which takes as parameters several arrays o

Re: How to pass a null pointer to a C function

2013-11-30 Thread Simen Kjærås
On 2013-12-01 04:46, Craig Dillabaugh wrote: Since questions about calling C from D seem to be popular today, I thought I would throw this one out there. I am trying to call a C function which takes as parameters several arrays of doubles. It is valid to have some arrays passed a NULL pointers

Re: How to pass a null pointer to a C function

2013-11-30 Thread Mike Parker
On 12/1/2013 12:46 PM, Craig Dillabaugh wrote: Is there an accepted 'proper' way of passing NULL pointers to C functions from D? shape_ptrs ~= SHPCreateSimpleObject( SHPT_POLYGON, to!int(x1.length), x1.ptr, y1.ptr, null );

How to pass a null pointer to a C function

2013-11-30 Thread Craig Dillabaugh
Since questions about calling C from D seem to be popular today, I thought I would throw this one out there. I am trying to call a C function which takes as parameters several arrays of doubles. It is valid to have some arrays passed a NULL pointers in the C code. To call this from D I've com