Skip to content
Snippets Groups Projects
Commit 22887917 authored by Yuki Yugui Sonoda's avatar Yuki Yugui Sonoda
Browse files

Avoid implicit function declarations

parent 0afc3add
No related branches found
No related tags found
No related merge requests found
......@@ -33,7 +33,8 @@
#include "rb_completion_queue.h"
#include <ruby.h>
#include <ruby/ruby.h>
#include <ruby/thread.h>
#include <grpc/grpc.h>
#include <grpc/support/time.h>
......@@ -48,14 +49,16 @@ typedef struct next_call_stack {
} next_call_stack;
/* Calls grpc_completion_queue_next without holding the ruby GIL */
static void *grpc_rb_completion_queue_next_no_gil(next_call_stack *next_call) {
static void *grpc_rb_completion_queue_next_no_gil(void *param) {
next_call_stack *const next_call = (next_call_stack*)param;
next_call->event =
grpc_completion_queue_next(next_call->cq, next_call->timeout);
return NULL;
}
/* Calls grpc_completion_queue_pluck without holding the ruby GIL */
static void *grpc_rb_completion_queue_pluck_no_gil(next_call_stack *next_call) {
static void *grpc_rb_completion_queue_pluck_no_gil(void *param) {
next_call_stack *const next_call = (next_call_stack*)param;
next_call->event = grpc_completion_queue_pluck(next_call->cq, next_call->tag,
next_call->timeout);
return NULL;
......
......@@ -34,7 +34,8 @@
#include "rb_grpc.h"
#include <math.h>
#include <ruby.h>
#include <ruby/ruby.h>
#include <ruby/vm.h>
#include <sys/time.h>
#include <grpc/grpc.h>
......@@ -244,7 +245,7 @@ void Init_grpc_time_consts() {
id_tv_nsec = rb_intern("tv_nsec");
}
void grpc_rb_shutdown(void *vm) { grpc_shutdown(); }
void grpc_rb_shutdown(ruby_vm_t *vm) { grpc_shutdown(); }
/* Initialize the GRPC module structs */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment