[svn:parrot] r40141 - trunk/src/gc

petdance at svn.parrot.org petdance at svn.parrot.org
Sat Jul 18 05:56:44 UTC 2009


Author: petdance
Date: Sat Jul 18 05:56:44 2009
New Revision: 40141
URL: https://trac.parrot.org/parrot/changeset/40141

Log:
consting

Modified:
   trunk/src/gc/alloc_memory.c

Modified: trunk/src/gc/alloc_memory.c
==============================================================================
--- trunk/src/gc/alloc_memory.c	Sat Jul 18 05:07:29 2009	(r40140)
+++ trunk/src/gc/alloc_memory.c	Sat Jul 18 05:56:44 2009	(r40141)
@@ -360,8 +360,8 @@
 {
     ASSERT_ARGS(mem_sys_strdup)
 
-    size_t l = strlen(src);
-    char *result = (char *)mem_sys_allocate(l + 1);
+    const size_t l = strlen(src);
+    char * const result = (char *)mem_sys_allocate(l + 1);
     memcpy(result, src, l);
     result[l] = '\0';
     return result;


More information about the parrot-commits mailing list