summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-16 08:39:48 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-16 08:39:48 +0000
commitc8094ff154065f243292a09dce5d4c8d90f8309a (patch)
tree28ccfd4e07acf80942775e6db9811d41a9595ff0 /ext
parent24dfe5e749eaa34bc6c1cba15811efbcc0a578f4 (diff)
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
Diffstat (limited to 'ext')
-rw-r--r--ext/digest/bubblebabble/bubblebabble.c1
-rw-r--r--ext/digest/digest.c1
-rw-r--r--ext/fiddle/pointer.c1
-rw-r--r--ext/json/generator/generator.c1
-rw-r--r--ext/json/parser/parser.c1
-rw-r--r--ext/objspace/objspace.c1
-rw-r--r--ext/objspace/objspace_dump.c1
-rw-r--r--ext/openssl/ossl.c1
-rw-r--r--ext/openssl/ossl_asn1.c1
-rw-r--r--ext/openssl/ossl_pkcs12.c1
-rw-r--r--ext/openssl/ossl_pkcs7.c1
-rw-r--r--ext/openssl/ossl_pkey.c1
-rw-r--r--ext/openssl/ossl_pkey_ec.c1
-rw-r--r--ext/openssl/ossl_x509ext.c1
-rw-r--r--ext/openssl/ossl_x509name.c1
-rw-r--r--ext/openssl/ossl_x509store.c1
-rw-r--r--ext/psych/psych_emitter.c1
-rw-r--r--ext/psych/psych_parser.c1
-rw-r--r--ext/readline/readline.c4
-rw-r--r--ext/stringio/stringio.c1
-rw-r--r--ext/strscan/strscan.c1
-rw-r--r--ext/syslog/syslog.c1
-rw-r--r--ext/win32ole/win32ole_event.c1
-rw-r--r--ext/win32ole/win32ole_variant.c1
-rw-r--r--ext/zlib/zlib.c1
25 files changed, 26 insertions, 2 deletions
diff --git a/ext/digest/bubblebabble/bubblebabble.c b/ext/digest/bubblebabble/bubblebabble.c
index 8f43690..6557e43 100644
--- a/ext/digest/bubblebabble/bubblebabble.c
+++ b/ext/digest/bubblebabble/bubblebabble.c
@@ -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");
diff --git a/ext/digest/digest.c b/ext/digest/digest.c
index 9838ed3..7d285cf 100644
--- a/ext/digest/digest.c
+++ b/ext/digest/digest.c
@@ -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");
diff --git a/ext/fiddle/pointer.c b/ext/fiddle/pointer.c
index 932bc57..41c0adb 100644
--- a/ext/fiddle/pointer.c
+++ b/ext/fiddle/pointer.c
@@ -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
diff --git a/ext/json/generator/generator.c b/ext/json/generator/generator.c
index 2bf8074..f061267 100644
--- a/ext/json/generator/generator.c
+++ b/ext/json/generator/generator.c
@@ -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");
diff --git a/ext/json/parser/parser.c b/ext/json/parser/parser.c
index d2e4eb6..b5ed093 100644
--- a/ext/json/parser/parser.c
+++ b/ext/json/parser/parser.c
@@ -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");
diff --git a/ext/objspace/objspace.c b/ext/objspace/objspace.c
index c791f3a..bfa2f47 100644
--- a/ext/objspace/objspace.c
+++ b/ext/objspace/objspace.c
@@ -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 */
diff --git a/ext/objspace/objspace_dump.c b/ext/objspace/objspace_dump.c
index 8bd7c67..7b329b7 100644
--- a/ext/objspace/objspace_dump.c
+++ b/ext/objspace/objspace_dump.c
@@ -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
diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c
index 245385e..38e650e 100644
--- a/ext/openssl/ossl.c
+++ b/ext/openssl/ossl.c
@@ -1099,6 +1099,7 @@ static void Init_ossl_locks(void)
void
Init_openssl(void)
{
+#undef rb_intern
/*
* Init timezone info
*/
diff --git a/ext/openssl/ossl_asn1.c b/ext/openssl/ossl_asn1.c
index fb05e03..7b6c973 100644
--- a/ext/openssl/ossl_asn1.c
+++ b/ext/openssl/ossl_asn1.c
@@ -1360,6 +1360,7 @@ OSSL_ASN1_IMPL_FACTORY_METHOD(EndOfContent)
void
Init_ossl_asn1(void)
{
+#undef rb_intern
VALUE ary;
int i;
diff --git a/ext/openssl/ossl_pkcs12.c b/ext/openssl/ossl_pkcs12.c
index ddb7d93..4566334 100644
--- a/ext/openssl/ossl_pkcs12.c
+++ b/ext/openssl/ossl_pkcs12.c
@@ -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);
diff --git a/ext/openssl/ossl_pkcs7.c b/ext/openssl/ossl_pkcs7.c
index 6395fa6..79ba0bd 100644
--- a/ext/openssl/ossl_pkcs7.c
+++ b/ext/openssl/ossl_pkcs7.c
@@ -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);
diff --git a/ext/openssl/ossl_pkey.c b/ext/openssl/ossl_pkey.c
index 2b96ece..dbde857 100644
--- a/ext/openssl/ossl_pkey.c
+++ b/ext/openssl/ossl_pkey.c
@@ -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);
diff --git a/ext/openssl/ossl_pkey_ec.c b/ext/openssl/ossl_pkey_ec.c
index fbc71a6..8bb6112 100644
--- a/ext/openssl/ossl_pkey_ec.c
+++ b/ext/openssl/ossl_pkey_ec.c
@@ -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);
diff --git a/ext/openssl/ossl_x509ext.c b/ext/openssl/ossl_x509ext.c
index 2d9a7a3..30ec09d 100644
--- a/ext/openssl/ossl_x509ext.c
+++ b/ext/openssl/ossl_x509ext.c
@@ -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);
diff --git a/ext/openssl/ossl_x509name.c b/ext/openssl/ossl_x509name.c
index c900bcb..0f16736 100644
--- a/ext/openssl/ossl_x509name.c
+++ b/ext/openssl/ossl_x509name.c
@@ -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
diff --git a/ext/openssl/ossl_x509store.c b/ext/openssl/ossl_x509store.c
index c6cf67a..2909eed 100644
--- a/ext/openssl/ossl_x509store.c
+++ b/ext/openssl/ossl_x509store.c
@@ -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);
diff --git a/ext/psych/psych_emitter.c b/ext/psych/psych_emitter.c
index 55bd417..022ffa0 100644
--- a/ext/psych/psych_emitter.c
+++ b/ext/psych/psych_emitter.c
@@ -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);
diff --git a/ext/psych/psych_parser.c b/ext/psych/psych_parser.c
index ca196dd..8eb2205 100644
--- a/ext/psych/psych_parser.c
+++ b/ext/psych/psych_parser.c
@@ -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
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index 5b52422..10ff0cb 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -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);
diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c
index f537054..eb23109 100644
--- a/ext/stringio/stringio.c
+++ b/ext/stringio/stringio.c
@@ -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);
diff --git a/ext/strscan/strscan.c b/ext/strscan/strscan.c
index d6168a0..77a36fe 100644
--- a/ext/strscan/strscan.c
+++ b/ext/strscan/strscan.c
@@ -1412,6 +1412,7 @@ inspect2(struct strscanner *p)
void
Init_strscan(void)
{
+#undef rb_intern
ID id_scanerr = rb_intern("ScanError");
VALUE tmp;
diff --git a/ext/syslog/syslog.c b/ext/syslog/syslog.c
index 317607e..754efd0 100644
--- a/ext/syslog/syslog.c
+++ b/ext/syslog/syslog.c
@@ -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");
diff --git a/ext/win32ole/win32ole_event.c b/ext/win32ole/win32ole_event.c
index 899480d..ddb5200 100644
--- a/ext/win32ole/win32ole_event.c
+++ b/ext/win32ole/win32ole_event.c
@@ -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");
diff --git a/ext/win32ole/win32ole_variant.c b/ext/win32ole/win32ole_variant.c
index eb0a463..3ff8f4f 100644
--- a/ext/win32ole/win32ole_variant.c
+++ b/ext/win32ole/win32ole_variant.c
@@ -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);
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index a938946..6bd3444 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -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;