about summary refs log tree commit diff stats
path: root/html/043space.cc.html
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-09-10 10:43:19 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-09-10 10:43:19 -0700
commit44c1aeef226542d692f0002b5cca5a3c30935d18 (patch)
tree46452902ff779d93e4adcb57cda29d923766a5be /html/043space.cc.html
parentc7db6a160a9a43d0905d5dea44e742b47acfa42f (diff)
downloadmu-44c1aeef226542d692f0002b5cca5a3c30935d18.tar.gz
3315
Diffstat (limited to 'html/043space.cc.html')
-rw-r--r--html/043space.cc.html14
1 files changed, 5 insertions, 9 deletions
diff --git a/html/043space.cc.html b/html/043space.cc.html
index 0ecfbcc1..221f4ff2 100644
--- a/html/043space.cc.html
+++ b/html/043space.cc.html
@@ -119,19 +119,15 @@ absolutize<span class="Delimiter">(</span>x<span class="Delimiter">);</span>
 
 <span class="Delimiter">:(after &quot;Begin Preprocess write_memory(x, data)&quot;)</span>
 <span class="Normal">if</span> <span class="Delimiter">(</span>x<span class="Delimiter">.</span>name == <span class="Constant">&quot;default-space&quot;</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
-  <span class="Normal">if</span> <span class="Delimiter">(</span>!scalar<span class="Delimiter">(</span>data<span class="Delimiter">)</span>
-      || !x<span class="Delimiter">.</span>type
-      || x<span class="Delimiter">.</span>type<span class="Delimiter">-&gt;</span>value != get<span class="Delimiter">(</span>Type_ordinal<span class="Delimiter">,</span> <span class="Constant">&quot;address&quot;</span><span class="Delimiter">)</span>
-      || !x<span class="Delimiter">.</span>type<span class="Delimiter">-&gt;</span>right
-      || x<span class="Delimiter">.</span>type<span class="Delimiter">-&gt;</span>right<span class="Delimiter">-&gt;</span>value != get<span class="Delimiter">(</span>Type_ordinal<span class="Delimiter">,</span> <span class="Constant">&quot;array&quot;</span><span class="Delimiter">)</span>
-      || !x<span class="Delimiter">.</span>type<span class="Delimiter">-&gt;</span>right<span class="Delimiter">-&gt;</span>right
-      || x<span class="Delimiter">.</span>type<span class="Delimiter">-&gt;</span>right<span class="Delimiter">-&gt;</span>right<span class="Delimiter">-&gt;</span>value != get<span class="Delimiter">(</span>Type_ordinal<span class="Delimiter">,</span> <span class="Constant">&quot;location&quot;</span><span class="Delimiter">)</span>
-      || x<span class="Delimiter">.</span>type<span class="Delimiter">-&gt;</span>right<span class="Delimiter">-&gt;</span>right<span class="Delimiter">-&gt;</span>right<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+  <span class="Normal">if</span> <span class="Delimiter">(</span>!scalar<span class="Delimiter">(</span>data<span class="Delimiter">)</span> || !is_space<span class="Delimiter">(</span>x<span class="Delimiter">))</span>
     raise &lt;&lt; maybe<span class="Delimiter">(</span>current_recipe_name<span class="Delimiter">())</span> &lt;&lt; <span class="Constant">&quot;'default-space' should be of type address:array:location, but is &quot;</span> &lt;&lt; to_string<span class="Delimiter">(</span>x<span class="Delimiter">.</span>type<span class="Delimiter">)</span> &lt;&lt; <span class="cSpecial">'\n'</span> &lt;&lt; end<span class="Delimiter">();</span>
-  <span class="Delimiter">}</span>
   current_call<span class="Delimiter">().</span>default_space = data<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span>
   <span class="Identifier">return</span><span class="Delimiter">;</span>
 <span class="Delimiter">}</span>
+<span class="Delimiter">:(code)</span>
+<span class="Normal">bool</span> is_space<span class="Delimiter">(</span><span class="Normal">const</span> reagent&amp; r<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+  <span class="Identifier">return</span> is_address_of_array_of_numbers<span class="Delimiter">(</span>r<span class="Delimiter">);</span>
+<span class="Delimiter">}</span>
 
 <span class="Delimiter">:(scenario get_default_space)</span>
 def main [