fix, file handle must not be visible.

to change directly the handle could lead to leak the handle in `close()` because `isopen` was not defined
like it's the case when the `file()` setter is properly called.

possible breakage: no property...for class...
CFile.file() must be called instead.
This commit is contained in:
Basile Burg 2015-04-27 22:51:18 +02:00
parent dd8f5ffe45
commit ce17abef87

View file

@ -33,7 +33,7 @@ import std.algorithm;
* A Stream wrapper for a C file of type FILE*.
*/
class CFile : Stream {
FILE* cfile;
protected FILE* cfile;
/**
* Create the stream wrapper for the given C file.