Summary: "Interfacing to C"
                    should make clear how to do callbacks
           Product: D
           Version: D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: websites

--- Comment #0 from AdamB <> 2010-08-31 21:59:06 PDT ---
Callbacks are an essential part of interfacing with C code.  The "Interfacing
to C" document comes close to telling you how to setup a callback but assumes
the reader knows about the "function" keyword already.  In the section where it

"C code can correspondingly call D functions, if the D functions use an
attribute that is compatible with the C compiler, most likely the extern

There should be an example showing how to setup the binding like so:

  extern (C) void registerSomeCallback(void function(int,int) yourFunc);

And then it should hyperlink to the "Delegates, Function Pointers, and
Closures" section in /function.html.

I'd be glad to make these changes myself if you like.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to