[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/cscc/csharp cs_gather.c,1.27,1.28
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/cscc/csharp cs_gather.c,1.27,1.28 |
Date: |
Wed, 20 Nov 2002 19:59:55 -0500 |
Update of /cvsroot/dotgnu-pnet/pnet/cscc/csharp
In directory subversions:/tmp/cvs-serv580/cscc/csharp
Modified Files:
cs_gather.c
Log Message:
Fully qualify explicit interface override names.
Index: cs_gather.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csharp/cs_gather.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -r1.27 -r1.28
*** cs_gather.c 21 Nov 2002 00:27:29 -0000 1.27
--- cs_gather.c 21 Nov 2002 00:59:53 -0000 1.28
***************
*** 806,809 ****
--- 806,841 ----
/*
+ * Get the full name of an explicit interface override member.
+ */
+ static char *GetFullExplicitName(ILClass *interface, char *memberName)
+ {
+ char *name;
+ if(ILClass_Namespace(interface) != 0)
+ {
+ name = ILInternAppendedString
+ (ILInternAppendedString
+ (ILInternString
+ ((char *)ILClass_Namespace(interface),
-1),
+ ILInternString(".", 1)),
+ ILInternString
+ ((char *)ILClass_Name(interface), -1)).string;
+ name = ILInternAppendedString
+ (ILInternAppendedString
+ (ILInternString(name, -1),
+ ILInternString(".", 1)),
+ ILInternString(memberName, -1)).string;
+ }
+ else
+ {
+ name = ILInternAppendedString
+ (ILInternAppendedString
+ (ILInternString((char
*)ILClass_Name(interface), -1),
+ ILInternString(".", 1)),
+ ILInternString(memberName, -1)).string;
+ }
+ return name;
+ }
+
+ /*
* Create a method definition.
*/
***************
*** 855,858 ****
--- 887,894 ----
{
interface = ILType_ToClass(signature);
+
+ /* Modify the method name to include the
fully-qualified
+ form of the interface's class name */
+ name = GetFullExplicitName(interface,
basicName);
}
}
***************
*** 1187,1190 ****
--- 1223,1227 ----
{
char *name;
+ char *basicName;
ILType *propType;
ILType *tempType;
***************
*** 1221,1224 ****
--- 1258,1263 ----
/* Qualified property name that overrides some interface
property */
name = ILQualIdentName(property->name, 0);
+ basicName = ILQualIdentName
+ (((ILNode_QualIdent *)(property->name))->right, 0);
signature = CSSemType
(((ILNode_QualIdent *)(property->name))->left,
info,
***************
*** 1233,1236 ****
--- 1272,1280 ----
CSTypeToName(signature));
}
+ else
+ {
+ name =
GetFullExplicitName(ILType_ToClass(signature),
+
basicName);
+ }
}
if(ILClass_IsInterface(classInfo))
***************
*** 1357,1360 ****
--- 1401,1405 ----
{
char *name;
+ char *basicName;
ILNode *eventName;
ILEvent *eventInfo;
***************
*** 1392,1395 ****
--- 1437,1442 ----
/* Qualified event name that overrides some interface event */
name = ILQualIdentName(eventName, 0);
+ basicName = ILQualIdentName
+ (((ILNode_QualIdent *)eventName)->right, 0);
signature = CSSemType
(((ILNode_QualIdent *)eventName)->left, info,
***************
*** 1404,1407 ****
--- 1451,1459 ----
"`%s' is not an
interface",
CSTypeToName(signature));
+ }
+ else
+ {
+ name =
GetFullExplicitName(ILType_ToClass(signature),
+
basicName);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/cscc/csharp cs_gather.c,1.27,1.28,
Rhys Weatherley <address@hidden> <=