Ali Çehreli:
Is that the C extension where the last array in a struct can
have more elements than its size? That will be a problem in D.
Since V.2.065 D supports well variable-length structs. You have
to use ubyte[0] data, and then allocate a large enough memory for
the whole variable-length
On Tue, 04 Feb 2014 11:16:00 -0800, Ali Çehreli wrote:
> Is that the C extension where the last array in a struct can have more
> elements than its size? That will be a problem in D.
yes it is.
> int[] D_slice = C_array[0 .. C_array_number_of_elements];
Thank you, that gives me what I wa
On 02/04/2014 10:58 AM, ollie wrote:
> I have a C Struct:
[...]
> uintdata_size;
> ubyte[1]data;
Is that the C extension where the last array in a struct can have more
elements than its size? That will be a problem in D.
> }
>
> libraw
I have a C Struct:
typedef struct
{
enum LibRaw_image_formats type;
ushort height,
width,
colors,
bits;
unsigned int data_size;
unsigned char data[1];
}libraw_processed_image_t;
with a D version