diff options
| author | 2021-12-19 16:13:07 +0100 | |
|---|---|---|
| committer | 2021-12-19 16:13:07 +0100 | |
| commit | 810e1a5936867a9f2c9f07df3a33a9d02fc03466 (patch) | |
| tree | c561f0301b98a95fddc32259978345eed8eb5cc5 /src/plist.c | |
| parent | c81471ce6e8821ba03427824217612dcab8e091b (diff) | |
| download | libplist-810e1a5936867a9f2c9f07df3a33a9d02fc03466.tar.gz libplist-810e1a5936867a9f2c9f07df3a33a9d02fc03466.tar.bz2 | |
Add support for PLIST_NULL type
Diffstat (limited to 'src/plist.c')
| -rw-r--r-- | src/plist.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plist.c b/src/plist.c index 386b04e..5453176 100644 --- a/src/plist.c +++ b/src/plist.c | |||
| @@ -374,6 +374,15 @@ PLIST_API plist_t plist_new_date(int32_t sec, int32_t usec) | |||
| 374 | return plist_new_node(data); | 374 | return plist_new_node(data); |
| 375 | } | 375 | } |
| 376 | 376 | ||
| 377 | PLIST_API plist_t plist_new_null(void) | ||
| 378 | { | ||
| 379 | plist_data_t data = plist_new_plist_data(); | ||
| 380 | data->type = PLIST_NULL; | ||
| 381 | data->intval = 0; | ||
| 382 | data->length = 0; | ||
| 383 | return plist_new_node(data); | ||
| 384 | } | ||
| 385 | |||
| 377 | PLIST_API void plist_free(plist_t plist) | 386 | PLIST_API void plist_free(plist_t plist) |
| 378 | { | 387 | { |
| 379 | if (plist) | 388 | if (plist) |
