summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2011-05-16 10:03:18 -0400
committerBehdad Esfahbod <behdad@behdad.org>2011-05-16 10:03:18 -0400
commit43096d64a9766fd56f974de26de7d9a4930ba222 (patch)
tree75ea0fd8ab4c6f2714584fc23a66490872cc5f84 /pango
parent64937a55909d78e024be12a6fcb85d1e9678b33a (diff)
downloadpango-43096d64a9766fd56f974de26de7d9a4930ba222.tar.gz
Minor
Diffstat (limited to 'pango')
-rw-r--r--pango/pango-layout.c8
-rw-r--r--pango/pango-layout.h4
2 files changed, 7 insertions, 5 deletions
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 5952fa85..7455b20e 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 39d2e701..9929f450 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_,