develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r36134 - in branches/pdd28str_part2: include/parrot languages/lua/src/pmc src src/io src/ops src/pmc src/string

From:
allison
Date:
January 28, 2009 21:23
Subject:
[svn:parrot] r36134 - in branches/pdd28str_part2: include/parrot languages/lua/src/pmc src src/io src/ops src/pmc src/string
Message ID:
20090129052247.73B4FCB9AE@x12.develooper.com
Author: allison
Date: Wed Jan 28 21:22:46 2009
New Revision: 36134

Modified:
   branches/pdd28str_part2/include/parrot/string_funcs.h
   branches/pdd28str_part2/languages/lua/src/pmc/luastring.pmc
   branches/pdd28str_part2/src/io/filehandle.c
   branches/pdd28str_part2/src/io/socket_unix.c
   branches/pdd28str_part2/src/ops/string.ops
   branches/pdd28str_part2/src/pmc/eval.pmc
   branches/pdd28str_part2/src/pmc/filehandle.pmc
   branches/pdd28str_part2/src/pmc/hash.pmc
   branches/pdd28str_part2/src/pmc/string.pmc
   branches/pdd28str_part2/src/pmc/undef.pmc
   branches/pdd28str_part2/src/pmc_freeze.c
   branches/pdd28str_part2/src/spf_render.c
   branches/pdd28str_part2/src/string/api.c

Log:
[pdd28str] Renaming 'Parrot_str_new_noinit'.


Modified: branches/pdd28str_part2/include/parrot/string_funcs.h
==============================================================================
--- branches/pdd28str_part2/include/parrot/string_funcs.h	(original)
+++ branches/pdd28str_part2/include/parrot/string_funcs.h	Wed Jan 28 21:22:46 2009
@@ -364,7 +364,7 @@
 
 PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL
-STRING * string_make_empty(PARROT_INTERP,
+STRING * Parrot_str_new_noinit(PARROT_INTERP,
     parrot_string_representation_t representation,
     UINTVAL capacity)
         __attribute__nonnull__(1);
@@ -666,7 +666,7 @@
 #define ASSERT_ARGS_string_make_direct __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp) \
     || PARROT_ASSERT_ARG(encoding)
-#define ASSERT_ARGS_string_make_empty __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_str_new_noinit __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp)
 #define ASSERT_ARGS_string_max_bytes __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(s)

Modified: branches/pdd28str_part2/languages/lua/src/pmc/luastring.pmc
==============================================================================
--- branches/pdd28str_part2/languages/lua/src/pmc/luastring.pmc	(original)
+++ branches/pdd28str_part2/languages/lua/src/pmc/luastring.pmc	Wed Jan 28 21:22:46 2009
@@ -42,7 +42,7 @@
 
 */
     VTABLE void init() {
-        PMC_str_val(SELF) = string_make_empty(INTERP, enum_stringrep_one, 0);
+        PMC_str_val(SELF) = Parrot_str_new_noinit(INTERP, enum_stringrep_one, 0);
         PObj_custom_mark_SET(SELF);
     }
 

Modified: branches/pdd28str_part2/src/io/filehandle.c
==============================================================================
--- branches/pdd28str_part2/src/io/filehandle.c	(original)
+++ branches/pdd28str_part2/src/io/filehandle.c	Wed Jan 28 21:22:46 2009
@@ -120,7 +120,7 @@
      * when we get a NULL string, we read a default len
      */
     if (*buf == NULL) {
-        *buf = string_make_empty(interp, enum_stringrep_one, len);
+        *buf = Parrot_str_new_noinit(interp, enum_stringrep_one, len);
         return *buf;
     }
     else {

Modified: branches/pdd28str_part2/src/io/socket_unix.c
==============================================================================
--- branches/pdd28str_part2/src/io/socket_unix.c	(original)
+++ branches/pdd28str_part2/src/io/socket_unix.c	Wed Jan 28 21:22:46 2009
@@ -362,11 +362,11 @@
             case ECONNRESET:
                 /* XXX why close it on err return result is -1 anyway */
                 close(io->fd);
-                *s = string_make_empty(interp, enum_stringrep_one, 0);
+                *s = Parrot_str_new_noinit(interp, enum_stringrep_one, 0);
                 return -1;
             default:
                 close(io->fd);
-                *s = string_make_empty(interp, enum_stringrep_one, 0);
+                *s = Parrot_str_new_noinit(interp, enum_stringrep_one, 0);
                 return -1;
         }
     }

