From 82b1643183f3b780b11e18fc6253d1e3ae069a69 Mon Sep 17 00:00:00 2001 From: eritque0arcus Date: Tue, 7 May 2024 22:13:27 +0100 Subject: [PATCH] style: format modifications [skip ci] --- src/pycJSON_decode.c | 4 ++-- src/str.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pycJSON_decode.c b/src/pycJSON_decode.c index 1345d65..44f1591 100644 --- a/src/pycJSON_decode.c +++ b/src/pycJSON_decode.c @@ -140,7 +140,7 @@ static bool parse_string(PyObject **item, parse_buffer *const input_buffer) { { size_t skipped_bytes = 0; size_t num = 0; - if(!count_skipped(input_pointer, input_buffer->length - input_buffer->offset, &skipped_bytes, &num)) { + if (!count_skipped(input_pointer, input_buffer->length - input_buffer->offset, &skipped_bytes, &num)) { goto fail; } // size_t num = input_end - buffer_at_offset(input_buffer) - 1; @@ -504,7 +504,7 @@ PyObject *pycJSON_Decode(PyObject *self, PyObject *args, PyObject *kwargs) { Py_ssize_t buffer_length; static const char *kwlist[] = {"s", "object_hook", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|O", (char **) kwlist, &value, &buffer_length, &buffer.object_hook)) { - if(!PyErr_Occurred()) PyErr_Format(PyExc_TypeError, "Failed to parse JSON: invalid argument, expected str / bytes-like object"); + if (!PyErr_Occurred()) PyErr_Format(PyExc_TypeError, "Failed to parse JSON: invalid argument, expected str / bytes-like object"); goto fail; } diff --git a/src/str.h b/src/str.h index d42d18d..13e413b 100644 --- a/src/str.h +++ b/src/str.h @@ -1,7 +1,7 @@ #ifndef STR_H #define STR_H -#include #include "pycJSON.h" +#include #define CHECK_SURROGATES_UNICODE(buf) \ (((buf)[0] == 'd' || (buf)[0] == 'D') && \