-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API: Added printf-style formatted builder functions #98
Conversation
0a7efd6
to
70a5f6c
Compare
44a9d4b
to
47e451c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look great. Found a few small things.
switch ((c = get())) { | ||
case 'n': c = '\n'; break; | ||
case 'r': c = '\r'; break; | ||
case 't': c = '\n'; break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
\t ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, fixed. And I added a check for 0x7F (DEL), which counts as a control character.
@throws an NSException if the object is not of a class that can be converted, or if it | ||
contains such an object. | ||
\note You must call \ref FLValue_Release when finished with the result. */ | ||
FLValue FLValue_FromNSObject(id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not in exp file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
Is this still valid? A lot of this stuff seems already present. |
For use in public API headers.
Unlike the existing `FLEncoder_WriteCFObject`, these functions create mutable object trees. They're needed by the formatted builder so it can accept complex CF/NS values using the `%@` specifier.
d9a761d
to
ef11c42
Compare
These functions let you create complex nested Fleece structures with a single call. It's basically JSON with values substituted from arguments using printf-style "%" specs. See comments in Builder.hh for details.
These functions let you create complex nested Fleece structures with
a single call. It's basically JSON with values substituted from
arguments using printf-style "%" specs. You can
See doc-comments in Fleece.h for details. BuilderTests.cc has a bunch of examples.
API: Added [Core]Foundation-to-Fleece conversions
Unlike the existing
FLEncoder_WriteCFObject
, these functions createmutable object trees. They're needed by the formatted builder so it
can accept complex CF/NS values using the
%@
specifier.