On Monday, 20 June 2016 at 13:50:45 UTC, Johan Engelen wrote:
On Monday, 20 June 2016 at 12:33:31 UTC, Guillaume Chatelet wrote:

class Expression;
extern(C++) void foo(Expression);

Question:
---------
- How to I get the linkage for Expression from a FunDeclaration? This will ensure the added indirection is put only for the D classes, not the C++ ones. I tried looking at Parameter, ClassDeclaration or TypeClass but couldn't find it.

A FuncDeclaration is a Declaration, which contains the field `LINK linkage;`. That's the one you want.

-Johan

Thx Johan. I'm confused though: `FuncDeclaration.linkage` is the linkage for the function (which I already know is C++ function since I'm mangling it) but I need the linkage for the Parameter. Parameter has a Type but I can't get the linkage from here. What did I miss?

Reply via email to