[pango/pango2-cleanups: 49/70] Drop pango_font_descriptions_free
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/pango2-cleanups: 49/70] Drop pango_font_descriptions_free
- Date: Thu, 17 Feb 2022 20:36:16 +0000 (UTC)
commit a28bd02bfb80d2e0f4fff29fc7945f8195263cb4
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Feb 12 10:08:43 2022 -0500
Drop pango_font_descriptions_free
This is just not necessary.
pango/pango-font-description.c | 22 ----------------------
pango/pango-font-description.h | 3 ---
tests/test-font.c | 3 ++-
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]