[set] Add hb_set_copy()
Fixes https://github.com/harfbuzz/harfbuzz/issues/3016
This commit is contained in:
parent
bc33b87f5e
commit
3962225a72
|
@ -599,6 +599,7 @@ HB_SET_VALUE_INVALID
|
|||
hb_set_add
|
||||
hb_set_add_range
|
||||
hb_set_allocation_successful
|
||||
hb_set_copy
|
||||
hb_set_clear
|
||||
hb_set_create
|
||||
hb_set_del
|
||||
|
|
|
@ -172,6 +172,24 @@ hb_set_allocation_successful (const hb_set_t *set)
|
|||
return set->successful;
|
||||
}
|
||||
|
||||
/**
|
||||
* hb_set_copy:
|
||||
* @set: A set
|
||||
*
|
||||
* Allocate a copy of @set.
|
||||
*
|
||||
* Return value: Newly-allocated set.
|
||||
*
|
||||
* Since: REPLACEME
|
||||
**/
|
||||
hb_set_t *
|
||||
hb_set_copy (const hb_set_t *set)
|
||||
{
|
||||
hb_set_t *copy = hb_set_create ();
|
||||
copy->set (set);
|
||||
return copy;
|
||||
}
|
||||
|
||||
/**
|
||||
* hb_set_clear:
|
||||
* @set: A set
|
||||
|
|
|
@ -85,6 +85,9 @@ hb_set_get_user_data (hb_set_t *set,
|
|||
HB_EXTERN hb_bool_t
|
||||
hb_set_allocation_successful (const hb_set_t *set);
|
||||
|
||||
HB_EXTERN hb_set_t *
|
||||
hb_set_copy (const hb_set_t *set);
|
||||
|
||||
HB_EXTERN void
|
||||
hb_set_clear (hb_set_t *set);
|
||||
|
||||
|
|
Loading…
Reference in New Issue