Mercurial > projects > ldc
comparison druntime/src/compiler/dmd/obj.d @ 1458:e0b2d67cfe7c
Added druntime (this should be removed once it works).
author | Robert Clipsham <robert@octarineparrot.com> |
---|---|
date | Tue, 02 Jun 2009 17:43:06 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1456:7b218ec1044f | 1458:e0b2d67cfe7c |
---|---|
1 /** | |
2 * Containts object comparator functions called by generated code. | |
3 * | |
4 * Copyright: Copyright Digital Mars 2002 - 2009. | |
5 * License: <a href="http://www.boost.org/LICENSE_1_0.txt>Boost License 1.0</a>. | |
6 * Authors: Walter Bright | |
7 * | |
8 * Copyright Digital Mars 2000 - 2009. | |
9 * Distributed under the Boost Software License, Version 1.0. | |
10 * (See accompanying file LICENSE_1_0.txt or copy at | |
11 * http://www.boost.org/LICENSE_1_0.txt) | |
12 */ | |
13 module rt.obj; | |
14 | |
15 extern (C): | |
16 | |
17 /******************************** | |
18 * Compiler helper for operator == for class objects. | |
19 */ | |
20 | |
21 int _d_obj_eq(Object o1, Object o2) | |
22 { | |
23 return o1 is o2 || (o1 && o1.opEquals(o2)); | |
24 } | |
25 | |
26 | |
27 /******************************** | |
28 * Compiler helper for operator <, <=, >, >= for class objects. | |
29 */ | |
30 | |
31 int _d_obj_cmp(Object o1, Object o2) | |
32 { | |
33 return o1.opCmp(o2); | |
34 } |