Merged from trunk

This commit is contained in:
beder
2011-09-06 01:10:27 -05:00
parent f56d453050
commit d6811c42a8
58 changed files with 103 additions and 64 deletions

View File

@@ -128,6 +128,9 @@ namespace YAML
}
bool IsValidPlainScalar(const std::string& str, bool inFlow, bool allowOnlyAscii) {
if(str.empty())
return false;
// first check the start
const RegEx& start = (inFlow ? Exp::PlainScalarInFlow() : Exp::PlainScalar());
if(!start.Matches(str))
@@ -344,7 +347,7 @@ namespace YAML
return true;
}
bool WriteBinary(ostream& out, const char *data, std::size_t size)
bool WriteBinary(ostream& out, const unsigned char *data, std::size_t size)
{
static const char encoding[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
const char PAD = '=';