Thread overview | |||||
---|---|---|---|---|---|
|
July 06, 2020 Calling a C function whose name is a D reserved word or keyword | ||||
---|---|---|---|---|
| ||||
Is there a special mechanism in D for handling this problem, where an existing C function might be a name that is reserved in D? Of course I could write a wrapper function in C and call that. |
July 07, 2020 Re: Calling a C function whose name is a D reserved word or keyword | ||||
---|---|---|---|---|
| ||||
Posted in reply to Cecil Ward | https://dlang.org/spec/pragma.html#mangle pragma(mangle, "body") extern(C) void body_func(); |
July 11, 2020 Re: Calling a C function whose name is a D reserved word or keyword | ||||
---|---|---|---|---|
| ||||
Posted in reply to rikki cattermole | On Monday, 6 July 2020 at 23:40:23 UTC, rikki cattermole wrote:
> https://dlang.org/spec/pragma.html#mangle
>
> pragma(mangle, "body")
> extern(C) void body_func();
Thanks, that’s excellent
|
Copyright © 1999-2021 by the D Language Foundation