Skip to content

Commit

Permalink
fix more import insufficiency
Browse files Browse the repository at this point in the history
  • Loading branch information
9rnsr committed Dec 30, 2013
1 parent 72a1c4d commit b00f09b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 12 additions & 2 deletions std/stdio.d
Expand Up @@ -1689,6 +1689,8 @@ the contents may well have changed).

unittest
{
// static import std.file;
//
// auto deleteme = testFilename();
// rndGen.popFront();
// scope(failure) printf("Failed test at line %d\n", __LINE__);
Expand Down Expand Up @@ -1860,6 +1862,8 @@ $(D StdioException).

unittest
{
static import std.file;

scope(failure) printf("Failed test at line %d\n", __LINE__);

auto deleteme = testFilename();
Expand Down Expand Up @@ -3420,8 +3424,11 @@ private size_t readlnImpl(FILE* fps, ref char[] buf, dchar terminator = '\n')
version (GCC_IO)
private size_t readlnImpl(FILE* fps, ref char[] buf, dchar terminator = '\n')
{
import std.utf : encode;

if (fwide(fps, 0) > 0)
{ /* Stream is in wide characters.
{
/* Stream is in wide characters.
* Read them and convert to chars.
*/
FLOCK(fps);
Expand Down Expand Up @@ -3505,11 +3512,14 @@ private size_t readlnImpl(FILE* fps, ref char[] buf, dchar terminator = '\n')
version (GENERIC_IO)
private size_t readlnImpl(FILE* fps, ref char[] buf, dchar terminator = '\n')
{
import std.utf : encode;

FLOCK(fps);
scope(exit) FUNLOCK(fps);
auto fp = cast(_iobuf*)fps;
if (fwide(fps, 0) > 0)
{ /* Stream is in wide characters.
{
/* Stream is in wide characters.
* Read them and convert to chars.
*/
version (Windows)
Expand Down
2 changes: 2 additions & 0 deletions std/utf.d
Expand Up @@ -1929,6 +1929,8 @@ unittest

unittest
{
import std.algorithm : filter;

assertCTFEable!(
{
foreach (S; TypeTuple!( char[], const char[], string,
Expand Down

0 comments on commit b00f09b

Please sign in to comment.