On 14-08-2012 14:00, Daniel Murphy wrote:
"Alex Rønne Petersen" <a...@lycus.org> wrote in message
news:k0bs29$1bpl$1...@digitalmars.com...
On 13-08-2012 23:34, Walter Bright wrote:
On 8/13/2012 12:41 PM, Sean Kelly wrote:
I've thought many times about adding a D feature that allows one to
specify "use this random character string instead of the identifier as
the symbol name when writing the object file", but never got around to
it.
I've wanted a feature like that on several occasions (mostly when
interfacing with non-C/C++ languages). How hard it would it be to
implement? Theoretically, it sounds simple enough.
Pretty easy. I can't remember why I wanted this in the first place, maybe
trying to interface with c longs? It probably needs updating (being over a
year old) but the code is trivial.
https://github.com/yebblies/dmd/pull/new/pragma_mangle
Thanks for the link! I hacked something together before I saw your post
and it looks surprisingly similar (though my version is a bit more
lenient in what it allows in symbol names and how many declarations it
can affect): https://github.com/D-Programming-Language/dmd/pull/1085
--
Alex Rønne Petersen
a...@lycus.org
http://lycus.org