Modified: branches/pdd28str_part2/src/ops/string.ops
==============================================================================
--- branches/pdd28str_part2/src/ops/string.ops	(original)
+++ branches/pdd28str_part2/src/ops/string.ops	Wed Jan 28 21:22:46 2009
@@ -338,11 +338,11 @@
 =cut
 
 inline op new(out STR) :base_mem {
-  $1 = string_make_empty(interp, enum_stringrep_one, 0);
+  $1 = Parrot_str_new_noinit(interp, enum_stringrep_one, 0);
 }
 
 inline op new(out STR, in INT) :base_mem {
-    $1 = string_make_empty(interp, enum_stringrep_one, $2);
+    $1 = Parrot_str_new_noinit(interp, enum_stringrep_one, $2);
 }
 
 

Modified: branches/pdd28str_part2/src/pmc/eval.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/eval.pmc	(original)
+++ branches/pdd28str_part2/src/pmc/eval.pmc	Wed Jan 28 21:22:46 2009
@@ -255,7 +255,7 @@
          * effect
          */
         aligned_size = size + 15;
-        res          = string_make_empty(INTERP, enum_stringrep_one,
+        res          = Parrot_str_new_noinit(INTERP, enum_stringrep_one,
                                          aligned_size);
         res->strlen  = res->bufused = size;
 

Modified: branches/pdd28str_part2/src/pmc/filehandle.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/filehandle.pmc	(original)
+++ branches/pdd28str_part2/src/pmc/filehandle.pmc	Wed Jan 28 21:22:46 2009
@@ -432,7 +432,7 @@
                 Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_PIO_ERROR,
                                 "Cannot readall without a file name or open filehandle");
             }
-            result = string_make_empty(INTERP, enum_stringrep_one, 0);
+            result = Parrot_str_new_noinit(INTERP, enum_stringrep_one, 0);
 
             /* Do line buffering on the filehandle */
             if (!(PARROT_FILEHANDLE(SELF)->flags & PIO_F_LINEBUF))

Modified: branches/pdd28str_part2/src/pmc/hash.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/hash.pmc	(original)
+++ branches/pdd28str_part2/src/pmc/hash.pmc	Wed Jan 28 21:22:46 2009
@@ -410,7 +410,7 @@
          *      (--leo)
          */
         if (!b)
-            return string_make_empty(INTERP, enum_stringrep_one, 0);
+            return Parrot_str_new_noinit(INTERP, enum_stringrep_one, 0);
 
         return VTABLE_get_string(INTERP, (PMC*) b->value);
     }
@@ -456,7 +456,7 @@
          *      (--leo)
          */
         if (!b)
-            return string_make_empty(INTERP, enum_stringrep_one, 0);
+            return Parrot_str_new_noinit(INTERP, enum_stringrep_one, 0);
 
         nextkey = key_next(INTERP, key);
         valpmc  = (PMC *)b->value;

Modified: branches/pdd28str_part2/src/pmc/string.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/string.pmc	(original)
+++ branches/pdd28str_part2/src/pmc/string.pmc	Wed Jan 28 21:22:46 2009
@@ -35,7 +35,7 @@
 */
 
     VTABLE void init() {
-        PMC_str_val(SELF) = string_make_empty(INTERP, enum_stringrep_one, 0);
+        PMC_str_val(SELF) = Parrot_str_new_noinit(INTERP, enum_stringrep_one, 0);
         PObj_custom_mark_SET(SELF);
     }
 

