--- a/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-set.cc Wed May 30 08:10:41 2018 -0700
+++ b/src/java.desktop/share/native/libfontmanager/harfbuzz/hb-set.cc Wed May 30 12:20:00 2018 -0700
@@ -45,12 +45,18 @@
if (!(set = hb_object_create<hb_set_t> ()))
return hb_set_get_empty ();
- set->page_map.init ();
- set->pages.init ();
+ set->init ();
return set;
}
+static const hb_set_t _hb_set_nil = {
+ HB_OBJECT_HEADER_STATIC,
+ true, /* in_error */
+
+ {0} /* elts */
+};
+
/**
* hb_set_get_empty:
*
@@ -61,13 +67,6 @@
hb_set_t *
hb_set_get_empty (void)
{
- static const hb_set_t _hb_set_nil = {
- HB_OBJECT_HEADER_STATIC,
- true, /* in_error */
-
- {0} /* elts */
- };
-
return const_cast<hb_set_t *> (&_hb_set_nil);
}
@@ -96,8 +95,7 @@
{
if (!hb_object_destroy (set)) return;
- set->page_map.finish ();
- set->pages.finish ();
+ set->finish ();
free (set);
}
@@ -439,7 +437,9 @@
* @set: a set.
* @codepoint: (inout):
*
+ * Gets the next number in @set that is greater than current value of @codepoint.
*
+ * Set @codepoint to %HB_SET_VALUE_INVALID to get started.
*
* Return value: whether there was a next value.
*
@@ -453,6 +453,26 @@
}
/**
+ * hb_set_previous:
+ * @set: a set.
+ * @codepoint: (inout):
+ *
+ * Gets the previous number in @set that is slower than current value of @codepoint.
+ *
+ * Set @codepoint to %HB_SET_VALUE_INVALID to get started.
+ *
+ * Return value: whether there was a previous value.
+ *
+ * Since: 1.8.0
+ **/
+hb_bool_t
+hb_set_previous (const hb_set_t *set,
+ hb_codepoint_t *codepoint)
+{
+ return set->previous (codepoint);
+}
+
+/**
* hb_set_next_range:
* @set: a set.
* @first: (out): output first codepoint in the range.
@@ -461,6 +481,8 @@
* Gets the next consecutive range of numbers in @set that
* are greater than current value of @last.
*
+ * Set @last to %HB_SET_VALUE_INVALID to get started.
+ *
* Return value: whether there was a next range.
*
* Since: 0.9.7
@@ -472,3 +494,26 @@
{
return set->next_range (first, last);
}
+
+/**
+ * hb_set_previous_range:
+ * @set: a set.
+ * @first: (inout): input current first and output first codepoint in the range.
+ * @last: (out): output last codepoint in the range.
+ *
+ * Gets the previous consecutive range of numbers in @set that
+ * are greater than current value of @last.
+ *
+ * Set @first to %HB_SET_VALUE_INVALID to get started.
+ *
+ * Return value: whether there was a previous range.
+ *
+ * Since: 1.8.0
+ **/
+hb_bool_t
+hb_set_previous_range (const hb_set_t *set,
+ hb_codepoint_t *first,
+ hb_codepoint_t *last)
+{
+ return set->previous_range (first, last);
+}