https://issues.dlang.org/show_bug.cgi?id=17359
Nicholas Wilson changed:
What|Removed |Added
Status|NEW |RESOLVED
CC|
https://issues.dlang.org/show_bug.cgi?id=17359
--- Comment #4 from Walter Bright ---
To get the same results in C++ and D:
C++:
void cppFunc(float (&color)[3]) { }
D:
extern(C++) void cppFunc(ref float[3] color) { }
Both mangle to:
?cppFunc@@YAXAAY02M@Z
--
https://issues.dlang.org/show_bug.cgi?id=17359
Walter Bright changed:
What|Removed |Added
Keywords||mangling
CC|
https://issues.dlang.org/show_bug.cgi?id=17359
anonymous4 changed:
What|Removed |Added
Keywords||C++
--
https://issues.dlang.org/show_bug.cgi?id=17359
--- Comment #3 from ki...@gmx.net ---
So the proper workaround for MSVC targets would be:
C++:
bool cppFunc(float color[3])
{
for (int i = 0; i < 3; ++i) color[i] *= 2;
return true;
}
D:
pragma(mangle, "?cppFunc@@YA_NQEAM@Z")
extern(C++) b
https://issues.dlang.org/show_bug.cgi?id=17359
ki...@gmx.net changed:
What|Removed |Added
CC||ki...@gmx.net
--- Comment #2 from ki...@gmx.n
https://issues.dlang.org/show_bug.cgi?id=17359
--- Comment #1 from Peter Particle ---
As a work around, we can use Ali's variant and pragma(mangle, "mangle_string").
I found my "mangle_string" with dependency walker.
--