From 1fe40b7cc5e92105f636d670d77b059fe4a4c50b Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 3 Oct 2001 07:19:19 +0000 Subject: * marshal.c (r_object): better allocation type check for TYPE_UCLASS. usage of allocation framework is disabled for now. * variable.c (rb_class_path): Module may have subclass. * string.c (rb_str_update): should maintain original negative offset. * string.c (rb_str_subpat_set): ditto * string.c (rb_str_aset): ditto. * re.c (rb_reg_nth_match): should check negative nth. * re.c (rb_reg_nth_defined): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/pty/pty.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'ext/pty') diff --git a/ext/pty/pty.c b/ext/pty/pty.c index 9d2fb52bcf..3bf100ef20 100644 --- a/ext/pty/pty.c +++ b/ext/pty/pty.c @@ -367,13 +367,10 @@ pty_getpty(self, shell) VALUE res, th; struct pty_info info; OpenFile *wfptr,*rfptr; - NEWOBJ(rport, struct RFile); - NEWOBJ(wport, struct RFile); + VALUE rport = rb_obj_alloc(rb_cFile); + VALUE wport = rb_obj_alloc(rb_cFile); - OBJSETUP(rport, rb_cFile, T_FILE); MakeOpenFile(rport, rfptr); - - OBJSETUP(wport, rb_cFile, T_FILE); MakeOpenFile(wport, wfptr); establishShell(RSTRING(shell)->ptr,&info); @@ -399,7 +396,7 @@ pty_getpty(self, shell) return res; } else { - return (VALUE)res; + return res; } } -- cgit v1.2.3