perl-module: Use new var_get_encoding() function.
[pspp-builds.git] / perl-module / PSPP.xs
index fef855106de4347ba324e59434e2e4dd94941b54..bc7961e6e7fcf717457e4afca000894bd1486625 100644 (file)
@@ -181,11 +181,10 @@ format_value (val, var)
 CODE:
  SV *ret;
  const struct fmt_spec *fmt = var_get_print_format (var);
- const struct dictionary *dict = var_get_vardict (var)->dict;
  union value uv;
  char *s;
  make_value_from_scalar (&uv, val, var);
- s = data_out (&uv, dict_get_encoding (dict), fmt);
+ s = data_out (&uv, var_get_encoding (var), fmt);
  value_destroy (&uv, var_get_width (var));
  ret = newSVpv (s, fmt->w);
  free (s);