[Issue 23513] ImportC doesn't export ncurses' attributes (C macros)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Mar 20 20:31:39 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=23513

--- Comment #4 from Walter Bright <bugzilla at digitalmars.com> ---
ImportC is currently only able to convert simple #defines to enums, i.e. ones
that are only a single token, like:

    #define A 3

More complex ones are quite a bit more difficult to programmaticaly figure out
what they are.

One pragmatic approach is to prepare by hand a table of triples:

1. the file name
2. the contents of the macro
3. the hand-crafted D translation

But, of course, this has its limits.

--


More information about the Digitalmars-d-bugs mailing list