aboutsummaryrefslogtreecommitdiffstats
path: root/libfonts_deallocate_encoding_mapping.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libfonts_deallocate_encoding_mapping.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/libfonts_deallocate_encoding_mapping.c b/libfonts_deallocate_encoding_mapping.c
new file mode 100644
index 0000000..e54fa5e
--- /dev/null
+++ b/libfonts_deallocate_encoding_mapping.c
@@ -0,0 +1,32 @@
+/* See LICENSE file for copyright and license details. */
+#include "common.h"
+#ifndef TEST
+
+
+void
+libfonts_deallocate_encoding_mapping(struct libfonts_encoding_mapping *this)
+{
+ if (this) {
+ if (this->entries) {
+ while (this->nentries)
+ libfonts_deallocate_encoding_mapping_entry(&this->entries[--this->nentries]);
+ free(this->entries);
+ this->entries = NULL;
+ }
+ free(this->target);
+ this->target = NULL;
+ }
+}
+
+
+#else
+
+
+int
+main(void)
+{
+ return 0; /* XXX add test */
+}
+
+
+#endif