diff options
Diffstat (limited to 'src/fcstr.c')
-rw-r--r-- | src/fcstr.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/fcstr.c b/src/fcstr.c index 4e0a2b6..53cd1f7 100644 --- a/src/fcstr.c +++ b/src/fcstr.c @@ -1388,6 +1388,22 @@ FcStrSetDel (FcStrSet *set, const FcChar8 *s) return FcFalse; } +FcBool +FcStrSetDeleteAll (FcStrSet *set) +{ + int i; + + if (FcRefIsConst (&set->ref)) + return FcFalse; + + for (i = set->num; i > 0; i--) + { + FcStrFree (set->strs[i - 1]); + set->num--; + } + return FcTrue; +} + /* TODO Make public */ static FcStrSet * FcStrSetReference (FcStrSet *set) |