www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2119] New: Please provide example of interfacing to C struct

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2119

           Summary: Please provide example of interfacing to C struct
           Product: D
           Version: 2.014
          Platform: PC
               URL: interfaceToC.html
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: www.digitalmars.com
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: jlquinn optonline.net


It would be nice to see an example of exporting a C struct to D, such as that
returned by stat().


-- 
May 20 2008
next sibling parent "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
<d-bugmail puremagic.com> wrote in message 
news:bug-2119-3 http.d.puremagic.com/issues/...
 http://d.puremagic.com/issues/show_bug.cgi?id=2119

           Summary: Please provide example of interfacing to C struct
           Product: D
           Version: 2.014
          Platform: PC
               URL: interfaceToC.html
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: www.digitalmars.com
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: jlquinn optonline.net


 It would be nice to see an example of exporting a C struct to D, such as 
 that
 returned by stat().
D structs are, by design, binary-compatible with C structs. You just.. write it. Also see the sections on structs here: http://www.digitalmars.com/d/1.0/htomodule.html
May 22 2008
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2119


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |andrej.mitrovich gmail.com
         Resolution|                            |FIXED



16:09:57 PST ---
See http://dlang.org/interfaceToC.html section Structs and Unions.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 01 2012