summaryrefslogtreecommitdiff
path: root/pango/pango-script.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2019-08-02 11:12:15 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2019-08-02 11:12:15 +0100
commitbd6dcbcc2b6103b1102c84e219034ba55ec80fe5 (patch)
treec3711e48152631f8b5af09d9fc450ae58e5a5f40 /pango/pango-script.c
parent2bd9b3d7e44d9fc9985f46542824e378144bcb89 (diff)
downloadpango-bd6dcbcc2b6103b1102c84e219034ba55ec80fe5.tar.gz
Add a boxed type for PangoScriptIter
Makes it usable by language bindings, and avoids a warning when introspecting the source code.
Diffstat (limited to 'pango/pango-script.c')
-rw-r--r--pango/pango-script.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/pango/pango-script.c b/pango/pango-script.c
index f7854239..fc95309f 100644
--- a/pango/pango-script.c
+++ b/pango/pango-script.c
@@ -96,6 +96,13 @@ pango_script_for_unichar (gunichar ch)
/**********************************************************************/
+static PangoScriptIter *pango_script_iter_copy (PangoScriptIter *iter);
+
+G_DEFINE_BOXED_TYPE (PangoScriptIter,
+ pango_script_iter,
+ pango_script_iter_copy,
+ pango_script_iter_free)
+
PangoScriptIter *
_pango_script_iter_init (PangoScriptIter *iter,
const char *text,
@@ -142,6 +149,12 @@ pango_script_iter_new (const char *text,
return _pango_script_iter_init (g_slice_new (PangoScriptIter), text, length);
}
+static PangoScriptIter *
+pango_script_iter_copy (PangoScriptIter *iter)
+{
+ return g_slice_dup (PangoScriptIter, iter);
+}
+
void
_pango_script_iter_fini (PangoScriptIter *iter)
{