From 5c13dd59db1ee6c04cdac4ce2ee97d5934115439 Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 17 Mar 2000 08:58:21 +0000 Subject: 2000-03-17 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- pack.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'pack.c') diff --git a/pack.c b/pack.c index a26e14e301..bac34154b7 100644 --- a/pack.c +++ b/pack.c @@ -301,18 +301,6 @@ static void qpencode _((VALUE,VALUE,int)); static int uv_to_utf8 _((char*,unsigned long)); static unsigned long utf8_to_uv _((char*,int*)); -static void -pack_add_ptr(str, add) - VALUE str, add; -{ -#define STR_NO_ORIG FL_USER2 /* copied from string.c */ - if (!RSTRING(str)->orig) { - RSTRING(str)->orig = rb_ary_new(); - FL_SET(str, STR_NO_ORIG); - } - rb_ary_push(RSTRING(str)->orig, add); -} - static VALUE pack_pack(ary, fmt) VALUE ary, fmt; @@ -849,7 +837,7 @@ pack_pack(ary, fmt) if (NIL_P(from)) t = ""; else { t = STR2CSTR(from); - pack_add_ptr(res, from); + rb_str_associate(res, from); } rb_str_cat(res, (char*)&t, sizeof(char*)); } -- cgit v1.2.3