Mercurial > projects > ldc
annotate lphobos/typeinfo2/ti_C.d @ 1607:207a8a438dea
Merge DMD r253: refactor: Argument => Parameter
---
dmd/arrayop.c | 30 ++++----
dmd/arraytypes.h | 2 +-
dmd/class.c | 8 +-
dmd/declaration.c | 10 ++--
dmd/declaration.h | 16 ++--
dmd/doc.c | 12 ++--
dmd/dsymbol.c | 4 +-
dmd/expression.c | 48 +++++++-------
dmd/expression.h | 32 +++++-----
dmd/func.c | 78 +++++++++++-----------
dmd/init.c | 2 +-
dmd/interpret.c | 8 +-
dmd/mtype.c | 190 ++++++++++++++++++++++++++--------------------------
dmd/mtype.h | 32 +++++-----
dmd/opover.c | 34 +++++-----
dmd/parse.c | 40 ++++++------
dmd/parse.h | 2 +-
dmd/statement.c | 90 +++++++++++++-------------
dmd/statement.h | 14 ++--
dmd/struct.c | 8 +-
dmd/template.c | 30 ++++----
gen/functions.cpp | 10 ++--
gen/functions.h | 2 +-
gen/tocall.cpp | 10 ++--
gen/typinf.cpp | 6 +-
25 files changed, 359 insertions(+), 359 deletions(-)
author | Leandro Lucarella <llucax@gmail.com> |
---|---|
date | Wed, 06 Jan 2010 15:18:20 -0300 |
parents | 79c9ac745fbc |
children |
rev | line source |
---|---|
106 | 1 /* |
2 * Copyright (C) 2004-2005 by Digital Mars, www.digitalmars.com | |
3 * Written by Walter Bright | |
4 * | |
5 * This software is provided 'as-is', without any express or implied | |
6 * warranty. In no event will the authors be held liable for any damages | |
7 * arising from the use of this software. | |
8 * | |
9 * Permission is granted to anyone to use this software for any purpose, | |
10 * including commercial applications, and to alter it and redistribute it | |
11 * freely, in both source and binary form, subject to the following | |
12 * restrictions: | |
13 * | |
14 * o The origin of this software must not be misrepresented; you must not | |
15 * claim that you wrote the original software. If you use this software | |
16 * in a product, an acknowledgment in the product documentation would be | |
17 * appreciated but is not required. | |
18 * o Altered source versions must be plainly marked as such, and must not | |
19 * be misrepresented as being the original software. | |
20 * o This notice may not be removed or altered from any source | |
21 * distribution. | |
22 */ | |
23 | |
119
79c9ac745fbc
[svn r123] Fixed some typeinfo module name mismatches.
lindquist
parents:
106
diff
changeset
|
24 module typeinfo2.ti_C; |
106 | 25 |
26 // Object | |
27 | |
28 class TypeInfo_C : TypeInfo | |
29 { | |
30 hash_t getHash(void *p) | |
31 { | |
32 Object o = *cast(Object*)p; | |
33 assert(o); | |
34 return o.toHash(); | |
35 } | |
36 | |
37 int equals(void *p1, void *p2) | |
38 { | |
39 Object o1 = *cast(Object*)p1; | |
40 Object o2 = *cast(Object*)p2; | |
41 | |
42 return o1 == o2; | |
43 } | |
44 | |
45 int compare(void *p1, void *p2) | |
46 { | |
47 Object o1 = *cast(Object*)p1; | |
48 Object o2 = *cast(Object*)p2; | |
49 int c = 0; | |
50 | |
51 // Regard null references as always being "less than" | |
52 if (!(o1 is o2)) | |
53 { | |
54 if (o1) | |
55 { if (!o2) | |
56 c = 1; | |
57 else | |
58 c = o1.opCmp(o2); | |
59 } | |
60 else | |
61 c = -1; | |
62 } | |
63 return c; | |
64 } | |
65 | |
66 size_t tsize() | |
67 { | |
68 return Object.sizeof; | |
69 } | |
70 | |
71 uint flags() | |
72 { | |
73 return 1; | |
74 } | |
75 } | |
76 |