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 lib_attrs.c,1.10,1.11


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnet/image lib_attrs.c,1.10,1.11
Date: Fri, 05 Sep 2003 03:45:13 -0400

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

Modified Files:
        lib_attrs.c 
Log Message:


Convert instances of "SecurityPermissionAttribute" into security declarations;
update the compiler and assembler to process security declarations.


Index: lib_attrs.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/image/lib_attrs.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** lib_attrs.c 24 Jul 2003 05:26:25 -0000      1.10
--- lib_attrs.c 5 Sep 2003 07:45:11 -0000       1.11
***************
*** 787,790 ****
--- 787,791 ----
  {
        char *newStr;
+       int len;
  
        /* Bail out if we ran out of memory last time */
***************
*** 795,799 ****
  
        /* Allocate space for the new string */
!       newStr = (char *)ILRealloc(str1, strlen(str1) + strlen(str2) + 1);
        if(!newStr)
        {
--- 796,801 ----
  
        /* Allocate space for the new string */
!       len = strlen(str1);
!       newStr = (char *)ILRealloc(str1, len + strlen(str2) + 1);
        if(!newStr)
        {
***************
*** 803,808 ****
  
        /* Create the new string */
!       strcpy(newStr, str1);
!       strcat(newStr, str2);
        return newStr;
  }
--- 805,809 ----
  
        /* Create the new string */
!       strcpy(newStr + len, str2);
        return newStr;
  }
***************
*** 881,889 ****
        char *result;
        int comma;
- #if 0
        void *utf16;
        unsigned long utf16Len;
        ILDeclSecurity *decl;
- #endif
  
        /* The item must be a class, method, or assembly */
--- 882,888 ----
***************
*** 1009,1014 ****
                 "   <IPermission class=\"System.Security.Permissions."
                                "SecurityAttribute, mscorlib\"\r\n"
!                "                 version=\"1\"\r\n"
!                "                 Flags=\"");
        comma = 0;
        result = ConcatFlag(flags, 0x0000, result, "NoFlags", &comma);
--- 1008,1013 ----
                 "   <IPermission class=\"System.Security.Permissions."
                                "SecurityAttribute, mscorlib\"\r\n"
!                "                version=\"1\"\r\n"
!                "                Flags=\"");
        comma = 0;
        result = ConcatFlag(flags, 0x0000, result, "NoFlags", &comma);
***************
*** 1035,1039 ****
        }
  
- #if 0 /* Commented out for now, until the rest is implemented - TODO */
        /* Convert the string into UTF-16 */
        utf16 = StringToUTF16(result, &utf16Len);
--- 1034,1037 ----
***************
*** 1061,1067 ****
        /* The attribute has been converted */
        return 1;
- #endif
-       ILFree(result);
-       return 0;
  }
  
--- 1059,1062 ----





reply via email to

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