예제 #1
0
void
teardown (void)
{
  if (document)
    g_object_unref (document);

  if (expected_font_names)
    gcut_list_string_free (expected_font_names);
  if (actual_font_names)
    gcut_list_string_free (actual_font_names);

  if (expected_action_types)
    g_list_free (expected_font_names);
  if (actual_action_types)
    g_list_free (actual_font_names);

  if (tmp_dir)
    g_free (tmp_dir);

  if (tmp_base_dir)
    {
      cut_remove_path (tmp_base_dir, NULL);
      g_free (tmp_base_dir);
    }
}
예제 #2
0
static void
keys_and_values_free(void)
{
  if (keys_and_values) {
    gcut_list_string_free(keys_and_values);
    keys_and_values = NULL;
  }
}
예제 #3
0
static void
keys_free(void)
{
  if (keys) {
    gcut_list_string_free(keys);
    keys = NULL;
  }
}
예제 #4
0
static void
record_ids_free(void)
{
    if (record_ids) {
        gcut_list_string_free(record_ids);
        record_ids = NULL;
    }
}
예제 #5
0
static void
expected_messages_free(void)
{
    if (expected_messages) {
        gcut_list_string_free(expected_messages);
        expected_messages = NULL;
    }
}
void
cut_teardown (void)
{
    if (context)
        g_object_unref(context);

    if (encoder)
        g_object_unref(encoder);

    if (loop)
        g_object_unref(loop);

    errors_free();

    if (private_data_list)
        gcut_list_string_free(private_data_list);
    if (expected_private_data_list)
        gcut_list_string_free(expected_private_data_list);
}
static const gchar *
geo_byte_load_data(const gchar *value, ...)
{
  GString *data;
  GList *list, *node;
  va_list args;

  va_start(args, value);
  list = geo_byte_list_new_va_list(value, args);
  va_end(args);

  data = g_string_new(NULL);
  for (node = list; node; node = g_list_next(node)) {
    const gchar *point = node->data;
    g_string_append_printf(data, "[\"%s\"]", point);
    if (g_list_next(node)) {
      g_string_append_printf(data, ",\n");
    }
  }
  gcut_list_string_free(list);

  return cut_take_string(g_string_free(data, FALSE));
}