From c8b36a80bad4a1fe488927af4da0ecbcf10079bb Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Sun, 22 Mar 2026 19:16:51 +0100 Subject: Add OpenStep coercion support for non-OpenStep plist types - Use PLIST_OPT_COERCE option to coerce PLIST_BOOLEAN, PLIST_DATE, PLIST_UID, and PLIST_NULL to OpenStep-compatible types (1 or 0, ISO 8601 strings, integers, and 'NULL' string) - Add plist_to_openstep_with_options() function to allow passing coercion option (and others) - Update plist_write_to_string() and plist_write_to_stream() accordingly --- src/plist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plist.c') diff --git a/src/plist.c b/src/plist.c index a6d3547..2ad1b0a 100644 --- a/src/plist.c +++ b/src/plist.c @@ -2407,7 +2407,7 @@ plist_err_t plist_write_to_string(plist_t plist, char **output, uint32_t* length err = plist_to_json_with_options(plist, output, length, options); break; case PLIST_FORMAT_OSTEP: - err = plist_to_openstep(plist, output, length, ((options & PLIST_OPT_COMPACT) == 0)); + err = plist_to_openstep_with_options(plist, output, length, options); break; case PLIST_FORMAT_PRINT: err = plist_write_to_string_default(plist, output, length, options); @@ -2445,7 +2445,7 @@ plist_err_t plist_write_to_stream(plist_t plist, FILE *stream, plist_format_t fo err = plist_to_json_with_options(plist, &output, &length, options); break; case PLIST_FORMAT_OSTEP: - err = plist_to_openstep(plist, &output, &length, ((options & PLIST_OPT_COMPACT) == 0)); + err = plist_to_openstep_with_options(plist, &output, &length, options); break; case PLIST_FORMAT_PRINT: err = plist_write_to_stream_default(plist, stream, options); -- cgit v1.1-32-gdbae