* vm.c (rb_mRubyVMFrozenCore): registered for GC.

* re.c (rb_reg_preprocess_dregexp): fix GC problem on MacOS X with
  powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc.
  build 5367).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2008-09-08 09:14:59 +00:00
parent 80de18922e
commit 933eb07996
3 changed files with 12 additions and 5 deletions

View File

@ -1,3 +1,11 @@
Mon Sep 8 18:13:13 2008 Tanaka Akira <akr@fsij.org>
* vm.c (rb_mRubyVMFrozenCore): registered for GC.
* re.c (rb_reg_preprocess_dregexp): fix GC problem on MacOS X with
powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc.
build 5367).
Mon Sep 8 18:09:07 2008 NAKAMURA Usaku <usa@ruby-lang.org>
* win32/Makefile.sub (config.h): define SIZE_MAX for VC++6/7.

8
re.c
View File

@ -2249,15 +2249,13 @@ rb_reg_preprocess_dregexp(VALUE ary)
onig_errmsg_buffer err = "";
int i;
VALUE result = 0;
int argc = RARRAY_LEN(ary);
VALUE *argv = RARRAY_PTR(ary);
if (argc == 0) {
if (RARRAY_LEN(ary) == 0) {
rb_raise(rb_eArgError, "no arguments given");
}
for (i = 0; i < argc; i++) {
VALUE str = argv[i];
for (i = 0; i < RARRAY_LEN(ary); i++) {
VALUE str = RARRAY_PTR(ary)[i];
VALUE buf;
char *p, *end;
rb_encoding *src_enc;

1
vm.c
View File

@ -1820,6 +1820,7 @@ Init_VM(void)
rb_define_method_id(klass, id_core_define_singleton_method, m_core_define_singleton_method, 3);
rb_define_method_id(klass, id_core_set_postexe, m_core_set_postexe, 1);
rb_obj_freeze(fcore);
rb_global_variable(&rb_mRubyVMFrozenCore);
rb_mRubyVMFrozenCore = fcore;
/* ::VM::Env */