dpp icon indicating copy to clipboard operation
dpp copied to clipboard

Directly include C headers in D source code

Results 90 dpp issues
Sort by recently updated
recently updated
newest added

E.g. in include/linux/kernel.h, there are macro definitions for max and min, which conflict with dlang's own max and min functions present in the .dpp file. In this case, I use...

I thought I would tackle the problem introduced by Murilo Miranda at https://www.facebook.com/groups/ProgrammingInDlang/?multi_permalinks=1196551170736883%2C1196081524117181%2C1195634324161901%2C1195580357500631&notif_id=1588807395656256&notif_t=group_activity&ref=notif I created x_stuff.dpp: ```d #include int main() { /* Fake the pointer movement to new relative position...

bug
help wanted

C header: ```C unsigned int val; #define MMIO32(addr) (*(volatile unsigned int *)(addr)) #define VOL_VAL MMIO32(&val) ``` dpp code what uses this macros: ```D VOL_VAL |= 1; ``` Produced D code:...

I tried to create bindings for libuv, so: `uv.dpp` ```d module uv; #include "libuv/uv.h" ``` `d++ --preprocess-only uv.dpp` It start running with 200+-mb of memory usage, no errors. Then it...

can't reproduce

See here for an example https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/core/core/inc/az_span.h#L91 ``` AZ_NODISCARD AZ_INLINE az_span az_span_init(uint8_t * ptr, int32_t length, int32_t capacity) { return (az_span){ ._internal = { .ptr = ptr, .length = length, .capacity...

bug
workaround

To reproduce, try to preprocess `#include ` The result is this error: ``` Could not translate cursor Cursor(FunctionTemplate, "emplace_back", Type(FunctionProto, "typename vector::reference (_Args &&...)")) msg: Could not find namespaceless 'vector::reference'...

enhancement

It seems Debian Sid does not have a libclang.so: ``` |> dub build --compiler=/usr/bin/ldc2 --build=release Fetching libclang 0.0.11 (getting selected version)... Fetching sumtype 0.4.1 (getting selected version)... Performing "release" build...

help wanted

For example, when translating kernel header files, memory usage for d++ reached 6-7GB on an 8GB machine (and we no longer could spawn a process for CPP to preprocess the...