replaced glib function calls to g_string_*()
[rocksndiamonds.git] / src / game_bd / bd_caveset.c
index 26fe734b53a69ebb6ab275ab64969d010cc1b666..e25fa6263a70c2acdfdec691d5afc1bf80839013 100644 (file)
@@ -84,16 +84,9 @@ static GdPropertyDefault caveset_defaults[] =
 GdCavesetData *gd_caveset_data_new(void)
 {
   GdCavesetData *data;
-  int i;
 
   data = checked_calloc(sizeof(GdCavesetData));
 
-  /* create strings */
-  for (i = 0; gd_caveset_properties[i].identifier != NULL; i++)
-    if (gd_caveset_properties[i].type == GD_TYPE_LONGSTRING)
-      G_STRUCT_MEMBER(GString *, data, gd_caveset_properties[i].offset) =
-       g_string_new(NULL);
-
   gd_struct_set_defaults_from_array(data, gd_caveset_properties, caveset_defaults);
 
   return data;
@@ -106,7 +99,7 @@ void gd_caveset_data_free(GdCavesetData *data)
   /* free strings */
   for (i = 0; gd_caveset_properties[i].identifier != NULL; i++)
     if (gd_caveset_properties[i].type == GD_TYPE_LONGSTRING)
-      g_string_free(G_STRUCT_MEMBER(GString *, data, gd_caveset_properties[i].offset), TRUE);
+      checked_free(G_STRUCT_MEMBER(char *, data, gd_caveset_properties[i].offset));
 
   free(data);
 }