Closed GoogleCodeExporter closed 9 years ago
Thanks, applied, r1cc0a4031cb5.
In your opinion, is it worth having a (const char *) overload as well?
Presumably reinterpret_cast<const unsigned char*> works fine, although it's not
well-defined. But I'd imagine most people's binary data will be in unsigned
char * format anyways?
Original comment by jbe...@gmail.com
on 6 Sep 2011 at 5:41
Issue 111 has been merged into this issue.
Original comment by jbe...@gmail.com
on 6 Sep 2011 at 5:55
I think there's no need to have such a method. unsigned char affects only
non-ASCII char, and only the way that char are used like an int, as in
YAML::Utils::WriteBinary(). For common use a simple cast like
YAML::Binary((char*) data, size) should work fine.
Also, I'm working (finally!) on the reverse convertion - parse a binary yaml,
something like:
YAML::BinaryInput bin;
doc["data"] >> bin;
Take a look here https://github.com/nebirhos/yaml-cpp/tree/binary
Original comment by fradi...@gmail.com
on 6 Sep 2011 at 9:48
Cool!
By the way, I switched the repo from svn to hg, so I'm not sure if you can
still pull the changes with your git mirror. (I don't know how github's svn
mirror works.)
Original comment by jbe...@gmail.com
on 6 Sep 2011 at 4:51
Original issue reported on code.google.com by
nebir...@gmail.com
on 8 Apr 2011 at 7:42Attachments: