mirror of
https://github.com/dlang/phobos.git
synced 2025-04-28 14:10:30 +03:00
28 lines
482 B
D
28 lines
482 B
D
|
|
|
|
// Copyright (c) 2002 by Digital Mars
|
|
// All Rights Reserved
|
|
// written by Walter Bright
|
|
// www.digitalmars.com
|
|
|
|
extern (C):
|
|
|
|
/********************************
|
|
* Compiler helper for operator == for class objects.
|
|
*/
|
|
|
|
int _d_obj_eq(Object o1, Object o2)
|
|
{
|
|
return o1 === o2 || (o1 && o1.opEquals(o2));
|
|
}
|
|
|
|
|
|
/********************************
|
|
* Compiler helper for operator <, <=, >, >= for class objects.
|
|
*/
|
|
|
|
int _d_obj_cmp(Object o1, Object o2)
|
|
{
|
|
return o1.opCmp(o2);
|
|
}
|
|
|