On Thursday, 17 March 2022 at 00:16:39 UTC, Mike Parker wrote:
On Wednesday, 16 March 2022 at 07:27:06 UTC, test wrote:
```c
struct Test {
int32_t a;
}
struct Test2 {
int32_t a;
Test arr[];
}
```
I need static const init Test2, then pass it to c library
late(third library, can not
On Wednesday, 16 March 2022 at 07:27:06 UTC, test wrote:
```c
struct Test {
int32_t a;
}
struct Test2 {
int32_t a;
Test arr[];
}
```
I need static const init Test2, then pass it to c library
late(third library, can not change the type def).
Any time you see a '[]' in C, the equi
On 3/16/22 10:03, user1234 wrote:
> On Wednesday, 16 March 2022 at 14:42:02 UTC, Era Scarecrow wrote:
>> On Wednesday, 16 March 2022 at 11:27:20 UTC, user1234 wrote:
>>> assuming the c library takes by reference
>>
>> My experience all arrays are effectively just pointers
>
> I meant the function
On Wednesday, 16 March 2022 at 14:42:02 UTC, Era Scarecrow wrote:
On Wednesday, 16 March 2022 at 11:27:20 UTC, user1234 wrote:
assuming the c library takes by reference
My experience all arrays are effectively just pointers
I meant the function that takes the Test2 as parameter, but to be
On Wednesday, 16 March 2022 at 11:27:20 UTC, user1234 wrote:
assuming the c library takes by reference
My experience all arrays are effectively just pointers, and the
brackets/length is only really applicable to stack allocated
fixed length allocations. In my own C projects i always used
po
On Wednesday, 16 March 2022 at 07:27:06 UTC, test wrote:
```c
struct Test {
int32_t a;
}
struct Test2 {
int32_t a;
Test arr[];
}
```
I need static const init Test2, then pass it to c library
late(third library, can not change the type def).
I am not sure how to do it in D.
```d
```c
struct Test {
int32_t a;
}
struct Test2 {
int32_t a;
Test arr[];
}
```
I need static const init Test2, then pass it to c library
late(third library, can not change the type def).
I am not sure how to do it in D.