Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ohler55 committed Jul 28, 2024
1 parent f054014 commit c7df70a
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions ext/agoo/domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ typedef struct _domain {
static Domain domains = NULL;

bool
agoo_domain_use() {
agoo_domain_use(void) {
return NULL != domains;
}

Expand Down Expand Up @@ -128,7 +128,7 @@ agoo_domain_resolve(const char *host, char *buf, size_t blen) {
}

void
agoo_domain_cleanup() {
agoo_domain_cleanup(void) {
Domain d;

while (NULL != (d = domains)) {
Expand Down
2 changes: 1 addition & 1 deletion ext/agoo/dtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#endif

double
dtime() {
dtime(void) {
struct timespec ts;

clock_gettime(CLOCK_REALTIME_COURSE, &ts);
Expand Down
2 changes: 1 addition & 1 deletion ext/agoo/error_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ es_free(void *ptr) {
}

VALUE
error_stream_new() {
error_stream_new(void) {
ErrorStream es = (ErrorStream)AGOO_MALLOC(sizeof(struct _errorStream));

if (NULL == es) {
Expand Down
2 changes: 1 addition & 1 deletion ext/agoo/gqleval.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ gql_eval_sels(agooErr err, gqlDoc doc, gqlRef ref, gqlField field, gqlSel sels,
}

gqlType
gql_root_type() {
gql_root_type(void) {
if (NULL == _gql_root_type && NULL != gql_type_func) {
_gql_root_type = gql_type_func(gql_root);
}
Expand Down
2 changes: 1 addition & 1 deletion ext/agoo/graphql.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ gql_init(agooErr err) {

extern gqlType _gql_root_type;
void
gql_destroy() {
gql_destroy(void) {
Slot *sp = buckets;
Slot s;
Slot n;
Expand Down
4 changes: 2 additions & 2 deletions ext/agoo/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ key_set(const char *key) {
}

void
agoo_http_init() {
agoo_http_init(void) {
const char **kp = header_keys;

memset(&key_cache, 0, sizeof(struct _cache));
Expand All @@ -475,7 +475,7 @@ agoo_http_init() {
}

void
agoo_http_cleanup() {
agoo_http_cleanup(void) {
Slot *sp = key_cache.buckets;
Slot s;
Slot n;
Expand Down
18 changes: 9 additions & 9 deletions ext/agoo/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ find_color(const char *name) {
}

static bool
agoo_log_queue_empty() {
agoo_log_queue_empty(void) {
agooLogEntry head = atomic_load(&agoo_log.head);
agooLogEntry next = head + 1;

Expand All @@ -88,7 +88,7 @@ agoo_log_queue_empty() {
}

static int
agoo_log_listen() {
agoo_log_listen(void) {
if (0 == agoo_log.rsock) {
int fd[2];

Expand All @@ -105,7 +105,7 @@ agoo_log_listen() {
}

static void
agoo_log_release() {
agoo_log_release(void) {
char buf[8];

// clear pipe
Expand Down Expand Up @@ -233,7 +233,7 @@ classic_write(agooLogEntry e, FILE *file) {
// Remove all file with sequence numbers higher than max_files. max_files is
// max number of archived version. It does not include the primary.
static void
remove_old_logs() {
remove_old_logs(void) {
struct dirent *de;
long seq;
char *end;
Expand Down Expand Up @@ -271,7 +271,7 @@ remove_old_logs() {
}

void
agoo_log_rotate() {
agoo_log_rotate(void) {
char from[1060];
char to[1060];
int seq;
Expand Down Expand Up @@ -356,7 +356,7 @@ agoo_log_flush(double timeout) {
}

void
agoo_log_open_file() {
agoo_log_open_file(void) {
char path[1500];

if (agoo_log.with_pid) {
Expand All @@ -379,7 +379,7 @@ agoo_log_open_file() {
}

void
agoo_log_close() {
agoo_log_close(void) {
agoo_log.done = true;
// TBD wake up loop like push does
agoo_log_cat_on(NULL, false);
Expand Down Expand Up @@ -450,7 +450,7 @@ agoo_log_cat_find(const char *label) {

#ifdef CLOCK_REALTIME
int64_t
agoo_now_nano() {
agoo_now_nano(void) {
struct timespec ts;

clock_gettime(CLOCK_REALTIME, &ts);
Expand All @@ -459,7 +459,7 @@ agoo_now_nano() {
}
#else
int64_t
agoo_now_nano() {
agoo_now_nano(void) {
struct timeval tv;
struct timezone tz;

Expand Down
2 changes: 1 addition & 1 deletion ext/agoo/page.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ agoo_page_destroy(agooPage p) {
}

void
agoo_pages_cleanup() {
agoo_pages_cleanup(void) {
Slot *sp = cache.buckets;
Slot s;
Slot n;
Expand Down
2 changes: 1 addition & 1 deletion ext/agoo/rack_logger.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
static VALUE rl_class = Qundef;

VALUE
rack_logger_new() {
rack_logger_new(void) {
return rb_class_new_instance(0, NULL, rl_class);
}

Expand Down
2 changes: 1 addition & 1 deletion ext/agoo/rresponse.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ response_free(void *ptr) {
}

VALUE
response_new() {
response_new(void) {
agooResponse res = (agooResponse)AGOO_MALLOC(sizeof(struct _agooResponse));

if (NULL == res) {
Expand Down
2 changes: 1 addition & 1 deletion ext/agoo/rserver.c
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@ rserver_start(VALUE self) {
}

static void
stop_runners() {
stop_runners(void) {
// The preferred method of waiting for the ruby threads would be either a
// join or even a kill but since we may not have the gvl here that would
// cause a segfault. Instead we set a timeout and wait for the running
Expand Down

0 comments on commit c7df70a

Please sign in to comment.