http://d.puremagic.com/issues/show_bug.cgi?id=3604
Summary: extern(C) callable function with array parameters broken Product: D Version: unspecified Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bary...@smp.if.uj.edu.pl --- Comment #0 from Witold Baryluk <bary...@smp.if.uj.edu.pl> 2009-12-10 10:17:12 PST --- I found a regression in 2.037. It was working in 2.032. import core.sys.posix.unistd : pipe; void main() { int[2] input, output; writefln("input: %s", input); writefln("input.ptr: %s", input.ptr); writefln("cast input: %s", cast(char*)input); ttt(input); if (pipe(input) != 0) { throw new Exception("can't create input pipe"); } else { writeln("ok"); } } extern(C) int ttt(int[2] x) { writefln("x = %s", x); writefln("x[0] = %s", x[0]); writefln("x[1] = %s", x[1]); return 0; } this programs print: ==== input: 0 0 input.ptr: BF85E068 cast input: BF85E068 x = 0 0 x[0] = 0 x[1] = 0 object.Exception: can't create input pipe ==== but should: ==== input: 0 0 input.ptr: BF85E068 cast input: BF85E068 x = BF85E068 x[0] = 0 x[1] = 0 ok ==== -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------