[Issue 11910] Writes to extern (C) struct have no effect
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jan 13 02:44:00 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=11910
Jacob Carlborg <doob at me.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |doob at me.com
--- Comment #4 from Jacob Carlborg <doob at me.com> 2014-01-13 02:43:57 PST ---
(In reply to comment #3)
> Note: +9C in mine is because my structure is actually much larger, I trimmed it
> down to log the bug. The offset 9C looks right.
>
> The debugger also illustrated 'gDefaults' as the store address, which I guess
> means the address it writes to does match the symbol record in the debug info.
> I guess the address emitted for gDefaults is wrong somehow?
> But... that symbol should come from the external C library :/
What is "gDefaults" supposed to be? A symbol from a C library? In that case you
forgot "extern", the correct declaration should be:
extern (C) extern __gshared MFDefaults gDefaults;
Have a look at: http://dlang.org/interfaceToC.html#C%20Globals
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list