[pango/line-breaking-fixes4: 1/4] Add more autoptr definitions
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/line-breaking-fixes4: 1/4] Add more autoptr definitions
- Date: Tue, 23 Nov 2021 04:14:55 +0000 (UTC)
commit 0b84e14251445de349038eca15d2559dfe25ae26
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Nov 20 22:54:27 2021 -0500
Add more autoptr definitions
pango/pango-attributes.h | 4 ++++
pango/pango-coverage.h | 2 ++
pango/pango-font.h | 1 +
pango/pango-layout.h | 4 ++++
pango/pango-tabs.h | 3 +++
5 files changed, 14 insertions(+)
---
diff --git a/pango/pango-attributes.h b/pango/pango-attributes.h
index 5ea6bd9e..f1bd5635 100644
--- a/pango/pango-attributes.h
+++ b/pango/pango-attributes.h
@@ -739,6 +739,10 @@ void pango_attr_iterator_get_font (PangoAttrIterator *
PANGO_AVAILABLE_IN_1_2
GSList * pango_attr_iterator_get_attrs (PangoAttrIterator *iterator);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(PangoAttribute, pango_attribute_destroy)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(PangoAttrList, pango_attr_list_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(PangoAttrIterator, pango_attr_iterator_destroy)
+
G_END_DECLS
#endif /* __PANGO_ATTRIBUTES_H__ */
diff --git a/pango/pango-coverage.h b/pango/pango-coverage.h
index dbee7e9f..b24d73d5 100644
--- a/pango/pango-coverage.h
+++ b/pango/pango-coverage.h
@@ -101,6 +101,8 @@ PANGO_DEPRECATED_IN_1_44
PangoCoverage *pango_coverage_from_bytes (guchar *bytes,
int n_bytes);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(PangoCoverage, pango_coverage_unref)
+
G_END_DECLS
#endif /* __PANGO_COVERAGE_H__ */
diff --git a/pango/pango-font.h b/pango/pango-font.h
index 6f3284fa..c56fb792 100644
--- a/pango/pango-font.h
+++ b/pango/pango-font.h
@@ -689,6 +689,7 @@ PangoLanguage ** pango_font_get_languages (PangoFont *font);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(PangoFontFamily, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(PangoFontFace, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(PangoFont, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(PangoFontDescription, pango_font_description_free)
G_END_DECLS
diff --git a/pango/pango-layout.h b/pango/pango-layout.h
index 502f5e29..3b725adc 100644
--- a/pango/pango-layout.h
+++ b/pango/pango-layout.h
@@ -494,6 +494,10 @@ int pango_layout_iter_get_baseline (PangoLayoutIter *iter);
PANGO_AVAILABLE_IN_1_50
int pango_layout_iter_get_run_baseline (PangoLayoutIter *iter);
+
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(PangoLayout, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(PangoLayoutIter, pango_layout_iter_free)
+
G_END_DECLS
#endif /* __PANGO_LAYOUT_H__ */
diff --git a/pango/pango-tabs.h b/pango/pango-tabs.h
index e8ce1b97..d2a68d5a 100644
--- a/pango/pango-tabs.h
+++ b/pango/pango-tabs.h
@@ -92,6 +92,9 @@ char * pango_tab_array_to_string (PangoTabArray *tab_array);
PANGO_AVAILABLE_IN_1_50
PangoTabArray * pango_tab_array_from_string (const char *text);
+
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(PangoTabArray, pango_tab_array_free)
+
G_END_DECLS
#endif /* __PANGO_TABS_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]