www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Calling a C function whose name is a D reserved word or keyword

reply Cecil Ward <cecil cecilward.com> writes:
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.
Jul 06 2020
parent reply rikki cattermole <rikki cattermole.co.nz> writes:
https://dlang.org/spec/pragma.html#mangle

pragma(mangle, "body")
extern(C) void body_func();
Jul 06 2020
parent Cecil Ward <cecil cecilward.com> writes:
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
Jul 11 2020