dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnet/image meta_types.c,1.10,1.11


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnet/image meta_types.c,1.10,1.11
Date: Thu, 22 May 2003 22:32:27 -0400

Update of /cvsroot/dotgnu-pnet/pnet/image
In directory subversions:/tmp/cvs-serv23351/image

Modified Files:
        meta_types.c 
Log Message:


ILTypeIsEnum: recognize enumerated types even if the base class
library is not loaded.


Index: meta_types.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/image/meta_types.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** meta_types.c        14 Apr 2003 04:42:09 -0000      1.10
--- meta_types.c        23 May 2003 02:32:25 -0000      1.11
***************
*** 1098,1102 ****
  int ILTypeIsEnum(ILType *type)
  {
!       return (ILTypeGetEnumType(type) != type);
  }
  
--- 1098,1116 ----
  int ILTypeIsEnum(ILType *type)
  {
!       if(ILType_IsValueType(type))
!       {
!               ILClass *classInfo = ILClassResolve(ILType_ToValueType(type));
!               ILClass *parent = ILClass_Parent(classInfo);
!               if(parent)
!               {
!                       const char *namespace = ILClass_Namespace(parent);
!                       if(namespace && !strcmp(namespace, "System") &&
!                          !strcmp(ILClass_Name(parent), "Enum"))
!                       {
!                               return 1;
!                       }
!               }
!       }
!       return 0;
  }
  





reply via email to

[Prev in Thread] Current Thread [Next in Thread]