mirror of
https://github.com/ultrajson/ultrajson.git
synced 2024-12-04 06:38:23 +01:00
Remove the hidden JSON_NO_EXTRA_WHITESPACE compile knob.
Unsetting it can lead to seg-faults. I don't think it's worth having to fix and then test this undocumented permutation.
This commit is contained in:
parent
20aa1a69e5
commit
1a39406b3a
@ -56,9 +56,6 @@ tree doesn't have cyclic references.
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
|
||||
// Don't output any extra whitespaces when encoding
|
||||
#define JSON_NO_EXTRA_WHITESPACE
|
||||
|
||||
// Max decimals to encode double floating point numbers with
|
||||
#ifndef JSON_DOUBLE_MAX_DECIMALS
|
||||
#define JSON_DOUBLE_MAX_DECIMALS 15
|
||||
|
@ -662,14 +662,10 @@ static void encode(JSOBJ obj, JSONObjectEncoder *enc, const char *name, size_t c
|
||||
Buffer_AppendCharUnchecked(enc, '\"');
|
||||
|
||||
Buffer_AppendCharUnchecked (enc, ':');
|
||||
#ifdef JSON_NO_EXTRA_WHITESPACE
|
||||
if (enc->indent)
|
||||
{
|
||||
Buffer_AppendCharUnchecked (enc, ' ');
|
||||
}
|
||||
#else
|
||||
Buffer_AppendCharUnchecked (enc, ' ');
|
||||
#endif
|
||||
}
|
||||
|
||||
tc.encoder_prv = enc->prv;
|
||||
@ -700,9 +696,6 @@ static void encode(JSOBJ obj, JSONObjectEncoder *enc, const char *name, size_t c
|
||||
if (count > 0)
|
||||
{
|
||||
Buffer_AppendCharUnchecked (enc, ',');
|
||||
#ifndef JSON_NO_EXTRA_WHITESPACE
|
||||
Buffer_AppendCharUnchecked (enc, ' ');
|
||||
#endif
|
||||
}
|
||||
Buffer_AppendIndentNewlineUnchecked (enc);
|
||||
|
||||
@ -755,9 +748,6 @@ static void encode(JSOBJ obj, JSONObjectEncoder *enc, const char *name, size_t c
|
||||
if (count > 0)
|
||||
{
|
||||
Buffer_AppendCharUnchecked (enc, ',');
|
||||
#ifndef JSON_NO_EXTRA_WHITESPACE
|
||||
Buffer_AppendCharUnchecked (enc, ' ');
|
||||
#endif
|
||||
}
|
||||
Buffer_AppendIndentNewlineUnchecked (enc);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user