[Issue 6248] New: HTOD leaves out const when translating C headers

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jul 4 18:48:53 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=6248

           Summary: HTOD leaves out const when translating C headers
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: major
          Priority: P2
         Component: htod
        AssignedTo: nobody at puremagic.com
        ReportedBy: andrej.mitrovich at gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2011-07-04 18:43:50 PDT ---
test.h:
void foo(const char *str);

$ htod -hc test.h

test.d:
/* Converted to D from test.h by htod */
module test;
extern (C):
void  foo(char *str);

This is a big problem because now this function can't be passed a string via
toStringz, or even a string literal which is implicitly zero-terminated.

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


More information about the Digitalmars-d-bugs mailing list