Thread overview
[Issue 12601] Nested functions and properties increase size of struct.
Apr 20, 2014
mrdarksys
Apr 20, 2014
Andrej Mitrovic
[Issue 12601] Nested structs get a context pointer even if they don't need one
Apr 20, 2014
Andrej Mitrovic
Apr 20, 2014
Andrej Mitrovic
April 20, 2014
https://issues.dlang.org/show_bug.cgi?id=12601

mrdarksys <mrdarksys@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mrdarksys@gmail.com

--
April 20, 2014
https://issues.dlang.org/show_bug.cgi?id=12601

Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich@gmail.com

--- Comment #1 from Andrej Mitrovic <andrej.mitrovich@gmail.com> ---
This is really an issue with the structs implicitly getting a context pointer when they have no reason to own one. I think this bug is filed somewhere already though.

As a workaround add 'static' to your C struct definition.

--
April 20, 2014
https://issues.dlang.org/show_bug.cgi?id=12601

Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|x86_64                      |All
            Summary|Nested functions and        |Nested structs get a
                   |properties increase size of |context pointer even if
                   |struct.                     |they don't need one
                 OS|Linux                       |All
           Severity|major                       |normal

--
April 20, 2014
https://issues.dlang.org/show_bug.cgi?id=12601

Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #2 from Andrej Mitrovic <andrej.mitrovich@gmail.com> ---


*** This issue has been marked as a duplicate of issue 10276 ***

--