summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2022-02-12 10:08:43 -0500
committerMatthias Clasen <mclasen@redhat.com>2022-02-17 14:01:45 -0600
commita28bd02bfb80d2e0f4fff29fc7945f8195263cb4 (patch)
tree0d05b8af23196b4747a6354eacec941c10009a7c
parentdcfcde31bffc46892d99a144c3b06a4e9ee08654 (diff)
downloadpango-a28bd02bfb80d2e0f4fff29fc7945f8195263cb4.tar.gz
Drop pango_font_descriptions_free
This is just not necessary.
-rw-r--r--pango/pango-font-description.c22
-rw-r--r--pango/pango-font-description.h3
-rw-r--r--tests/test-font.c3
3 files changed, 2 insertions, 26 deletions
diff --git a/pango/pango-font-description.c b/pango/pango-font-description.c
index 14d1ef70..90b48d26 100644
--- a/pango/pango-font-description.c
+++ b/pango/pango-font-description.c
@@ -978,28 +978,6 @@ pango_font_description_free (PangoFontDescription *desc)
g_slice_free (PangoFontDescription, desc);
}
-/**
- * pango_font_descriptions_free:
- * @descs: (nullable) (array length=n_descs) (transfer full): a pointer
- * to an array of `PangoFontDescription`, may be %NULL
- * @n_descs: number of font descriptions in @descs
- *
- * Frees an array of font descriptions.
- */
-void
-pango_font_descriptions_free (PangoFontDescription **descs,
- int n_descs)
-{
- int i;
-
- if (descs == NULL)
- return;
-
- for (i = 0; i<n_descs; i++)
- pango_font_description_free (descs[i]);
- g_free (descs);
-}
-
typedef struct
{
int value;
diff --git a/pango/pango-font-description.h b/pango/pango-font-description.h
index 5be1f334..7e5c2233 100644
--- a/pango/pango-font-description.h
+++ b/pango/pango-font-description.h
@@ -234,9 +234,6 @@ gboolean pango_font_description_equal (const PangoFontDescrip
const PangoFontDescription *desc2) G_GNUC_PURE;
PANGO_AVAILABLE_IN_ALL
void pango_font_description_free (PangoFontDescription *desc);
-PANGO_AVAILABLE_IN_ALL
-void pango_font_descriptions_free (PangoFontDescription **descs,
- int n_descs);
PANGO_AVAILABLE_IN_ALL
void pango_font_description_set_family (PangoFontDescription *desc,
diff --git a/tests/test-font.c b/tests/test-font.c
index 3d162945..b4a38c22 100644
--- a/tests/test-font.c
+++ b/tests/test-font.c
@@ -59,7 +59,8 @@ test_parse (void)
g_assert_cmpint (pango_font_description_get_stretch (desc), ==, PANGO_STRETCH_CONDENSED);
g_assert_cmpint (pango_font_description_get_gravity (desc), ==, PANGO_GRAVITY_SOUTH); g_assert_cmpint (pango_font_description_get_set_fields (desc), ==, PANGO_FONT_MASK_FAMILY | PANGO_FONT_MASK_STYLE | PANGO_FONT_MASK_VARIANT | PANGO_FONT_MASK_WEIGHT | PANGO_FONT_MASK_STRETCH | PANGO_FONT_MASK_SIZE);
- pango_font_descriptions_free (descs, 2);
+ pango_font_description_free (descs[0]);
+ pango_font_description_free (descs[1]);
}
static void