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

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

[Dotgnu-pnet-commits] CVS: pnet/engine lib_type.c,1.29,1.30


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnet/engine lib_type.c,1.29,1.30
Date: Wed, 06 Nov 2002 01:21:58 -0500

Update of /cvsroot/dotgnu-pnet/pnet/engine
In directory subversions:/tmp/cvs-serv23978/engine

Modified Files:
        lib_type.c 
Log Message:


ResolveAssembly: resolve explicit assembly names that are used
with "Type.GetType".


Index: lib_type.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/lib_type.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -r1.29 -r1.30
*** lib_type.c  6 Nov 2002 01:04:02 -0000       1.29
--- lib_type.c  6 Nov 2002 06:21:55 -0000       1.30
***************
*** 268,272 ****
                                                                ILUInt16 *name, 
ILInt32 len)
  {
!       return 0;
  }
  
--- 268,303 ----
                                                                ILUInt16 *name, 
ILInt32 len)
  {
!       ILInt32 posn;
!       ILString *str;
!       char *utf8;
! 
!       /* Extract the assembly name, ignoring version and key information
!          which are unlikely to ever be the same between different CLI's */
!       while(len > 0 && (name[0] == ' ' || name[0] == '\t'))
!       {
!               ++name;
!               --len;
!       }
!       posn = 0;
!       while(posn < len && name[posn] != ' ' && name[posn] != '\t' &&
!             name[posn] != ',')
!       {
!               ++posn;
!       }
!       if(!posn)
!       {
!               return 0;
!       }
! 
!       /* Convert the name into UTF-8 */
!       str = ILStringWCreateLen(thread, name, (int)posn);
!       utf8 = ILStringToUTF8(thread, str);
!       if(!utf8)
!       {
!               return 0;
!       }
! 
!       /* Look for an image with a matching assembly name */
!       return ILContextGetAssembly(thread->process->context, utf8);
  }
  





reply via email to

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