From 0a7324d8f7aad3aeb78696fa7377c95b1a9d242b Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 23 Apr 2002 16:22:25 +0000 Subject: * ext/stringio/stringio.c (strio_mark): must check if ptr is NULL first. [ruby-talk:38873] * lib/mkmf.rb (create_makefile): should print depend file when make is other than nmake. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/stringio/stringio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ext/stringio') diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c index 11fe8ef45..07ee38dd4 100644 --- a/ext/stringio/stringio.c +++ b/ext/stringio/stringio.c @@ -53,7 +53,9 @@ static void strio_mark(ptr) struct StringIO *ptr; { - rb_gc_mark(ptr->string); + if (ptr) { + rb_gc_mark(ptr->string); + } } static void @@ -181,7 +183,6 @@ static VALUE strio_s_allocate(klass) VALUE klass; { - struct StringIO *ptr; return Data_Wrap_Struct(klass, strio_mark, strio_free, 0); } -- cgit