[pango] Minor
- From: Behdad Esfahbod <behdad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango] Minor
- Date: Mon, 16 May 2011 14:03:30 +0000 (UTC)
commit 43096d64a9766fd56f974de26de7d9a4930ba222
Author: Behdad Esfahbod <behdad behdad org>
Date: Mon May 16 10:03:18 2011 -0400
Minor
pango/pango-layout.c | 8 +++++---
pango/pango-layout.h | 4 ++--
2 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 5952fa8..7455b20 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -1110,7 +1110,7 @@ pango_layout_get_text (PangoLayout *layout)
gint
pango_layout_get_character_count (PangoLayout *layout)
{
- g_return_val_if_fail (PANGO_IS_LAYOUT (layout), NULL);
+ g_return_val_if_fail (PANGO_IS_LAYOUT (layout), 0);
return layout->n_chars;
}
@@ -1318,11 +1318,13 @@ pango_layout_get_log_attrs (PangoLayout *layout,
*
* Since: 1.30
*/
-PangoLogAttr *
+const PangoLogAttr *
pango_layout_get_log_attrs_readonly (PangoLayout *layout,
gint *n_attrs)
{
- g_return_if_fail (layout != NULL);
+ if (n_attrs)
+ *n_attrs = 0;
+ g_return_val_if_fail (layout != NULL, NULL);
pango_layout_check_lines (layout);
diff --git a/pango/pango-layout.h b/pango/pango-layout.h
index 39d2e70..9929f45 100644
--- a/pango/pango-layout.h
+++ b/pango/pango-layout.h
@@ -168,8 +168,8 @@ void pango_layout_get_log_attrs (PangoLayout *layout,
PangoLogAttr **attrs,
gint *n_attrs);
-PangoLogAttr *pango_layout_get_log_attrs_readonly (PangoLayout *layout,
- gint *n_attrs);
+const PangoLogAttr *pango_layout_get_log_attrs_readonly (PangoLayout *layout,
+ gint *n_attrs);
void pango_layout_index_to_pos (PangoLayout *layout,
int index_,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]