Skip to content

Commit

Permalink
Appease clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
byroot committed Dec 4, 2023
1 parent 5260f15 commit 48b8211
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ext/oj/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ void cache_set_expunge_rate(Cache c, int rate) {
}

void cache_free(void *data) {
Cache c = (Cache)data;
Cache c = (Cache)data;
uint64_t i;

for (i = 0; i < c->size; i++) {
Expand All @@ -278,7 +278,7 @@ void cache_free(void *data) {
}

void cache_mark(void *data) {
Cache c = (Cache)data;
Cache c = (Cache)data;
uint64_t i;

#if !HAVE_PTHREAD_MUTEX_INIT
Expand Down
1 change: 1 addition & 0 deletions ext/oj/oj.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ extern void oj_write_leaf_to_file(Leaf leaf, const char *path, Options copts);
extern char *oj_longlong_to_string(long long num, bool negative, char *buf);

extern StrWriter oj_str_writer_unwrap(VALUE writer);

extern void oj_str_writer_push_key(StrWriter sw, const char *key);
extern void oj_str_writer_push_object(StrWriter sw, const char *key);
extern void oj_str_writer_push_array(StrWriter sw, const char *key);
Expand Down
2 changes: 1 addition & 1 deletion ext/oj/string_writer.c
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ static VALUE str_writer_reset(VALUE self) {
static VALUE str_writer_to_s(VALUE self) {
StrWriter sw;
TypedData_Get_Struct(self, struct _strWriter, &oj_string_writer_type, sw);
VALUE rstr = rb_str_new(sw->out.buf, sw->out.cur - sw->out.buf);
VALUE rstr = rb_str_new(sw->out.buf, sw->out.cur - sw->out.buf);

return oj_encode(rstr);
}
Expand Down

0 comments on commit 48b8211

Please sign in to comment.