[svn:parrot] r48941 - in trunk/src: pmc string
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Sat Sep 11 21:59:33 UTC 2010
Author: NotFound
Date: Sat Sep 11 21:59:33 2010
New Revision: 48941
URL: https://trac.parrot.org/parrot/changeset/48941
Log:
replace several usages of Parrot_str_new_noinit(interp, 0) with CONST_STRING(interp, "")
Modified:
trunk/src/pmc/hash.pmc
trunk/src/pmc/packfile.pmc
trunk/src/pmc/packfilefixupentry.pmc
trunk/src/string/api.c
Modified: trunk/src/pmc/hash.pmc
==============================================================================
--- trunk/src/pmc/hash.pmc Sat Sep 11 20:38:01 2010 (r48940)
+++ trunk/src/pmc/hash.pmc Sat Sep 11 21:59:33 2010 (r48941)
@@ -630,7 +630,7 @@
/* XXX: shouldn't we return STRINGNULL? */
if (!b)
- return Parrot_str_new_noinit(INTERP, 0);
+ return CONST_STRING(INTERP, "");
return hash_value_to_string(INTERP, hash, b->value);
}
@@ -641,7 +641,7 @@
parrot_hash_get_bucket(INTERP, hash, hash_key_from_int(INTERP, hash, key));
if (!b)
- return Parrot_str_new_noinit(INTERP, 0);
+ return CONST_STRING(INTERP, "");
return hash_value_to_string(INTERP, hash, b->value);
}
@@ -662,7 +662,7 @@
HashBucket * const b = parrot_hash_get_bucket(INTERP, hash, hash_key);
if (!b)
- return Parrot_str_new_noinit(INTERP, 0);
+ return CONST_STRING(INTERP, "");
key = key_next(INTERP, key);
Modified: trunk/src/pmc/packfile.pmc
==============================================================================
--- trunk/src/pmc/packfile.pmc Sat Sep 11 20:38:01 2010 (r48940)
+++ trunk/src/pmc/packfile.pmc Sat Sep 11 21:59:33 2010 (r48941)
@@ -121,7 +121,7 @@
PMC_data_typed(SELF, Parrot_Packfile_attributes*);
PackFile *pf;
- attrs->uuid = Parrot_str_new_noinit(INTERP, 0);
+ attrs->uuid = CONST_STRING(INTERP, "");
attrs->directory = Parrot_pmc_new(INTERP, enum_class_PackfileDirectory);
/* Create dummy PackFile and copy default attributes to self */
Modified: trunk/src/pmc/packfilefixupentry.pmc
==============================================================================
--- trunk/src/pmc/packfilefixupentry.pmc Sat Sep 11 20:38:01 2010 (r48940)
+++ trunk/src/pmc/packfilefixupentry.pmc Sat Sep 11 21:59:33 2010 (r48941)
@@ -42,7 +42,7 @@
Parrot_PackfileFixupEntry_attributes * attrs =
PMC_data_typed(SELF, Parrot_PackfileFixupEntry_attributes*);
- attrs->name = Parrot_str_new_noinit(INTERP, 0);
+ attrs->name = CONST_STRING(INTERP, "");
PObj_custom_mark_SET(SELF);
}
Modified: trunk/src/string/api.c
==============================================================================
--- trunk/src/string/api.c Sat Sep 11 20:38:01 2010 (r48940)
+++ trunk/src/string/api.c Sat Sep 11 21:59:33 2010 (r48941)
@@ -976,7 +976,7 @@
/* Allow regexes to return $' easily for "aaa" =~ /aaa/ */
if (offset == src_length || length < 1)
- return Parrot_str_new_noinit(interp, 0);
+ return CONST_STRING(interp, "");
if (offset < 0)
true_offset = src_length + offset;
@@ -3080,7 +3080,7 @@
return NULL;
if (!src->strlen)
- return Parrot_str_new_noinit(interp, 0);
+ return CONST_STRING(interp, "");
return STRING_compose(interp, src);
}
More information about the parrot-commits
mailing list