mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-26 00:23:14 +01:00
Added copy of druntime from DMD 2.020 modified for LDC.
This commit is contained in:
27
druntime/src/compiler/dmd/obj.d
Normal file
27
druntime/src/compiler/dmd/obj.d
Normal file
@@ -0,0 +1,27 @@
|
||||
// Copyright (c) 2002 by Digital Mars
|
||||
// All Rights Reserved
|
||||
// written by Walter Bright
|
||||
// www.digitalmars.com
|
||||
|
||||
module rt.obj;
|
||||
|
||||
extern (C):
|
||||
|
||||
/********************************
|
||||
* Compiler helper for operator == for class objects.
|
||||
*/
|
||||
|
||||
int _d_obj_eq(Object o1, Object o2)
|
||||
{
|
||||
return o1 is o2 || (o1 && o1.opEquals(o2));
|
||||
}
|
||||
|
||||
|
||||
/********************************
|
||||
* Compiler helper for operator <, <=, >, >= for class objects.
|
||||
*/
|
||||
|
||||
int _d_obj_cmp(Object o1, Object o2)
|
||||
{
|
||||
return o1.opCmp(o2);
|
||||
}
|
||||
Reference in New Issue
Block a user