Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 75eb3c6

Browse files
Merge pull request #2403 from edi33416/core_utf
Make rt utf publicly available
2 parents d0ea867 + 814ccea commit 75eb3c6

File tree

9 files changed

+13
-10
lines changed

9 files changed

+13
-10
lines changed

mak/COPY

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ COPY=\
2424
$(IMPDIR)\core\internal\spinlock.d \
2525
$(IMPDIR)\core\internal\string.d \
2626
$(IMPDIR)\core\internal\traits.d \
27+
$(IMPDIR)\core\internal\utf.d \
2728
\
2829
$(IMPDIR)\core\stdc\assert_.d \
2930
$(IMPDIR)\core\stdc\complex.d \

mak/DOCS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,4 +157,3 @@ DOCS=\
157157
$(DOCDIR)\rt_util_container_treap.html \
158158
$(DOCDIR)\rt_util_random.html \
159159
$(DOCDIR)\rt_util_typeinfo.html \
160-
$(DOCDIR)\rt_util_utf.html \

mak/SRCS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ SRCS=\
2424
src\core\internal\spinlock.d \
2525
src\core\internal\string.d \
2626
src\core\internal\traits.d \
27+
src\core\internal\utf.d \
2728
\
2829
src\core\stdc\assert_.d \
2930
src\core\stdc\complex.d \
@@ -367,7 +368,6 @@ SRCS=\
367368
src\rt\util\array.d \
368369
src\rt\util\random.d \
369370
src\rt\util\typeinfo.d \
370-
src\rt\util\utf.d \
371371
src\rt\util\container\array.d \
372372
src\rt\util\container\common.d \
373373
src\rt\util\container\hashtab.d \

mak/WINDOWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ $(IMPDIR)\core\internal\string.d : src\core\internal\string.d
117117
$(IMPDIR)\core\internal\traits.d : src\core\internal\traits.d
118118
copy $** $@
119119

120+
$(IMPDIR)\core\internal\utf.d : src\core\internal\utf.d
121+
copy $** $@
122+
120123
$(IMPDIR)\core\stdc\assert_.d : src\core\stdc\assert_.d
121124
copy $** $@
122125

src/rt/util/utf.d renamed to src/core/internal/utf.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
* Copyright: Copyright Digital Mars 2003 - 2016.
1717
* License: $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0).
1818
* Authors: Walter Bright, Sean Kelly
19-
* Source: $(DRUNTIMESRC rt/util/_utf.d)
19+
* Source: $(DRUNTIMESRC core/internal/_utf.d)
2020
*/
2121

22-
module rt.util.utf;
22+
module core.internal.utf;
2323

2424
extern (C) void onUnicodeError( string msg, size_t idx, string file = __FILE__, size_t line = __LINE__ ) @safe pure;
2525

src/rt/aApply.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111
module rt.aApply;
1212

13-
private import rt.util.utf : decode, toUTF8;
13+
import core.internal.utf : decode, toUTF8;
1414

1515
/**********************************************/
1616
/* 1 argument versions */

src/rt/aApplyR.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module rt.aApplyR;
2020
* and dchar, and 2 of each of those.
2121
*/
2222

23-
private import rt.util.utf;
23+
import core.internal.utf;
2424

2525
/**********************************************/
2626
/* 1 argument versions */

src/rt/adi.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ private
1919
import core.stdc.string;
2020
import core.stdc.stdlib;
2121
import core.memory;
22-
import rt.util.utf;
22+
import core.internal.utf;
2323

2424
extern (C) void[] _adSort(void[] a, TypeInfo ti);
2525
}

src/rt/cover.d

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ private
2323
import core.stdc.config : c_long;
2424
import core.stdc.stdio;
2525
import core.stdc.stdlib;
26-
import rt.util.utf;
26+
import core.internal.utf;
2727

2828
struct BitArray
2929
{
@@ -408,7 +408,7 @@ string chomp( string str, string delim = null )
408408
// open/create file for read/write, pointer at beginning
409409
FILE* openOrCreateFile(string name)
410410
{
411-
import rt.util.utf : toUTF16z;
411+
import core.internal.utf : toUTF16z;
412412

413413
version (Windows)
414414
immutable fd = _wopen(toUTF16z(name), _O_RDWR | _O_CREAT | _O_BINARY, _S_IREAD | _S_IWRITE);
@@ -474,7 +474,7 @@ version (Windows) extern (C) int chsize(int fd, c_long size);
474474

475475
bool readFile(string name, ref char[] buf)
476476
{
477-
import rt.util.utf : toUTF16z;
477+
import core.internal.utf : toUTF16z;
478478

479479
version (Windows)
480480
auto file = _wfopen(toUTF16z(name), "rb"w.ptr);

0 commit comments

Comments
 (0)