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

Commit a2ee5cc

Browse files
authored
Merge pull request #2776 from JinShil/move_code
Reorganzie a few things in object.d so similar constructs are found next to each other merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2 parents 60fa829 + 79124bd commit a2ee5cc

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

src/object.d

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,6 @@ alias dstring = immutable(dchar)[];
3838

3939
version (D_ObjectiveC) public import core.attribute : selector;
4040

41-
/// See $(REF capacity, core,internal,array,capacity)
42-
public import core.internal.array.capacity: capacity;
43-
/// See $(REF reserve, core,internal,array,capacity)
44-
public import core.internal.array.capacity: reserve;
45-
/// See $(REF assumeSafeAppend, core,internal,array,capacity)
46-
public import core.internal.array.capacity: assumeSafeAppend;
47-
48-
/// See $(REF destroy, core,internal,destruction)
49-
public import core.internal.destruction: destroy;
50-
51-
private
52-
{
53-
extern (C) Object _d_newclass(const TypeInfo_Class ci);
54-
}
55-
56-
public @trusted @nogc nothrow pure extern (C) void _d_delThrowable(scope Throwable);
57-
5841
/**
5942
* All D class objects inherit from Object.
6043
*/
@@ -975,6 +958,8 @@ class TypeInfo_Delegate : TypeInfo
975958
override @property immutable(void)* rtInfo() nothrow pure const @safe { return RTInfo!(int delegate()); }
976959
}
977960

961+
private extern (C) Object _d_newclass(const TypeInfo_Class ci);
962+
978963
/**
979964
* Runtime type information about a class.
980965
* Can be retrieved from an object instance by using the
@@ -2125,6 +2110,16 @@ class Error : Throwable
21252110
}
21262111
}
21272112

2113+
/// See $(REF capacity, core,internal,array,capacity)
2114+
public import core.internal.array.capacity: capacity;
2115+
/// See $(REF reserve, core,internal,array,capacity)
2116+
public import core.internal.array.capacity: reserve;
2117+
/// See $(REF assumeSafeAppend, core,internal,array,capacity)
2118+
public import core.internal.array.capacity: assumeSafeAppend;
2119+
2120+
/// See $(REF destroy, core,internal,destruction)
2121+
public import core.internal.destruction: destroy;
2122+
21282123
extern (C)
21292124
{
21302125
// from druntime/src/rt/aaA.d
@@ -3211,6 +3206,8 @@ public import core.internal.postblit: __ArrayPostblit;
32113206
public import core.internal.switch_: __switch;
32123207
public import core.internal.switch_: __switch_error;
32133208

3209+
public @trusted @nogc nothrow pure extern (C) void _d_delThrowable(scope Throwable);
3210+
32143211
// Compare class and interface objects for ordering.
32153212
private int __cmp(Obj)(Obj lhs, Obj rhs)
32163213
if (is(Obj : Object))

0 commit comments

Comments
 (0)