aboutsummaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-01-10 03:49:10 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-01-10 03:49:10 +0000
commit56dc6f5acc944e06420614b6c2a475376a887d95 (patch)
treeb2b77a562fceac69b005e0cfcb902c3adb9f77b6 /ext
parent107b713438a54770d68be98f3c385e77aecd056e (diff)
downloadruby-56dc6f5acc944e06420614b6c2a475376a887d95.tar.gz
* gc.c (ruby_mimmalloc): defined for objects need not rb_objspace,
but should return pointer suitable for ruby_xfree; main vm and main thread. patched by Sokolov Yura. https://github.com/ruby/ruby/pull/79 * internal.h: ditto. * vm.c (Init_BareVM): use ruby_mimmalloc. * ext/dl/cfunc.c: #include <ruby/util.h>. * ext/syslog/syslog.c: use xfree because it is allocated by ruby_strdup. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/dl/cfunc.c3
-rw-r--r--ext/syslog/syslog.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/ext/dl/cfunc.c b/ext/dl/cfunc.c
index 66aebf2e79..70cf6c49fc 100644
--- a/ext/dl/cfunc.c
+++ b/ext/dl/cfunc.c
@@ -2,7 +2,8 @@
* $Id$
*/
-#include <ruby.h>
+#include <ruby/ruby.h>
+#include <ruby/util.h>
#include <errno.h>
#include "dl.h"
diff --git a/ext/syslog/syslog.c b/ext/syslog/syslog.c
index 02f36aaf25..f4c45dfbe4 100644
--- a/ext/syslog/syslog.c
+++ b/ext/syslog/syslog.c
@@ -49,7 +49,7 @@ static VALUE mSyslog_close(VALUE self)
closelog();
- free((void *)syslog_ident);
+ xfree((void *)syslog_ident);
syslog_ident = NULL;
syslog_options = syslog_facility = syslog_mask = -1;
syslog_opened = 0;