[pangomm/pangomm-2-46] Context::get_font_map(): Fix reference count
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pangomm/pangomm-2-46] Context::get_font_map(): Fix reference count
- Date: Tue, 22 Feb 2022 09:18:30 +0000 (UTC)
commit 1b54e527e9d73487cca8001bdf9e132db7f3cc46
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Tue Feb 22 10:11:57 2022 +0100
Context::get_font_map(): Fix reference count
pango_context_get_font_map() returns "(transfer none)".
See https://mail.gnome.org/archives/gtkmm-list/2022-February/msg00031.html
pango/src/context.ccg | 7 +++----
pango/src/context.hg | 5 ++---
2 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/pango/src/context.ccg b/pango/src/context.ccg
index f11bb2f..de58161 100644
--- a/pango/src/context.ccg
+++ b/pango/src/context.ccg
@@ -25,7 +25,7 @@ namespace Pango
Glib::ArrayHandle< Glib::RefPtr<FontFamily> > Context::list_families() const
{
//Get array:
- PangoFontFamily** pFamilies = 0;
+ PangoFontFamily** pFamilies = nullptr;
int n_families = 0;
pango_context_list_families(const_cast<PangoContext*>(gobj()), &pFamilies, &n_families);
@@ -35,7 +35,7 @@ Glib::ArrayHandle< Glib::RefPtr<FontFamily> > Context::list_families() const
Pango::FontMetrics Context::get_metrics(const FontDescription& desc) const
{
- return FontMetrics(pango_context_get_metrics(const_cast<PangoContext*>(gobj()), desc.gobj(), 0));
+ return FontMetrics(pango_context_get_metrics(const_cast<PangoContext*>(gobj()), desc.gobj(), nullptr));
}
ListHandle_Item Context::itemize(const Glib::ustring& text, const AttrList& attrs) const
@@ -43,7 +43,7 @@ ListHandle_Item Context::itemize(const Glib::ustring& text, const AttrList& attr
return ListHandle_Item(
pango_itemize(const_cast<PangoContext*>(gobj()),
text.c_str(), 0, text.bytes(),
- const_cast<PangoAttrList*>(attrs.gobj()), 0),
+ const_cast<PangoAttrList*>(attrs.gobj()), nullptr),
Glib::OWNERSHIP_DEEP);
}
@@ -75,4 +75,3 @@ Matrix Context::get_matrix() const
}
} /* namespace Pango */
-
diff --git a/pango/src/context.hg b/pango/src/context.hg
index 979892b..4a4decd 100644
--- a/pango/src/context.hg
+++ b/pango/src/context.hg
@@ -88,8 +88,8 @@ public:
_WRAP_METHOD(void set_font_map(const Glib::RefPtr<FontMap>& font_map), pango_context_set_font_map)
- _WRAP_METHOD(Glib::RefPtr<FontMap> get_font_map(), pango_context_get_font_map)
- _WRAP_METHOD(Glib::RefPtr<const FontMap> get_font_map() const, pango_context_get_font_map)
+ _WRAP_METHOD(Glib::RefPtr<FontMap> get_font_map(), pango_context_get_font_map, refreturn)
+ _WRAP_METHOD(Glib::RefPtr<const FontMap> get_font_map() const, pango_context_get_font_map, refreturn,
constversion)
_WRAP_METHOD(guint get_serial() const, pango_context_get_serial)
@@ -174,4 +174,3 @@ public:
};
} /* namespace Pango */
-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]