#include <data/casewriter.h>
#include <data/casewriter-provider.h>
#include <data/settings.h>
-#include <libpspp/alloc.h>
#include <libpspp/array.h>
#include <libpspp/assertion.h>
#include <math/merge.h>
+#include "xalloc.h"
+
#include "gettext.h"
#define _(msgid) gettext (msgid)
struct casewriter *
sort_create_writer (struct case_ordering *ordering)
{
+ size_t value_cnt = case_ordering_get_value_cnt (ordering);
struct sort_writer *sort;
sort = xmalloc (sizeof *sort);
case_ordering_destroy (ordering);
- return casewriter_create (&sort_casewriter_class, sort);
+ return casewriter_create (value_cnt, &sort_casewriter_class, sort);
}
static void