From 28b9f11d5a4b878adb50a3e5472ceea8c462ed4a Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 30 Sep 2014 05:25:32 +0000 Subject: protoize no-arguments functions git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/tk/stubs.c | 22 +++++++++++----------- ext/tk/tcltklib.c | 22 +++++++++++----------- ext/tk/tkutil/tkutil.c | 4 ++-- 3 files changed, 24 insertions(+), 24 deletions(-) (limited to 'ext/tk') diff --git a/ext/tk/stubs.c b/ext/tk/stubs.c index 6c82c7a7bb..89da88aea4 100644 --- a/ext/tk/stubs.c +++ b/ext/tk/stubs.c @@ -24,7 +24,7 @@ static int call_macinit = 0; static void -_macinit() +_macinit(void) { if (!call_macinit) { tcl_macQdPtr = &qd; /* setup QuickDraw globals */ @@ -157,7 +157,7 @@ ruby_open_tcl_dll(appname) } int -ruby_open_tk_dll() +ruby_open_tk_dll(void) { int n; char *ruby_tk_dll = 0; @@ -202,13 +202,13 @@ ruby_open_tcltk_dll(appname) } int -tcl_stubs_init_p() +tcl_stubs_init_p(void) { return(tclStubsPtr != (TclStubs*)NULL); } int -tk_stubs_init_p() +tk_stubs_init_p(void) { return(tkStubsPtr != (TkStubs*)NULL); } @@ -285,7 +285,7 @@ ruby_tcl_create_ip_and_stubs_init(st) } int -ruby_tcl_stubs_init() +ruby_tcl_stubs_init(void) { int st; Tcl_Interp *tcl_ip; @@ -397,7 +397,7 @@ ruby_tk_stubs_safeinit(tcl_ip) } int -ruby_tcltk_stubs() +ruby_tcltk_stubs(void) { int st; Tcl_Interp *tcl_ip; @@ -467,7 +467,7 @@ ruby_open_tcl_dll(appname) } int -ruby_open_tk_dll() +ruby_open_tk_dll(void) { if (!open_tcl_dll) { /* ruby_open_tcl_dll(RSTRING_PTR(rb_argv0)); */ @@ -489,13 +489,13 @@ ruby_open_tcltk_dll(appname) } int -tcl_stubs_init_p() +tcl_stubs_init_p(void) { return 1; } int -tk_stubs_init_p() +tk_stubs_init_p(void) { return call_tk_stubs_init; } @@ -528,7 +528,7 @@ ruby_tcl_create_ip_and_stubs_init(st) } int -ruby_tcl_stubs_init() +ruby_tcl_stubs_init(void) { return TCLTK_STUBS_OK; } @@ -582,7 +582,7 @@ ruby_tk_stubs_safeinit(tcl_ip) } int -ruby_tcltk_stubs() +ruby_tcltk_stubs(void) { /* Tcl_FindExecutable(RSTRING_PTR(rb_argv0)); */ Tcl_FindExecutable(rb_argv0 ? RSTRING_PTR(rb_argv0) : 0); diff --git a/ext/tk/tcltklib.c b/ext/tk/tcltklib.c index c67b0207c5..239f07a77b 100644 --- a/ext/tk/tcltklib.c +++ b/ext/tk/tcltklib.c @@ -114,7 +114,7 @@ static struct { } tcltk_version = {0, 0, 0, 0}; static void -set_tcltk_version() +set_tcltk_version(void) { if (tcltk_version.major) return; @@ -1057,7 +1057,7 @@ set_rubytk_kitpath(const char *kitpath) #endif static void -check_tclkit_std_channels() +check_tclkit_std_channels(void) { Tcl_Channel chan; @@ -1141,7 +1141,7 @@ rubytk_kitpath_init(Tcl_Interp *interp) /*--------------------------------------------------------*/ static void -init_static_tcltk_packages() +init_static_tcltk_packages(void) { /* * Ensure that std channels exist (creating them if necessary) @@ -1228,7 +1228,7 @@ void rbtk_win32_SetHINSTANCE(const char *module_name) /*--------------------------------------------------------*/ static void -setup_rubytkkit() +setup_rubytkkit(void) { init_static_tcltk_packages(); @@ -1281,7 +1281,7 @@ setup_rubytkkit() /* stub status */ static void -tcl_stubs_check() +tcl_stubs_check(void) { if (!tcl_stubs_init_p()) { int st = ruby_tcl_stubs_init(); @@ -1382,7 +1382,7 @@ static int rbtk_internal_eventloop_handler = 0; static int -pending_exception_check0() +pending_exception_check0(void) { volatile VALUE exc = rbtk_pending_exception; @@ -1645,7 +1645,7 @@ _timer_for_tcl(clientData) #ifdef RUBY_USE_NATIVE_THREAD #if USE_TOGGLE_WINDOW_MODE_FOR_IDLE static int -toggle_eventloop_window_mode_for_idle() +toggle_eventloop_window_mode_for_idle(void) { if (window_event_mode & TCL_IDLE_EVENTS) { /* idle -> event */ @@ -2099,7 +2099,7 @@ eventloop_sleep(dummy) #if USE_EVLOOP_THREAD_ALONE_CHECK_FLAG static int -get_thread_alone_check_flag() +get_thread_alone_check_flag(void) { #ifdef RUBY_USE_NATIVE_THREAD return 0; @@ -2168,7 +2168,7 @@ trap_check(int *check_var) } static int -check_eventloop_interp() +check_eventloop_interp(void) { DUMP1("check eventloop_interp"); if (eventloop_interp != (Tcl_Interp*)NULL @@ -9975,7 +9975,7 @@ lib_get_reltype_name(self) static VALUE -tcltklib_compile_info() +tcltklib_compile_info(void) { volatile VALUE ret; size_t size; @@ -10714,7 +10714,7 @@ ip_make_menu_embeddable(interp, menu_path) /*---- initialization ----*/ void -Init_tcltklib() +Init_tcltklib(void) { int ret; diff --git a/ext/tk/tkutil/tkutil.c b/ext/tk/tkutil/tkutil.c index cb387c5bd4..da05191773 100644 --- a/ext/tk/tkutil/tkutil.c +++ b/ext/tk/tkutil/tkutil.c @@ -1198,7 +1198,7 @@ allocate_cbsubst_info(struct cbsubst_info **inf_ptr) } static void -cbsubst_init() +cbsubst_init(void) { rb_const_set(cCB_SUBST, ID_SUBST_INFO, allocate_cbsubst_info((struct cbsubst_info **)NULL)); @@ -1738,7 +1738,7 @@ tkobj_path(self) const char tkutil_release_date[] = TKUTIL_RELEASE_DATE; void -Init_tkutil() +Init_tkutil(void) { VALUE cTK = rb_define_class("TkKernel", rb_cObject); VALUE mTK = rb_define_module("TkUtil"); -- cgit v1.2.3