summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-16 02:46:57 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-16 02:46:57 +0000
commita5b607c895adfb751c273e51fea101935d94e103 (patch)
tree38666e88965efee3788251c2c70c69f1f07b6b0a /gc.c
parent816779043d30d904d3c3aa32afae355d1d2569c9 (diff)
remove configure from repositry
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c45
1 files changed, 39 insertions, 6 deletions
diff --git a/gc.c b/gc.c
index edb290fb..33e864d 100644
--- a/gc.c
+++ b/gc.c
@@ -63,9 +63,8 @@ mem_error(mesg)
rb_fatal(mesg);
}
-#ifndef xmalloc
void *
-xmalloc(size)
+ruby_xmalloc(size)
size_t size;
{
void *mem;
@@ -95,7 +94,7 @@ xmalloc(size)
}
void *
-xcalloc(n, size)
+ruby_xcalloc(n, size)
size_t n, size;
{
void *mem;
@@ -107,7 +106,7 @@ xcalloc(n, size)
}
void *
-xrealloc(ptr, size)
+ruby_xrealloc(ptr, size)
void *ptr;
size_t size;
{
@@ -134,12 +133,11 @@ xrealloc(ptr, size)
}
void
-xfree(x)
+ruby_xfree(x)
void *x;
{
if (x) free(x);
}
-#endif
extern int ruby_in_compile;
static int dont_gc;
@@ -1220,3 +1218,38 @@ Init_GC()
rb_gc_unregister_address(&rb_mObSpace);
finalizers = rb_ary_new();
}
+
+#undef xmalloc
+#undef xcalloc
+#undef xrealloc
+#undef xfree
+
+void*
+xmalloc(size)
+ size_t size;
+{
+ return ruby_xmalloc(size);
+}
+
+void*
+xcalloc(n,size)
+ size_t n,size;
+{
+ return ruby_xcalloc(n, size);
+}
+
+void*
+xrealloc(ptr,size)
+ void *ptr;
+ size_t size;
+{
+ return ruby_xrealloc(ptr, size);
+}
+
+void
+xfree(ptr)
+ void *ptr;
+{
+ return ruby_xfree(ptr);
+}
+