Skip to content

Commit

Permalink
fix, file handle must not be visible.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Basile Burg committed Apr 27, 2015
1 parent dd8f5ff commit ce17abe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion std/cstream.d
Expand Up @@ -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.
Expand Down

0 comments on commit ce17abe

Please sign in to comment.