Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove type flag and let perftools install.

  • Loading branch information...
commit 797df7f50aac054e3a266a8acd2e51863349470b 1 parent 9246af9
Evan Weaver authored
Showing with 15 additions and 18 deletions.
  1. +6 −7 gc.c
  2. +7 −7 ruby.h
  3. +2 −4 string.c
View
13 gc.c
@@ -943,15 +943,14 @@ add_heap_if_needed(heaps_space_t* heaps_space)
}
}
-/* Make perftools.rb install ok */
+/* Legacy gem compatibility only. Do not use. */
VALUE
-rb_newobj(int type)
-{
- return rb_newobj_eden(type);
+rb_newobj() {
+ return rb_newobj_eden();
}
VALUE
-rb_newobj_eden(int type)
+rb_newobj_eden()
{
VALUE obj;
@@ -976,13 +975,13 @@ rb_newobj_eden(int type)
}
VALUE
-rb_newobj_longlife(int type)
+rb_newobj_longlife()
{
VALUE obj;
#ifdef GC_DEBUG
if (gc_debug_longlife_disabled) {
- return rb_newobj_eden(type);
+ return rb_newobj_eden();
}
if (during_gc) {
rb_bug("object allocation during garbage collection phase");
View
14 ruby.h
@@ -335,18 +335,18 @@ char *gc_debug_get_backtrace(source_position_t *source_pos);
#define GC_DEBUG_SET_SOURCE
#endif /* GC_DEBUG */
-VALUE rb_newobj_eden _((int));
-VALUE rb_newobj_longlife _((int));
+VALUE rb_newobj_eden();
+VALUE rb_newobj_longlife();
-/* Gem compatibility only. Do not use. */
-VALUE rb_newobj _((int));
+/* Legacy gem compatibility only. Do not use. */
+VALUE rb_newobj();
// Default allocator
-#define NEWOBJ(obj,type) type *obj = (type*)rb_newobj_eden(-1)
+#define NEWOBJ(obj,type) type *obj = (type*)rb_newobj_eden()
// Specific allocators
-#define NEWOBJ_LONGLIFE(obj,type) type *obj = (type*)rb_newobj_longlife(-1)
-#define NEWOBJ_EDEN(obj,type) type *obj = (type*)rb_newobj_eden(-1)
+#define NEWOBJ_LONGLIFE(obj,type) type *obj = (type*)rb_newobj_longlife()
+#define NEWOBJ_EDEN(obj,type) type *obj = (type*)rb_newobj_eden()
#define OBJSETUP(obj,c,t) do {\
RBASIC(obj)->flags = (t | (RBASIC(obj)->flags & (FL_MOVE|FL_LONGLIFE)));\
View
6 string.c
@@ -63,8 +63,7 @@ static VALUE
str_alloc_eden(klass)
VALUE klass;
{
- struct RString *str;
- str = (struct RString*)rb_newobj_eden(-1);
+ NEWOBJ_EDEN(str, struct RString);
OBJSETUP(str, klass, T_STRING);
str->ptr = 0;
@@ -78,8 +77,7 @@ static VALUE
str_alloc_longlife(klass)
VALUE klass;
{
- struct RString *str;
- str = (struct RString*)rb_newobj_longlife(-1);
+ NEWOBJ_LONGLIFE(str, struct RString);
OBJSETUP(str, klass, T_STRING);
str->ptr = 0;
Please sign in to comment.
Something went wrong with that request. Please try again.