about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--027call_ingredient.cc3
-rw-r--r--038new_text.cc11
2 files changed, 13 insertions, 1 deletions
diff --git a/027call_ingredient.cc b/027call_ingredient.cc
index fe9db13c..b9195658 100644
--- a/027call_ingredient.cc
+++ b/027call_ingredient.cc
@@ -172,7 +172,8 @@ case INGREDIENT: {
 
 //: a particularly common array type is the string, or address:array:character
 :(code)
-bool is_mu_string(const reagent& x) {
+bool is_mu_string(reagent/*copy*/ x) {
+  // Begin is_mu_string(x)
   return x.type
     && x.type->value == get(Type_ordinal, "address")
     && x.type->right
diff --git a/038new_text.cc b/038new_text.cc
index 90a2fd67..33508395 100644
--- a/038new_text.cc
+++ b/038new_text.cc
@@ -86,6 +86,17 @@ def main [
 ]
 +app: abc foo
 
+:(scenario stash_string_as_array)
+def main [
+  1:address:array:character <- new [abc]
+  stash *1:address:array:character
+]
++app: 3 97 98 99
+
+//: fixes way more than just stash
+:(after "Begin is_mu_string(x)")
+if (!canonize_type(x)) return false;
+
 //: Allocate more to routine when initializing a literal string
 :(scenario new_string_overflow)
 % Initial_memory_per_routine = 2;