Update of /cvsroot/boost/boost/tools/jam/src
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10814

Modified Files:
      Tag: Boost_Jam_994
        execunix.c 
Log Message:
Change mem allocation to use common macros.

Index: execunix.c
===================================================================
RCS file: /cvsroot/boost/boost/tools/jam/src/execunix.c,v
retrieving revision 1.10.2.5
retrieving revision 1.10.2.6
diff -u -d -r1.10.2.5 -r1.10.2.6
--- execunix.c  2 Jun 2007 05:47:33 -0000       1.10.2.5
+++ execunix.c  2 Jun 2007 15:19:23 -0000       1.10.2.6
@@ -225,8 +225,8 @@
             len = strlen(rule_name) + strlen(target) + 2;
             if (cmdtab[slot].com_len < len) 
             {
-                free(cmdtab[ slot ].command);
-                cmdtab[ slot ].command = malloc(len);
+                BJAM_FREE(cmdtab[ slot ].command);
+                cmdtab[ slot ].command = BJAM_MALLOC(len);
                 cmdtab[ slot ].com_len = len;
             }
             strcpy(cmdtab[ slot ].command, rule_name);
@@ -235,7 +235,7 @@
         }
         else
         {
-            free(cmdtab[ slot ].command);
+            BJAM_FREE(cmdtab[ slot ].command);
             cmdtab[ slot ].command = 0;
             cmdtab[ slot ].com_len = 0;
         }
@@ -275,7 +275,7 @@
         if (!cmdtab[i].buffer[s])
         {
             /* never been allocated */
-            cmdtab[i].buffer[s] = (char*)malloc(ret+1);
+            cmdtab[i].buffer[s] = (char*)BJAM_MALLOC(ret+1);
             memcpy(cmdtab[i].buffer[s], buffer, ret+1);
         }
         else
@@ -283,10 +283,10 @@
             /* previously allocated */
             char *tmp = cmdtab[i].buffer[s];
             len = strlen(tmp);
-            cmdtab[i].buffer[s] = (char*)malloc(len+ret+1);
+            cmdtab[i].buffer[s] = (char*)BJAM_MALLOC(len+ret+1);
             memcpy(cmdtab[i].buffer[s], tmp, len);
             memcpy(cmdtab[i].buffer[s]+len, buffer, ret+1);
-            free(tmp);
+            BJAM_FREE(tmp);
         }
     }
 
@@ -395,10 +395,10 @@
                                 fprintf(stderr, "%s", cmdtab[i].buffer[ERR]);
                         }
 
-                        free(cmdtab[i].buffer[OUT]);
+                        BJAM_FREE(cmdtab[i].buffer[OUT]);
                         cmdtab[i].buffer[OUT] = 0;
 
-                        free(cmdtab[i].buffer[ERR]);
+                        BJAM_FREE(cmdtab[i].buffer[ERR]);
                         cmdtab[i].buffer[ERR] = 0;
 
                         times(&new_time);


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to