Merge uncommitted changes from old SVN copy

This commit is contained in:
Michael Hansen 2010-09-03 21:50:35 -07:00
commit 7ffa2562c3
4 changed files with 109 additions and 25 deletions

View file

@ -76,7 +76,10 @@ void OutputString(PycRef<PycString> str, char prefix, bool triple, FILE* F)
len = str->length();
// Output the string
fputc(useQuotes ? '"' : '\'', F);
if (triple)
fprintf(F, useQuotes ? "\"\"\"" : "'''");
else
fputc(useQuotes ? '"' : '\'', F);
while (len--) {
if (*ch < 0x20 || *ch == 0x7F) {
if (*ch == '\r') {
@ -108,5 +111,8 @@ void OutputString(PycRef<PycString> str, char prefix, bool triple, FILE* F)
}
ch++;
}
fputc(useQuotes ? '"' : '\'', F);
if (triple)
fprintf(F, useQuotes ? "\"\"\"" : "'''");
else
fputc(useQuotes ? '"' : '\'', F);
}