Modified: branches/pdd28str_part2/src/pmc/undef.pmc
==============================================================================
--- branches/pdd28str_part2/src/pmc/undef.pmc	(original)
+++ branches/pdd28str_part2/src/pmc/undef.pmc	Wed Jan 28 21:22:46 2009
@@ -148,7 +148,7 @@
 */
 
     VTABLE STRING *get_string() {
-        return string_make_empty(INTERP, enum_stringrep_one, 0);
+        return Parrot_str_new_noinit(INTERP, enum_stringrep_one, 0);
     }
 
 /*

Modified: branches/pdd28str_part2/src/pmc_freeze.c
==============================================================================
--- branches/pdd28str_part2/src/pmc_freeze.c	(original)
+++ branches/pdd28str_part2/src/pmc_freeze.c	Wed Jan 28 21:22:46 2009
@@ -1793,7 +1793,7 @@
     else
         len = FREEZE_BYTES_PER_ITEM;
 
-    info->image = string_make_empty(interp, enum_stringrep_one, len);
+    info->image = Parrot_str_new_noinit(interp, enum_stringrep_one, len);
 }
 
 /*

Modified: branches/pdd28str_part2/src/spf_render.c
==============================================================================
--- branches/pdd28str_part2/src/spf_render.c	(original)
+++ branches/pdd28str_part2/src/spf_render.c	Wed Jan 28 21:22:46 2009
@@ -329,7 +329,7 @@
     HUGEINTVAL num;
 
     /* start with a buffer; double the pattern length to avoid realloc #1 */
-    STRING *targ = string_make_empty(interp, enum_stringrep_one, pat_len << 1);
+    STRING *targ = Parrot_str_new_noinit(interp, enum_stringrep_one, pat_len << 1);
 
     /* ts is used almost universally as an intermediate target;
      * tc is used as a temporary buffer by uint_to_string and

Modified: branches/pdd28str_part2/src/string/api.c
==============================================================================
--- branches/pdd28str_part2/src/string/api.c	(original)
+++ branches/pdd28str_part2/src/string/api.c	Wed Jan 28 21:22:46 2009
@@ -378,7 +378,7 @@
 
 /*
 
-=item C<STRING * string_make_empty>
+=item C<STRING * Parrot_str_new_noinit>
 
 Creates and returns an empty Parrot string.
 
@@ -389,10 +389,10 @@
 PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL
 STRING *
-string_make_empty(PARROT_INTERP,
+Parrot_str_new_noinit(PARROT_INTERP,
     parrot_string_representation_t representation, UINTVAL capacity)
 {
-    ASSERT_ARGS(string_make_empty)
+    ASSERT_ARGS(Parrot_str_new_noinit)
     STRING * const s = new_string_header(interp, 0);
 
     /* TODO adapt string creation functions */
@@ -1190,7 +1190,7 @@
 
         /* Allow regexes to return $' easily for "aaa" =~ /aaa/ */
         if (offset == (INTVAL)string_length(interp, src) || length < 1)
-            return string_make_empty(interp, enum_stringrep_one, 0);
+            return Parrot_str_new_noinit(interp, enum_stringrep_one, 0);
 
         if (offset < 0)
             true_offset = (UINTVAL)(src->strlen + offset);
@@ -1569,7 +1569,7 @@
 {
     ASSERT_ARGS(make_writable)
     if (!*s)
-        *s = string_make_empty(interp, representation, len);
+        *s = Parrot_str_new_noinit(interp, representation, len);
     else if ((*s)->strlen < len)
         string_grow(interp, *s, (UINTVAL)(len - (*s)->strlen));
     else if (PObj_is_cowed_TESTALL(*s))
@@ -3075,7 +3075,7 @@
         return NULL;
 
     if (!src->strlen)
-        return string_make_empty(interp, enum_stringrep_one, 0);
+        return Parrot_str_new_noinit(interp, enum_stringrep_one, 0);
 
     return CHARSET_COMPOSE(interp, src);
 }
@@ -3105,7 +3105,7 @@
     int i;
 
     if (ar_len == 0)
-        return string_make_empty(interp, enum_stringrep_one, 0);
+        return Parrot_str_new_noinit(interp, enum_stringrep_one, 0);
 
     s   = VTABLE_get_string_keyed_int(interp, ar, 0);
     res = s ? string_copy(interp, s) : NULL;



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About