[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/cscc/csharp cs_invoke.tc,1.24,1.25
From: |
Gopal.V <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/cscc/csharp cs_invoke.tc,1.24,1.25 |
Date: |
Thu, 01 May 2003 12:35:56 -0400 |
Update of /cvsroot/dotgnu-pnet/pnet/cscc/csharp
In directory subversions:/tmp/cvs-serv26774/cscc/csharp
Modified Files:
cs_invoke.tc
Log Message:
Fix segfault , Events into CSItemToName()
Index: cs_invoke.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csharp/cs_invoke.tc,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** cs_invoke.tc 13 Apr 2003 10:33:21 -0000 1.24
--- cs_invoke.tc 1 May 2003 16:35:53 -0000 1.25
***************
*** 1302,1305 ****
--- 1302,1306 ----
ILProperty *property;
ILClass *classInfo;
+ ILEvent *event;
/* Determine what kind of item we are dealing with */
***************
*** 1321,1325 ****
}
}
!
/* If we get here, then we do not know how to obtain the signature */
return 0;
--- 1322,1330 ----
}
}
! else if((event = ILProgramItemToEvent(item)) != 0)
! {
! return ILEvent_Type(event);
! }
!
/* If we get here, then we do not know how to obtain the signature */
return 0;
***************
*** 1733,1736 ****
--- 1738,1742 ----
ILClass *classInfo;
ILClass *owner;
+ ILEvent *event;
/* Get the name of the item, and find an underlying method */
***************
*** 1759,1762 ****
--- 1765,1775 ----
owner = classInfo;
}
+ else if((event = ILProgramItemToEvent(item)) != 0)
+ {
+ name = ILEvent_Name(event);
+ kind = IL_META_MEMBERKIND_EVENT;
+ method = 0;
+ owner = ILEvent_Owner(event);
+ }
else
{
***************
*** 1784,1793 ****
type = (owner ? ILType_FromClass(owner) : 0);
! /* The formatting is slightly different for constructors */
! if(!strcmp(name, ".ctor") || !strcmp(name, ".cctor"))
{
/* Append the class name to the string */
str = ILInternAppendedString
(str, ILInternString((char
*)CSTypeToName(type), -1));
}
else
--- 1797,1831 ----
type = (owner ? ILType_FromClass(owner) : 0);
! /* add the "event" if it is an event */
! if(kind == IL_META_MEMBERKIND_EVENT)
{
+ str = ILInternAppendedString(str, ILInternString("event ", 6));
+
+ /* Convert the event type into a string */
+ str = ILInternAppendedString
+ (str, ILInternString((char *)CSTypeToName
+
(signature), -1));
+ str = ILInternAppendedString(str, ILInternString(" ", 1));
+
/* Append the class name to the string */
str = ILInternAppendedString
(str, ILInternString((char
*)CSTypeToName(type), -1));
+
+ /* Append a dot to the string */
+ str = ILInternAppendedString(str, ILInternString(".", 1));
+
+ /* Append the event name to the string */
+ str = ILInternAppendedString(str, ILInternString((char *)name,
-1));
+
+ /* return final string to caller */
+ return str.string;
+
+ }
+ /* The formatting is slightly different for constructors */
+ else if(!strcmp(name, ".ctor") || !strcmp(name, ".cctor"))
+ {
+ /* Append the class name to the string */
+ str = ILInternAppendedString
+ (str, ILInternString((char
*)CSTypeToName(type), -1));
}
else
***************
*** 1819,1823 ****
str = ILInternAppendedString(str, ILInternString("[", 1));
}
! else
{
str = ILInternAppendedString(str, ILInternString("(", 1));
--- 1857,1861 ----
str = ILInternAppendedString(str, ILInternString("[", 1));
}
! else
{
str = ILInternAppendedString(str, ILInternString("(", 1));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/cscc/csharp cs_invoke.tc,1.24,1.25,
Gopal.V <address@hidden> <=