Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changeset 1943

Show
Ignore:
Timestamp:
03/20/07 17:12:54 (2 years ago)
Author:
kris
Message:

revised expressions to avoid GDC 0.23 bugs

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tango/stdc/stringz.d

    r1939 r1943  
    1919char* toUtf8z (char[] s) 
    2020{ 
    21         return s.ptr ? (s ~ '\0').ptr : null; 
     21        if (s.ptr) 
     22            s ~= '\0'; 
     23        return s.ptr; 
    2224} 
    2325 
     
    3739wchar* toUtf16z (wchar[] s) 
    3840{ 
    39         return s.ptr ? (s ~ "\0"w).ptr : null; 
     41        if (s.ptr) 
     42            s ~= "\0"w; 
     43        return s.ptr; 
    4044} 
    4145