Project

General

Profile

Feature #4893 » String_call_initialize_v3b.diff

Corrected a merge-error in the patch v3 - lazaridis.com (Lazaridis Ilias), 07/04/2011 09:11 PM

View differences:

"b/C:\\Users\\LAZARI~1\\AppData\\Local\\Temp\\strA4D8.c"
return str;
}
#define FL_CALL_INIT FL_USER18
VALUE
rb_str_call_initialize_get(VALUE self)
{
if (FL_TEST(rb_cString, FL_CALL_INIT)) return Qtrue;
return Qfalse;
}
VALUE
rb_str_call_initialize_set(VALUE self, VALUE val)
{
FL_UNSET(rb_cString, FL_CALL_INIT);
if (val == Qtrue) FL_SET(rb_cString, FL_CALL_INIT);
return self;
}
VALUE
rb_str_new(const char *ptr, long len)
{
return str_new(rb_cString, ptr, len);
VALUE str;
VALUE argv[1];
str = str_new(rb_cString, ptr, len);
if (FL_TEST(rb_cString, FL_CALL_INIT)) {
argv[0] = (VALUE)str;
rb_obj_call_init((VALUE)str, 1, argv);
}
return str;
}
VALUE
......
rb_cString = rb_define_class("String", rb_cObject);
rb_include_module(rb_cString, rb_mComparable);
rb_define_alloc_func(rb_cString, str_alloc);
rb_define_singleton_method(rb_cString, "call_initialize", rb_str_call_initialize_get, 0);
rb_define_singleton_method(rb_cString, "call_initialize=", rb_str_call_initialize_set, 1);
rb_define_singleton_method(rb_cString, "try_convert", rb_str_s_try_convert, 1);
rb_define_method(rb_cString, "initialize", rb_str_init, -1);
rb_define_method(rb_cString, "initialize_copy", rb_str_replace, 1);
(9-9/13)