treewide: Replace <name>_cnt by n_<name>s and <name>_cap by allocated_<name>.
[pspp] / src / language / expressions / evaluate.c
index 7543aed55e7ad29c167c9a5ee47c63b7d48660ec..1ad2be802e437eadd50a481f0ae0499c5d5b6a83 100644 (file)
@@ -51,7 +51,7 @@ expr_evaluate (struct expression *e, const struct ccase *c, int case_idx,
 
   for (;;)
     {
-      assert (op < e->ops + e->op_cnt);
+      assert (op < e->ops + e->n_ops);
       switch (op++->operation)
        {
         case OP_number:
@@ -248,7 +248,7 @@ expr_debug_print_postfix (const struct expression *e)
 {
   struct string s = DS_EMPTY_INITIALIZER;
 
-  for (size_t i = 0; i < e->op_cnt; i++)
+  for (size_t i = 0; i < e->n_ops; i++)
     {
       union operation_data *op = &e->ops[i];
       if (i > 0)
@@ -298,6 +298,5 @@ expr_debug_print_postfix (const struct expression *e)
           NOT_REACHED ();
         }
     }
-  output_log ("%s", ds_cstr (&s));
-  ds_destroy (&s);
+  output_log_nocopy (ds_steal_cstr (&s));
 }