mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/digest/digest.c (rb_digest_base_s_digest): add volatile to
protect temporary context object. [ruby-dev:27979] * ext/iconv/iconv.c (Init_iconv): rb_gc_register_address() should be called before actual variable initialization. [ruby-dev:27986] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
62b75bcb28
commit
e585523a2b
10 changed files with 26 additions and 15 deletions
|
@ -1,3 +1,12 @@
|
|||
Mon Dec 12 00:33:56 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* ext/digest/digest.c (rb_digest_base_s_digest): add volatile to
|
||||
protect temporary context object. [ruby-dev:27979]
|
||||
|
||||
* ext/iconv/iconv.c (Init_iconv): rb_gc_register_address() should
|
||||
be called before actual variable initialization.
|
||||
[ruby-dev:27986]
|
||||
|
||||
Fri Dec 9 23:31:02 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/rexml/encoding.rb (encoding=): give priority to particular
|
||||
|
|
6
eval.c
6
eval.c
|
@ -7930,14 +7930,14 @@ rb_f_autoload_p(obj, sym)
|
|||
void
|
||||
Init_load()
|
||||
{
|
||||
rb_load_path = rb_ary_new();
|
||||
rb_define_readonly_variable("$:", &rb_load_path);
|
||||
rb_define_readonly_variable("$-I", &rb_load_path);
|
||||
rb_define_readonly_variable("$LOAD_PATH", &rb_load_path);
|
||||
rb_load_path = rb_ary_new();
|
||||
|
||||
rb_features = rb_ary_new();
|
||||
rb_define_readonly_variable("$\"", &rb_features);
|
||||
rb_define_readonly_variable("$LOADED_FEATURES", &rb_features);
|
||||
rb_features = rb_ary_new();
|
||||
|
||||
rb_define_global_function("load", rb_f_load, -1);
|
||||
rb_define_global_function("require", rb_f_require, 1);
|
||||
|
@ -7947,8 +7947,8 @@ Init_load()
|
|||
rb_define_global_function("autoload?", rb_f_autoload_p, 1);
|
||||
rb_global_variable(&ruby_wrapper);
|
||||
|
||||
ruby_dln_librefs = rb_ary_new();
|
||||
rb_global_variable(&ruby_dln_librefs);
|
||||
ruby_dln_librefs = rb_ary_new();
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -91,7 +91,7 @@ rb_digest_base_s_digest(klass, str)
|
|||
void *pctx;
|
||||
size_t len;
|
||||
unsigned char *digest;
|
||||
VALUE obj = rb_digest_base_alloc(klass);
|
||||
volatile VALUE obj = rb_digest_base_alloc(klass);
|
||||
|
||||
algo = get_digest_base_metadata(klass);
|
||||
Data_Get_Struct(obj, void, pctx);
|
||||
|
@ -120,7 +120,7 @@ rb_digest_base_s_hexdigest(klass, str)
|
|||
void *pctx;
|
||||
size_t len;
|
||||
unsigned char *hexdigest;
|
||||
VALUE obj = rb_digest_base_alloc(klass);
|
||||
volatile VALUE obj = rb_digest_base_alloc(klass);
|
||||
|
||||
algo = get_digest_base_metadata(klass);
|
||||
Data_Get_Struct(obj, void, pctx);
|
||||
|
|
|
@ -521,6 +521,7 @@ Init_etc()
|
|||
rb_define_module_function(mEtc, "endgrent", etc_endgrent, 0);
|
||||
rb_define_module_function(mEtc, "getgrent", etc_getgrent, 0);
|
||||
|
||||
rb_global_variable(&sPasswd);
|
||||
sPasswd = rb_struct_define("Passwd",
|
||||
"name", "passwd", "uid", "gid",
|
||||
#ifdef HAVE_ST_PW_GECOS
|
||||
|
@ -546,14 +547,13 @@ Init_etc()
|
|||
"expire",
|
||||
#endif
|
||||
NULL);
|
||||
rb_global_variable(&sPasswd);
|
||||
|
||||
#ifdef HAVE_GETGRENT
|
||||
rb_global_variable(&sGroup);
|
||||
sGroup = rb_struct_define("Group", "name",
|
||||
#ifdef HAVE_ST_GR_PASSWD
|
||||
"passwd",
|
||||
#endif
|
||||
"gid", "mem", NULL);
|
||||
rb_global_variable(&sGroup);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -903,8 +903,8 @@ Init_iconv _((void))
|
|||
rb_success = rb_intern("success");
|
||||
rb_failed = rb_intern("failed");
|
||||
|
||||
charset_map = rb_hash_new();
|
||||
rb_gc_register_address(&charset_map);
|
||||
charset_map = rb_hash_new();
|
||||
rb_define_singleton_method(rb_cIconv, "charset_map", charset_map_get, 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -6079,10 +6079,11 @@ fev_on_event_with_outargs(argc, argv, self)
|
|||
void
|
||||
Init_win32ole()
|
||||
{
|
||||
ary_ole_event = rb_ary_new();
|
||||
rb_global_variable(&ary_ole_event);
|
||||
ary_ole_event = rb_ary_new();
|
||||
id_events = rb_intern("events");
|
||||
|
||||
rb_global_variable(&com_hash);
|
||||
com_vtbl.QueryInterface = QueryInterface;
|
||||
com_vtbl.AddRef = AddRef;
|
||||
com_vtbl.Release = Release;
|
||||
|
@ -6091,7 +6092,6 @@ Init_win32ole()
|
|||
com_vtbl.GetIDsOfNames = GetIDsOfNames;
|
||||
com_vtbl.Invoke = Invoke;
|
||||
com_hash = Data_Wrap_Struct(rb_cData, rb_mark_hash, st_free_table, st_init_numtable());
|
||||
rb_global_variable(&com_hash);
|
||||
|
||||
cWIN32OLE = rb_define_class("WIN32OLE", rb_cObject);
|
||||
|
||||
|
|
2
io.c
2
io.c
|
@ -5593,9 +5593,9 @@ Init_IO()
|
|||
rb_output_fs = Qnil;
|
||||
rb_define_hooked_variable("$,", &rb_output_fs, 0, rb_str_setter);
|
||||
|
||||
rb_global_variable(&rb_default_rs);
|
||||
rb_rs = rb_default_rs = rb_str_new2("\n");
|
||||
rb_output_rs = Qnil;
|
||||
rb_global_variable(&rb_default_rs);
|
||||
OBJ_FREEZE(rb_default_rs); /* avoid modifying RS_default */
|
||||
rb_define_hooked_variable("$/", &rb_rs, 0, rb_str_setter);
|
||||
rb_define_hooked_variable("$-0", &rb_rs, 0, rb_str_setter);
|
||||
|
|
2
ruby.c
2
ruby.c
|
@ -1140,8 +1140,8 @@ ruby_prog_init()
|
|||
rb_define_hooked_variable("$0", &rb_progname, 0, set_arg0);
|
||||
rb_define_hooked_variable("$PROGRAM_NAME", &rb_progname, 0, set_arg0);
|
||||
|
||||
rb_argv = rb_ary_new();
|
||||
rb_define_readonly_variable("$*", &rb_argv);
|
||||
rb_argv = rb_ary_new();
|
||||
rb_define_global_const("ARGV", rb_argv);
|
||||
rb_define_readonly_variable("$-a", &do_split);
|
||||
rb_global_variable(&rb_argv0);
|
||||
|
|
4
signal.c
4
signal.c
|
@ -879,10 +879,10 @@ Init_signal()
|
|||
#endif
|
||||
|
||||
#ifdef SIGBUS
|
||||
install_sighandler(SIGBUS, sigbus);
|
||||
//install_sighandler(SIGBUS, sigbus);
|
||||
#endif
|
||||
#ifdef SIGSEGV
|
||||
install_sighandler(SIGSEGV, sigsegv);
|
||||
//install_sighandler(SIGSEGV, sigsegv);
|
||||
#endif
|
||||
#ifdef SIGPIPE
|
||||
install_sighandler(SIGPIPE, sigpipe);
|
||||
|
|
|
@ -469,7 +469,9 @@ mark_global_entry(key, entry)
|
|||
void
|
||||
rb_gc_mark_global_tbl()
|
||||
{
|
||||
st_foreach(rb_global_tbl, mark_global_entry, 0);
|
||||
if (rb_global_tbl) {
|
||||
st_foreach(rb_global_tbl, mark_global_entry, 0);
|
||||
}
|
||||
}
|
||||
|
||||
static ID
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue