Changeset 76

Show
Ignore:
Timestamp:
12/27/07 18:27:07 (1 year ago)
Author:
stonecobra
Message:

more phobos removal

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/dbi/DBIException.d

    r70 r76  
    1 /** 
     1/** 
    22 * Authors: The D DBI project 
    33 * Copyright: BSD license 
     
    55module dbi.DBIException; 
    66 
    7 version (Phobos) { 
    8     private import std.stdarg : va_arg; 
    9 } else { 
    10     private import tango.core.Vararg : va_arg; 
    11 
     7private import tango.core.Vararg : va_arg; 
    128private import dbi.ErrorCode; 
    139 
     
    5955                dbiCode = va_arg!(ErrorCode)(_argptr); 
    6056            } else { 
    61                 version (Phobos) { 
    62                     throw new DBIException("Invalid argument of type \"" ~ _arguments[i].toString() ~ "\" passed to the DBIException constructor."); 
    63                 } else { 
    64                     throw new DBIException("Invalid argument of type \"" ~ _arguments[i].toUtf8() ~ "\" passed to the DBIException constructor."); 
    65                 } 
     57              throw new DBIException("Invalid argument of type \"" ~ _arguments[i].toString() ~ "\" passed to the DBIException constructor."); 
    6658            } 
    6759        } 
  • trunk/dbi/Database.d

    r70 r76  
    55module dbi.Database; 
    66 
    7 version (Phobos) { 
    8     private static import std.string; 
    9     debug (UnitTest) private static import std.stdio; 
    10 } else { 
    11     private static import tango.text.Util; 
    12     debug (UnitTest) private static import tango.io.Stdout; 
    13 
     7private static import tango.text.Util; 
     8private static import tango.io.Stdout; 
    149private import dbi.DBIException, dbi.Result, dbi.Row, dbi.Statement; 
    1510 
     
    201196    final protected char[][char[]] getKeywords (char[] string) { 
    202197        char[][char[]] keywords; 
    203         version (Phobos) { 
    204             foreach (char[] group; std.string.split(string, ";")) { 
    205                 if (group == "") { 
    206                     continue; 
    207                 } 
    208                 char[][] vals = std.string.split(group, "="); 
    209                 keywords[vals[0]] = vals[1]; 
     198        foreach (char[] group; tango.text.Util.delimit(string, ";")) { 
     199            if (group == "") { 
     200                continue; 
    210201            } 
    211         } else { 
    212             foreach (char[] group; tango.text.Util.delimit(string, ";")) { 
    213                 if (group == "") { 
    214                     continue; 
    215                 } 
    216                 char[][] vals = tango.text.Util.delimit(group, "="); 
    217                 keywords[vals[0]] = vals[1]; 
    218             } 
    219  
     202            char[][] vals = tango.text.Util.delimit(group, "="); 
     203            keywords[vals[0]] = vals[1]; 
    220204        } 
    221205        return keywords; 
     
    233217 
    234218unittest { 
    235     version (Phobos) { 
    236         void s1 (char[] s) { 
    237             std.stdio.writefln("%s", s); 
    238         } 
    239  
    240         void s2 (char[] s) { 
    241             std.stdio.writefln("   ...%s", s); 
    242         } 
    243     } else { 
    244         void s1 (char[] s) { 
    245             tango.io.Stdout.Stdout(s).newline(); 
    246         } 
    247  
    248         void s2 (char[] s) { 
    249             tango.io.Stdout.Stdout("   ..." ~ s).newline(); 
    250         } 
     219    void s1 (char[] s) { 
     220        tango.io.Stdout.Stdout(s).newline(); 
     221    } 
     222 
     223    void s2 (char[] s) { 
     224        tango.io.Stdout.Stdout("   ..." ~ s).newline(); 
    251225    } 
    252226 
  • trunk/dbi/Registry.d

    r70 r76  
    3636 */ 
    3737public static void registerDatabase(Registerable newDB) { 
    38     logger.trace("registering database: " ~ newDB.getPrefix()); 
     38    //logger.trace("registering provider: " ~ newDB.getPrefix()); 
    3939    dbs[newDB.getPrefix()] = newDB; 
    4040}