diff options
| author | 2019-11-07 02:59:05 +0100 | |
|---|---|---|
| committer | 2019-11-07 02:59:05 +0100 | |
| commit | 4d4586903b4cbab8b307a406e894e34b4b19a723 (patch) | |
| tree | 8fe811f8c1c00dc1215011728c96bdb98a8874b9 /include | |
| parent | b7c802f1b7cdf8a271b148d4375c4309aefc5e0d (diff) | |
| download | libplist-4d4586903b4cbab8b307a406e894e34b4b19a723.tar.gz libplist-4d4586903b4cbab8b307a406e894e34b4b19a723.tar.bz2 | |
Add plist_to_bin_free() and plist_to_xml_free() functions that free memory allocated by plist_to_bin()/plist_to_xml()
Diffstat (limited to 'include')
| -rw-r--r-- | include/plist/plist.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/plist/plist.h b/include/plist/plist.h index 7a41fb4..824ba43 100644 --- a/include/plist/plist.h +++ b/include/plist/plist.h | |||
| @@ -620,6 +620,13 @@ extern "C" | |||
| 620 | void plist_to_xml(plist_t plist, char **plist_xml, uint32_t * length); | 620 | void plist_to_xml(plist_t plist, char **plist_xml, uint32_t * length); |
| 621 | 621 | ||
| 622 | /** | 622 | /** |
| 623 | * Frees the memory allocated by plist_to_xml(). | ||
| 624 | * | ||
| 625 | * @param plist_xml The buffer allocated by plist_to_xml(). | ||
| 626 | */ | ||
| 627 | void plist_to_xml_free(char *plist_xml); | ||
| 628 | |||
| 629 | /** | ||
| 623 | * Export the #plist_t structure to binary format. | 630 | * Export the #plist_t structure to binary format. |
| 624 | * | 631 | * |
| 625 | * @param plist the root node to export | 632 | * @param plist the root node to export |
| @@ -630,6 +637,13 @@ extern "C" | |||
| 630 | void plist_to_bin(plist_t plist, char **plist_bin, uint32_t * length); | 637 | void plist_to_bin(plist_t plist, char **plist_bin, uint32_t * length); |
| 631 | 638 | ||
| 632 | /** | 639 | /** |
| 640 | * Frees the memory allocated by plist_to_bin(). | ||
| 641 | * | ||
| 642 | * @param plist_bin The buffer allocated by plist_to_bin(). | ||
| 643 | */ | ||
| 644 | void plist_to_bin_free(char *plist_bin); | ||
| 645 | |||
| 646 | /** | ||
| 633 | * Import the #plist_t structure from XML format. | 647 | * Import the #plist_t structure from XML format. |
| 634 | * | 648 | * |
| 635 | * @param plist_xml a pointer to the xml buffer. | 649 | * @param plist_xml a pointer to the xml buffer. |
