| 884 | } |
| 885 | |
| 886 | void fxStringifyJSONChars(txMachine* the, txJSONStringifier* theStringifier, char* s, txSize theSize) |
| 887 | { |
| 888 | //fprintf(stderr, "%s", s); |
| 889 | if ((theStringifier->offset + theSize) >= theStringifier->size) { |
| 890 | char* aBuffer; |
| 891 | theStringifier->size += ((theSize / 1024) + 1) * 1024; |
| 892 | aBuffer = c_realloc(theStringifier->buffer, theStringifier->size); |
| 893 | if (!aBuffer) |
| 894 | fxAbort(the, XS_NOT_ENOUGH_MEMORY_EXIT); |
| 895 | theStringifier->buffer = aBuffer; |
| 896 | } |
| 897 | c_memcpy(theStringifier->buffer + theStringifier->offset, s, theSize); |
| 898 | theStringifier->offset += theSize; |
| 899 | } |
| 900 | |
| 901 | void fxStringifyJSONIndent(txMachine* the, txJSONStringifier* theStringifier) |
| 902 | { |
no test coverage detected