summaryrefslogtreecommitdiff
path: root/pango/break.c
diff options
context:
space:
mode:
Diffstat (limited to 'pango/break.c')
-rw-r--r--pango/break.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/pango/break.c b/pango/break.c
index 875d776c..432ff493 100644
--- a/pango/break.c
+++ b/pango/break.c
@@ -24,6 +24,7 @@
#include "pango-break.h"
#include "pango-script-private.h"
#include "pango-emoji-private.h"
+#include "pango-attributes-private.h"
#include "pango-break-table.h"
#include "pango-impl-utils.h"
#include <string.h>
@@ -1905,31 +1906,31 @@ break_attrs (const char *text,
PangoLogAttr *log_attrs,
int log_attrs_len)
{
- PangoAttrList *list;
- PangoAttrIterator *iter;
+ PangoAttrList list;
+ PangoAttrIterator iter;
GSList *l;
- list = pango_attr_list_new ();
+ _pango_attr_list_init (&list);
for (l = attributes; l; l = l->next)
{
PangoAttribute *attr = l->data;
if (attr->klass->type == PANGO_ATTR_ALLOW_BREAKS)
- pango_attr_list_insert (list, pango_attribute_copy (attr));
+ pango_attr_list_insert (&list, pango_attribute_copy (attr));
}
- iter = pango_attr_list_get_iterator (list);
+ _pango_attr_list_get_iterator (&list, &iter);
do {
PangoAttribute *attr;
- attr = pango_attr_iterator_get (iter, PANGO_ATTR_ALLOW_BREAKS);
+ attr = pango_attr_iterator_get (&iter, PANGO_ATTR_ALLOW_BREAKS);
if (attr && ((PangoAttrInt*)attr)->value == 0)
{
int start, end;
int start_pos, end_pos;
int pos;
- pango_attr_iterator_range (iter, &start, &end);
+ pango_attr_iterator_range (&iter, &start, &end);
if (start < offset)
start_pos = 0;
else
@@ -1946,10 +1947,10 @@ break_attrs (const char *text,
log_attrs[pos].is_char_break = FALSE;
}
}
- } while (pango_attr_iterator_next (iter));
+ } while (pango_attr_iterator_next (&iter));
- pango_attr_iterator_destroy (iter);
- pango_attr_list_unref (list);
+ _pango_attr_iterator_destroy (&iter);
+ _pango_attr_list_destroy (&list);
return TRUE;
}