1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

protoize no-arguments functions

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-09-30 05:25:32 +00:00
parent cf5450bb7c
commit 28b9f11d5a
63 changed files with 104 additions and 99 deletions

2
dir.c
View file

@ -2248,7 +2248,7 @@ dir_s_home(int argc, VALUE *argv, VALUE obj)
*
*/
VALUE
rb_file_directory_p()
rb_file_directory_p(void)
{
}
#endif

2
eval.c
View file

@ -1132,7 +1132,7 @@ rb_mod_prepend(int argc, VALUE *argv, VALUE module)
}
static VALUE
hidden_identity_hash_new()
hidden_identity_hash_new(void)
{
VALUE hash = rb_hash_new();

View file

@ -61,7 +61,7 @@
*/
#include <string.h>
int
main()
main(void)
{
static const char *const test[7*2] = {
"", "d41d8cd98f00b204e9800998ecf8427e",
@ -102,7 +102,7 @@ main()
#ifdef COMPUTE_T_VALUES
#include <math.h>
int
main()
main(void)
{
int i;
for (i = 1; i <= 64; ++i) {

View file

@ -24,7 +24,7 @@ static const rb_digest_metadata_t md5 = {
* RFC1321.
*/
void
Init_md5()
Init_md5(void)
{
VALUE mDigest, cDigest_Base, cDigest_MD5;

View file

@ -24,7 +24,7 @@ static const rb_digest_metadata_t rmd160 = {
* Bosselaers, and Bart Preneel.
*/
void
Init_rmd160()
Init_rmd160(void)
{
VALUE mDigest, cDigest_Base, cDigest_RMD160;

View file

@ -24,7 +24,7 @@ static const rb_digest_metadata_t sha1 = {
* Technology), described in FIPS PUB 180-1.
*/
void
Init_sha1()
Init_sha1(void)
{
VALUE mDigest, cDigest_Base, cDigest_SHA1;

View file

@ -29,7 +29,7 @@ FOREACH_BITLEN(DEFINE_ALGO_METADATA)
* Standards and Technology), described in FIPS PUB 180-2.
*/
void
Init_sha2()
Init_sha2(void)
{
VALUE mDigest, cDigest_Base;
ID id_metadata;

11
ext/dl/callback/mkcallback.rb Normal file → Executable file
View file

@ -123,10 +123,15 @@ end
def gencallback(ty, calltype, proc_entry, argc, n)
dltype = DLTYPE[ty]
ret = dltype[:conv]
if argc == 0
args = "void"
else
args = (0...argc).collect{|i| "DLSTACK_TYPE stack#{i}"}.join(", ")
end
src = <<-EOS
#{calltype == STDCALL ? "\n#ifdef FUNC_STDCALL" : ""}
static #{dltype[:type]}
FUNC_#{calltype.upcase}(#{func_name(ty,argc,n,calltype)})(#{(0...argc).collect{|i| "DLSTACK_TYPE stack#{i}"}.join(", ")})
FUNC_#{calltype.upcase}(#{func_name(ty,argc,n,calltype)})(#{args})
{
VALUE #{ret ? "ret, " : ""}cb#{argc > 0 ? ", args[#{argc}]" : ""};
#{
@ -177,7 +182,7 @@ extern ID rb_dl_cb_call;
yield body
body << <<-EOS
void
#{initname}()
#{initname}(void)
{
#{gen_push_proc_ary(ty, "rb_DLCdeclCallbackProcs")}
#{gen_push_addr_ary(ty, "rb_DLCdeclCallbackAddrs", CDECL)}
@ -201,7 +206,7 @@ for ty in 0...MAX_DLTYPE
end
end
}
$out << "void #{initname}();\n"
$out << "void #{initname}(void);\n"
callbacks << [filename, body]
end

View file

@ -62,7 +62,7 @@ pack up your own arguments to pass as args for locking functions, etc.
*
*/
void
Init_fcntl()
Init_fcntl(void)
{
VALUE mFcntl = rb_define_module("Fcntl");
#ifdef F_DUPFD

View file

@ -260,7 +260,7 @@ to_i(VALUE self)
}
void
Init_fiddle_closure()
Init_fiddle_closure(void)
{
#if 0
mFiddle = rb_define_module("Fiddle"); /* let rdoc know about mFiddle */

View file

@ -177,7 +177,7 @@ io_wait_writable(int argc, VALUE *argv, VALUE io)
*/
void
Init_wait()
Init_wait(void)
{
rb_define_method(rb_cIO, "nread", io_nread, 0);
rb_define_method(rb_cIO, "ready?", io_ready_p, 0);

View file

@ -774,7 +774,7 @@ nkf_enc_find(const char *name)
#ifdef DEFAULT_CODE_LOCALE
static const char*
nkf_locale_charmap()
nkf_locale_charmap(void)
{
#ifdef HAVE_LANGINFO_H
return nl_langinfo(CODESET);
@ -802,7 +802,7 @@ nkf_locale_charmap()
}
static nkf_encoding*
nkf_locale_encoding()
nkf_locale_encoding(void)
{
nkf_encoding *enc = 0;
const char *encname = nkf_locale_charmap();
@ -813,13 +813,13 @@ nkf_locale_encoding()
#endif /* DEFAULT_CODE_LOCALE */
static nkf_encoding*
nkf_utf8_encoding()
nkf_utf8_encoding(void)
{
return &nkf_encoding_table[UTF_8];
}
static nkf_encoding*
nkf_default_encoding()
nkf_default_encoding(void)
{
nkf_encoding *enc = 0;
#ifdef DEFAULT_CODE_LOCALE

View file

@ -478,7 +478,7 @@ rb_nkf_guess(VALUE obj, VALUE src)
*/
void
Init_nkf()
Init_nkf(void)
{
VALUE mNKF = rb_define_module("NKF");

View file

@ -361,7 +361,7 @@ ossl_exc_new(VALUE exc, const char *fmt, ...)
* Any errors you see here are probably due to a bug in ruby's OpenSSL implementation.
*/
VALUE
ossl_get_errors()
ossl_get_errors(void)
{
VALUE ary;
long e;
@ -1034,7 +1034,7 @@ static void Init_ossl_locks(void)
*
*/
void
Init_openssl()
Init_openssl(void)
{
/*
* Init timezone info

View file

@ -1472,7 +1472,7 @@ OSSL_ASN1_IMPL_FACTORY_METHOD(Set)
OSSL_ASN1_IMPL_FACTORY_METHOD(EndOfContent)
void
Init_ossl_asn1()
Init_ossl_asn1(void)
{
VALUE ary;
int i;

View file

@ -773,7 +773,7 @@ ossl_bn_is_prime_fasttest(int argc, VALUE *argv, VALUE self)
* (NOTE: ordering of methods is the same as in 'man bn')
*/
void
Init_ossl_bn()
Init_ossl_bn(void)
{
#if 0
mOSSL = rb_define_module("OpenSSL"); /* let rdoc know about mOSSL */

View file

@ -69,7 +69,7 @@ GetConfigPtr(VALUE obj)
* INIT
*/
void
Init_ossl_config()
Init_ossl_config(void)
{
char *default_config_file;
eConfigError = rb_define_class_under(mOSSL, "ConfigError", eOSSLError);

View file

@ -294,7 +294,7 @@ ossl_digest_block_length(VALUE self)
* INIT
*/
void
Init_ossl_digest()
Init_ossl_digest(void)
{
rb_require("digest");

View file

@ -533,7 +533,7 @@ ossl_engine_inspect(VALUE self)
#define DefEngineConst(x) rb_define_const(cEngine, #x, INT2NUM(ENGINE_##x))
void
Init_ossl_engine()
Init_ossl_engine(void)
{
cEngine = rb_define_class_under(mOSSL, "Engine", rb_cObject);
eEngineError = rb_define_class_under(cEngine, "EngineError", eOSSLError);
@ -578,7 +578,7 @@ Init_ossl_engine()
}
#else
void
Init_ossl_engine()
Init_ossl_engine(void)
{
}
#endif

View file

@ -327,7 +327,7 @@ ossl_hmac_s_hexdigest(VALUE klass, VALUE digest, VALUE key, VALUE data)
* INIT
*/
void
Init_ossl_hmac()
Init_ossl_hmac(void)
{
#if 0
/* :nodoc: */
@ -357,7 +357,7 @@ Init_ossl_hmac()
#else /* NO_HMAC */
# warning >>> OpenSSL is compiled without HMAC support <<<
void
Init_ossl_hmac()
Init_ossl_hmac(void)
{
rb_warning("HMAC is not available: OpenSSL is compiled without HMAC.");
}

View file

@ -360,7 +360,7 @@ ossl_spki_verify(VALUE self, VALUE key)
*/
void
Init_ossl_ns_spki()
Init_ossl_ns_spki(void)
{
#if 0
mOSSL = rb_define_module("OpenSSL"); /* let rdoc know about mOSSL */

View file

@ -900,7 +900,7 @@ ossl_ocspcid_get_serial(VALUE self)
}
void
Init_ossl_ocsp()
Init_ossl_ocsp(void)
{
/*
* OpenSSL::OCSP implements Online Certificate Status Protocol requests
@ -1182,7 +1182,7 @@ Init_ossl_ocsp()
#else /* ! OSSL_OCSP_ENABLED */
void
Init_ossl_ocsp()
Init_ossl_ocsp(void)
{
}
#endif

View file

@ -192,7 +192,7 @@ ossl_pkcs12_to_der(VALUE self)
}
void
Init_ossl_pkcs12()
Init_ossl_pkcs12(void)
{
/*
* Defines a file format commonly used to store private keys with

View file

@ -87,7 +87,7 @@ ossl_pkcs5_pbkdf2_hmac_sha1(VALUE self, VALUE pass, VALUE salt, VALUE iter, VALU
#endif
void
Init_ossl_pkcs5()
Init_ossl_pkcs5(void)
{
/*
* Password-based Encryption

View file

@ -980,7 +980,7 @@ ossl_pkcs7ri_get_enc_key(VALUE self)
* INIT
*/
void
Init_ossl_pkcs7()
Init_ossl_pkcs7(void)
{
cPKCS7 = rb_define_class_under(mOSSL, "PKCS7", rb_cObject);
ePKCS7Error = rb_define_class_under(cPKCS7, "PKCS7Error", eOSSLError);

View file

@ -342,7 +342,7 @@ ossl_pkey_verify(VALUE self, VALUE digest, VALUE sig, VALUE data)
* INIT
*/
void
Init_ossl_pkey()
Init_ossl_pkey(void)
{
#if 0
mOSSL = rb_define_module("OpenSSL"); /* let rdoc know about mOSSL */

View file

@ -588,7 +588,7 @@ ossl_create_dh(unsigned char *p, size_t plen, unsigned char *g, size_t glen)
* INIT
*/
void
Init_ossl_dh()
Init_ossl_dh(void)
{
#if 0
mOSSL = rb_define_module("OpenSSL"); /* let rdoc know about mOSSL and mPKey */
@ -660,7 +660,7 @@ Init_ossl_dh()
#else /* defined NO_DH */
void
Init_ossl_dh()
Init_ossl_dh(void)
{
}
#endif /* NO_DH */

View file

@ -563,7 +563,7 @@ OSSL_PKEY_BN(dsa, priv_key)
* INIT
*/
void
Init_ossl_dsa()
Init_ossl_dsa(void)
{
#if 0
mOSSL = rb_define_module("OpenSSL"); /* let rdoc know about mOSSL and mPKey */
@ -617,7 +617,7 @@ Init_ossl_dsa()
#else /* defined NO_DSA */
void
Init_ossl_dsa()
Init_ossl_dsa(void)
{
}
#endif /* NO_DSA */

View file

@ -626,7 +626,7 @@ OSSL_PKEY_BN(rsa, iqmp)
#define DefRSAConst(x) rb_define_const(cRSA, #x,INT2FIX(RSA_##x))
void
Init_ossl_rsa()
Init_ossl_rsa(void)
{
#if 0
mOSSL = rb_define_module("OpenSSL"); /* let rdoc know about mOSSL and mPKey */
@ -694,7 +694,7 @@ Init_ossl_rsa()
#else /* defined NO_RSA */
void
Init_ossl_rsa()
Init_ossl_rsa(void)
{
}
#endif /* NO_RSA */

View file

@ -179,7 +179,7 @@ ossl_rand_status(VALUE self)
* INIT
*/
void
Init_ossl_rand()
Init_ossl_rand(void)
{
#if 0
mOSSL = rb_define_module("OpenSSL"); /* let rdoc know about mOSSL */

View file

@ -1858,7 +1858,7 @@ ossl_ssl_npn_protocol(VALUE self)
#endif /* !defined(OPENSSL_NO_SOCK) */
void
Init_ossl_ssl()
Init_ossl_ssl(void)
{
int i;
VALUE ary;

View file

@ -17,7 +17,7 @@ VALUE mX509;
rb_define_const(mX509, "DEFAULT_" #x, rb_str_new2(X509_get_default_##i()))
void
Init_ossl_x509()
Init_ossl_x509(void)
{
mX509 = rb_define_module_under(mOSSL, "X509");

View file

@ -260,7 +260,7 @@ ossl_x509attr_to_der(VALUE self)
* X509_ATTRIBUTE init
*/
void
Init_ossl_x509attr()
Init_ossl_x509attr(void)
{
eX509AttrError = rb_define_class_under(mX509, "AttributeError", eOSSLError);

View file

@ -708,7 +708,7 @@ ossl_x509_inspect(VALUE self)
* INIT
*/
void
Init_ossl_x509cert()
Init_ossl_x509cert(void)
{
#if 0

View file

@ -502,7 +502,7 @@ ossl_x509crl_add_extension(VALUE self, VALUE extension)
* INIT
*/
void
Init_ossl_x509crl()
Init_ossl_x509crl(void)
{
eX509CRLError = rb_define_class_under(mX509, "CRLError", eOSSLError);

View file

@ -436,7 +436,7 @@ ossl_x509ext_to_der(VALUE obj)
* INIT
*/
void
Init_ossl_x509ext()
Init_ossl_x509ext(void)
{
eX509ExtError = rb_define_class_under(mX509, "ExtensionError", eOSSLError);

View file

@ -426,7 +426,7 @@ ossl_x509name_to_der(VALUE self)
*/
void
Init_ossl_x509name()
Init_ossl_x509name(void)
{
VALUE utf8str, ptrstr, ia5str, hash;

View file

@ -438,7 +438,7 @@ ossl_x509req_add_attribute(VALUE self, VALUE attr)
* X509_REQUEST init
*/
void
Init_ossl_x509req()
Init_ossl_x509req(void)
{
eX509ReqError = rb_define_class_under(mX509, "RequestError", eOSSLError);

View file

@ -209,7 +209,7 @@ ossl_x509revoked_add_extension(VALUE self, VALUE ext)
* INIT
*/
void
Init_ossl_x509revoked()
Init_ossl_x509revoked(void)
{
eX509RevError = rb_define_class_under(mX509, "RevokedError", eOSSLError);

View file

@ -593,7 +593,7 @@ ossl_x509stctx_set_time(VALUE self, VALUE time)
* INIT
*/
void
Init_ossl_x509store()
Init_ossl_x509store(void)
{
VALUE x509stctx;

View file

@ -1370,7 +1370,7 @@ path_f_pathname(VALUE self, VALUE str)
* information. In some cases, a brief description will follow.
*/
void
Init_pathname()
Init_pathname(void)
{
id_at_path = rb_intern("@path");
id_to_path = rb_intern("to_path");

View file

@ -745,7 +745,7 @@ static VALUE cPTY;
*/
void
Init_pty()
Init_pty(void)
{
cPTY = rb_define_module("PTY");
/* :nodoc */

View file

@ -1786,7 +1786,7 @@ username_completion_proc_call(VALUE self, VALUE str)
}
void
Init_readline()
Init_readline(void)
{
VALUE history, fcomp, ucomp, version;

View file

@ -72,7 +72,7 @@ struct dbmdata {
};
static void
closed_sdbm()
closed_sdbm(void)
{
rb_raise(rb_eDBMError, "closed SDBM file");
}
@ -991,7 +991,7 @@ fsdbm_reject(VALUE obj)
}
void
Init_sdbm()
Init_sdbm(void)
{
rb_cDBM = rb_define_class("SDBM", rb_cObject);
rb_eDBMError = rb_define_class("SDBMError", rb_eStandardError);

View file

@ -594,7 +594,7 @@ rsock_getfamily(int sockfd)
}
void
rsock_init_socket_init()
rsock_init_socket_init(void)
{
/*
* SocketError is the error class for socket.

View file

@ -716,7 +716,7 @@ get_addrinfo(VALUE self)
static rb_addrinfo_t *
alloc_addrinfo()
alloc_addrinfo(void)
{
rb_addrinfo_t *rai = ZALLOC(rb_addrinfo_t);
rai->inspectname = Qnil;

View file

@ -2025,7 +2025,7 @@ socket_s_ip_address_list(VALUE self)
#endif
void
Init_socket()
Init_socket(void)
{
rsock_init_basicsocket();

View file

@ -1512,7 +1512,7 @@ strio_set_encoding(int argc, VALUE *argv, VALUE self)
* io.string #=> "Hello World"
*/
void
Init_stringio()
Init_stringio(void)
{
VALUE StringIO = rb_define_class("StringIO", rb_cData);

View file

@ -1323,7 +1323,7 @@ inspect2(struct strscanner *p)
* There are aliases to several of the methods.
*/
void
Init_strscan()
Init_strscan(void)
{
ID id_scanerr = rb_intern("ScanError");
VALUE tmp;

View file

@ -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);

View file

@ -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;

View file

@ -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");

View file

@ -375,7 +375,7 @@ static /* [local] */ HRESULT ( STDMETHODCALLTYPE Invoke )(
}
BOOL
ole_initialized()
ole_initialized(void)
{
return g_ole_initialized;
}

View file

@ -1240,7 +1240,7 @@ fev_get_handler(VALUE self)
}
void
Init_win32ole_event()
Init_win32ole_event(void)
{
ary_ole_event = rb_ary_new();
rb_gc_register_mark_object(ary_ole_event);

View file

@ -400,7 +400,7 @@ foleparam_inspect(VALUE self)
}
void
Init_win32ole_param()
Init_win32ole_param(void)
{
cWIN32OLE_PARAM = rb_define_class("WIN32OLE_PARAM", rb_cObject);
rb_define_alloc_func(cWIN32OLE_PARAM, foleparam_s_allocate);

View file

@ -563,7 +563,7 @@ folerecord_inspect(VALUE self)
}
void
Init_win32ole_record()
Init_win32ole_record(void)
{
cWIN32OLE_RECORD = rb_define_class("WIN32OLE_RECORD", rb_cObject);
rb_define_alloc_func(cWIN32OLE_RECORD, folerecord_s_allocate);

View file

@ -811,7 +811,7 @@ foletypelib_inspect(VALUE self)
}
void
Init_win32ole_typelib()
Init_win32ole_typelib(void)
{
cWIN32OLE_TYPELIB = rb_define_class("WIN32OLE_TYPELIB", rb_cObject);
rb_define_singleton_method(cWIN32OLE_TYPELIB, "typelibs", foletypelib_s_typelibs, 0);

View file

@ -665,7 +665,7 @@ folevariant_set_value(VALUE self, VALUE val)
}
void
Init_win32ole_variant()
Init_win32ole_variant(void)
{
cWIN32OLE_VARIANT = rb_define_class("WIN32OLE_VARIANT", rb_cObject);
rb_define_alloc_func(cWIN32OLE_VARIANT, folevariant_s_allocate);

View file

@ -4200,7 +4200,7 @@ rb_gzreader_readlines(int argc, VALUE *argv, VALUE obj)
#endif /* GZIP_SUPPORT */
void
Init_zlib()
Init_zlib(void)
{
VALUE mZlib, cZStream, cDeflate, cInflate;
#if GZIP_SUPPORT

2
hash.c
View file

@ -2772,7 +2772,7 @@ getenvsize(const char* p)
return p - porg + 1;
}
static size_t
getenvblocksize()
getenvblocksize(void)
{
return (rb_w32_osver() >= 5) ? 32767 : 5120;
}

2
load.c
View file

@ -1159,7 +1159,7 @@ rb_f_autoload_p(VALUE obj, VALUE sym)
}
void
Init_load()
Init_load(void)
{
#undef rb_intern
#define rb_intern(str) rb_intern2((str), strlen(str))

View file

@ -676,7 +676,7 @@ PPP_GetInterface(const char* interface_name)
* Called before the plugin module is unloaded.
*/
PP_EXPORT void
PPP_ShutdownModule()
PPP_ShutdownModule(void)
{
ruby_cleanup(0);
}

View file

@ -1126,7 +1126,7 @@ before_exec_async_signal_safe(void)
}
static void
before_exec_non_async_signal_safe()
before_exec_non_async_signal_safe(void)
{
/*
* On Mac OS X 10.5.x (Leopard) or earlier, exec() may return ENOTSUP
@ -1139,7 +1139,7 @@ before_exec_non_async_signal_safe()
}
static void
before_exec()
before_exec(void)
{
before_exec_non_async_signal_safe();
before_exec_async_signal_safe();