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

no ID cache in Init functions

Init functions are called only once, cache is useless.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-02-16 08:39:48 +00:00
parent 24dfe5e749
commit c8094ff154
27 changed files with 28 additions and 2 deletions

View file

@ -124,6 +124,7 @@ rb_digest_instance_bubblebabble(VALUE self)
void
Init_bubblebabble(void)
{
#undef rb_intern
VALUE rb_mDigest, rb_mDigest_Instance, rb_cDigest_Class;
rb_require("digest");

View file

@ -728,6 +728,7 @@ rb_digest_base_block_length(VALUE self)
void
Init_digest(void)
{
#undef rb_intern
id_reset = rb_intern("reset");
id_update = rb_intern("update");
id_finish = rb_intern("finish");

View file

@ -677,6 +677,7 @@ rb_fiddle_ptr_s_to_ptr(VALUE self, VALUE val)
void
Init_fiddle_pointer(void)
{
#undef rb_intern
id_to_ptr = rb_intern("to_ptr");
/* Document-class: Fiddle::Pointer

View file

@ -1335,6 +1335,7 @@ static VALUE cState_buffer_initial_length_set(VALUE self, VALUE buffer_initial_l
*/
void Init_generator(void)
{
#undef rb_intern
rb_require("json/common");
mJSON = rb_define_module("JSON");

View file

@ -2064,6 +2064,7 @@ static VALUE cParser_source(VALUE self)
void Init_parser(void)
{
#undef rb_intern
rb_require("json/common");
mJSON = rb_define_module("JSON");
mExt = rb_define_module_under(mJSON, "Ext");

View file

@ -936,6 +936,7 @@ void Init_objspace_dump(VALUE rb_mObjSpace);
void
Init_objspace(void)
{
#undef rb_intern
VALUE rb_mObjSpace;
#if 0
rb_mObjSpace = rb_define_module("ObjectSpace"); /* let rdoc know */

View file

@ -498,6 +498,7 @@ objspace_dump_all(int argc, VALUE *argv, VALUE os)
void
Init_objspace_dump(VALUE rb_mObjSpace)
{
#undef rb_intern
#if 0
rb_mObjSpace = rb_define_module("ObjectSpace"); /* let rdoc know */
#endif

View file

@ -1099,6 +1099,7 @@ static void Init_ossl_locks(void)
void
Init_openssl(void)
{
#undef rb_intern
/*
* Init timezone info
*/

View file

@ -1360,6 +1360,7 @@ OSSL_ASN1_IMPL_FACTORY_METHOD(EndOfContent)
void
Init_ossl_asn1(void)
{
#undef rb_intern
VALUE ary;
int i;

View file

@ -232,6 +232,7 @@ ossl_pkcs12_to_der(VALUE self)
void
Init_ossl_pkcs12(void)
{
#undef rb_intern
#if 0
mOSSL = rb_define_module("OpenSSL");
eOSSLError = rb_define_class_under(mOSSL, "OpenSSLError", rb_eStandardError);

View file

@ -1042,6 +1042,7 @@ ossl_pkcs7ri_get_enc_key(VALUE self)
void
Init_ossl_pkcs7(void)
{
#undef rb_intern
#if 0
mOSSL = rb_define_module("OpenSSL");
eOSSLError = rb_define_class_under(mOSSL, "OpenSSLError", rb_eStandardError);

View file

@ -389,6 +389,7 @@ ossl_pkey_verify(VALUE self, VALUE digest, VALUE sig, VALUE data)
void
Init_ossl_pkey(void)
{
#undef rb_intern
#if 0
mOSSL = rb_define_module("OpenSSL");
eOSSLError = rb_define_class_under(mOSSL, "OpenSSLError", rb_eStandardError);

View file

@ -1649,6 +1649,7 @@ static VALUE ossl_ec_point_mul(int argc, VALUE *argv, VALUE self)
void Init_ossl_ec(void)
{
#undef rb_intern
#if 0
mPKey = rb_define_module_under(mOSSL, "PKey");
cPKey = rb_define_class_under(mPKey, "PKey", rb_cObject);

View file

@ -437,6 +437,7 @@ ossl_x509ext_to_der(VALUE obj)
void
Init_ossl_x509ext(void)
{
#undef rb_intern
#if 0
mOSSL = rb_define_module("OpenSSL");
eOSSLError = rb_define_class_under(mOSSL, "OpenSSLError", rb_eStandardError);

View file

@ -502,6 +502,7 @@ ossl_x509name_to_der(VALUE self)
void
Init_ossl_x509name(void)
{
#undef rb_intern
VALUE utf8str, ptrstr, ia5str, hash;
#if 0

View file

@ -771,6 +771,7 @@ ossl_x509stctx_set_time(VALUE self, VALUE time)
void
Init_ossl_x509store(void)
{
#undef rb_intern
#if 0
mOSSL = rb_define_module("OpenSSL");
eOSSLError = rb_define_class_under(mOSSL, "OpenSSLError", rb_eStandardError);

View file

@ -521,6 +521,7 @@ static VALUE set_line_width(VALUE self, VALUE width)
void Init_psych_emitter(void)
{
#undef rb_intern
VALUE psych = rb_define_module("Psych");
VALUE handler = rb_define_class_under(psych, "Handler", rb_cObject);
cPsychEmitter = rb_define_class_under(psych, "Emitter", handler);

View file

@ -548,6 +548,7 @@ static VALUE mark(VALUE self)
void Init_psych_parser(void)
{
#undef rb_intern
#if 0
mPsych = rb_define_module("Psych");
#endif

View file

@ -1996,8 +1996,8 @@ Init_readline(void)
readline_s_get_special_prefixes, 0);
#if USE_INSERT_IGNORE_ESCAPE
CONST_ID(id_orig_prompt, "orig_prompt");
CONST_ID(id_last_prompt, "last_prompt");
id_orig_prompt = rb_intern("orig_prompt");
id_last_prompt = rb_intern("last_prompt");
#endif
history = rb_obj_alloc(rb_cObject);

View file

@ -1622,6 +1622,7 @@ strio_set_encoding(int argc, VALUE *argv, VALUE self)
void
Init_stringio(void)
{
#undef rb_intern
VALUE StringIO = rb_define_class("StringIO", rb_cData);
rb_include_module(StringIO, rb_mEnumerable);

View file

@ -1412,6 +1412,7 @@ inspect2(struct strscanner *p)
void
Init_strscan(void)
{
#undef rb_intern
ID id_scanerr = rb_intern("ScanError");
VALUE tmp;

View file

@ -420,6 +420,7 @@ static VALUE mSyslogMacros_included(VALUE mod, VALUE target)
*/
void Init_syslog(void)
{
#undef rb_intern
mSyslog = rb_define_module("Syslog");
mSyslogConstants = rb_define_module_under(mSyslog, "Constants");

View file

@ -1264,6 +1264,7 @@ fev_get_handler(VALUE self)
void
Init_win32ole_event(void)
{
#undef rb_intern
ary_ole_event = rb_ary_new();
rb_gc_register_mark_object(ary_ole_event);
id_events = rb_intern("events");

View file

@ -692,6 +692,7 @@ ole_variant2variant(VALUE val, VARIANT *var)
void
Init_win32ole_variant(void)
{
#undef rb_intern
cWIN32OLE_VARIANT = rb_define_class("WIN32OLE_VARIANT", rb_cObject);
rb_define_alloc_func(cWIN32OLE_VARIANT, folevariant_s_allocate);
rb_define_singleton_method(cWIN32OLE_VARIANT, "array", folevariant_s_array, 2);

View file

@ -4477,6 +4477,7 @@ zlib_gunzip_run(VALUE arg)
void
Init_zlib(void)
{
#undef rb_intern
VALUE mZlib, cZStream, cDeflate, cInflate;
#if GZIP_SUPPORT
VALUE cGzipFile, cGzipWriter, cGzipReader;

1
proc.c
View file

@ -3078,6 +3078,7 @@ rb_method_curry(int argc, const VALUE *argv, VALUE self)
void
Init_Proc(void)
{
#undef rb_intern
/* Proc */
rb_cProc = rb_define_class("Proc", rb_cObject);
rb_undef_alloc_func(rb_cProc);

View file

@ -1379,6 +1379,7 @@ define_thread_class(VALUE outer, const char *name, VALUE super)
static void
Init_thread_sync(void)
{
#undef rb_intern
#if 0
rb_cMutex = rb_define_class("Mutex", rb_cObject); /* teach rdoc Mutex */
rb_cConditionVariable = rb_define_class("ConditionVariable", rb_cObject); /* teach rdoc ConditionVariable */