Skip to content
This repository has been archived by the owner on May 25, 2024. It is now read-only.

Commit

Permalink
style: format modifications
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
Nambers committed May 7, 2024
1 parent 4aee593 commit 82b1643
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/pycJSON_decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion src/str.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef STR_H
#define STR_H
#include <stdbool.h>
#include "pycJSON.h"
#include <stdbool.h>

#define CHECK_SURROGATES_UNICODE(buf) \
(((buf)[0] == 'd' || (buf)[0] == 'D') && \
Expand Down

0 comments on commit 82b1643

Please sign in to comment.