std.stdio.tmpfile() return shared(_IO_FILE)* and not File

2014-08-24 Thread simendsjo via Digitalmars-d-learn
Using DMD 2.066 on GNU/Linux x86_64. This is strange: import std.stdio; void main() { auto f = tmpfile(); pragma(msg, typeof(f)); // shared(_IO_FILE)* } But stdio.d looks like the following: static File tmpfile() @safe What is going on here?

Re: std.stdio.tmpfile() return shared(_IO_FILE)* and not File

2014-08-24 Thread simendsjo via Digitalmars-d-learn
On 08/24/2014 07:56 PM, simendsjo wrote: Using DMD 2.066 on GNU/Linux x86_64. This is strange: import std.stdio; void main() { auto f = tmpfile(); pragma(msg, typeof(f)); // shared(_IO_FILE)* } But stdio.d looks like the following: static File tmpfile() @safe What is

Re: std.stdio.tmpfile() return shared(_IO_FILE)* and not File

2014-08-24 Thread anonymous via Digitalmars-d-learn
On Sunday, 24 August 2014 at 17:55:05 UTC, simendsjo wrote: Using DMD 2.066 on GNU/Linux x86_64. This is strange: import std.stdio; void main() { auto f = tmpfile(); pragma(msg, typeof(f)); // shared(_IO_FILE)* } But stdio.d looks like the following: static File tmpfile() @safe

Re: std.stdio.tmpfile() return shared(_IO_FILE)* and not File

2014-08-24 Thread ketmar via Digitalmars-d-learn
On Sun, 24 Aug 2014 19:56:24 +0200 simendsjo via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: What is going on here? std.stdio does this: 'public import core.stdc.stdio'. and in core.stdc.stdio we can find this: @trusted FILE* tmpfile(); and FILE as an alias for shared(_IO_FILE),

Re: std.stdio.tmpfile() return shared(_IO_FILE)* and not File

2014-08-24 Thread simendsjo via Digitalmars-d-learn
On 08/24/2014 08:09 PM, anonymous wrote: On Sunday, 24 August 2014 at 17:55:05 UTC, simendsjo wrote: Using DMD 2.066 on GNU/Linux x86_64. This is strange: import std.stdio; void main() { auto f = tmpfile(); pragma(msg, typeof(f)); // shared(_IO_FILE)* } But stdio.d looks like