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

Commit f14c296

Browse files
committed
Review
1 parent 48a4570 commit f14c296

File tree

1 file changed

+2
-28
lines changed

1 file changed

+2
-28
lines changed

src/rt/util/typeinfo.d

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -596,32 +596,6 @@ static if (__traits(hasMember, TypeInfo, "argTypes"))
596596
t2 == typeid(real));
597597
}
598598

599-
// All pointer types are represented by `TypeInfo_P`.
600-
// Please keep in sync with `TypeInfo_Pointer`.
601-
class TypeInfo_P : TypeInfoGeneric!(void*)
602-
{
603-
const: nothrow: pure: @trusted:
604-
605-
override size_t getHash(scope const void* p)
606-
{
607-
size_t addr = cast(size_t) *cast(const void**)p;
608-
return addr ^ (addr >> 4);
609-
}
610-
611-
override @property uint flags() nothrow pure const { return 1; }
612-
}
613-
614-
unittest
615-
{
616-
with (new TypeInfo_P)
617-
{
618-
int x;
619-
int* p = &x;
620-
assert(getHash(&p) != 0);
621-
assert(flags == 1);
622-
}
623-
}
624-
625599
// Arrays of all integrals.
626600
class TypeInfo_Ab : TypeInfoArrayGeneric!bool {}
627601
class TypeInfo_Ag : TypeInfoArrayGeneric!byte {}
@@ -642,7 +616,7 @@ class TypeInfo_Aw : TypeInfoArrayGeneric!dchar {}
642616
class TypeInfo_Al : TypeInfoArrayGeneric!long {}
643617
class TypeInfo_Am : TypeInfoArrayGeneric!ulong {}
644618

645-
extern (C) void[] _adSort(void[] a, TypeInfo ti);
619+
private extern (C) void[] _adSort(void[] a, TypeInfo ti);
646620

647621
unittest
648622
{
@@ -658,7 +632,7 @@ unittest
658632

659633
unittest
660634
{
661-
// Issue 13073: original code uses int subtraction which is susceptible to
635+
// https://issues.dlang.org/show_bug.cgi?id=13073: original code uses int subtraction which is susceptible to
662636
// integer overflow, causing the following case to fail.
663637
int[] a = [int.max, int.max];
664638
int[] b = [int.min, int.min];

0 commit comments

Comments
 (0)