diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-03-17 08:58:21 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-03-17 08:58:21 +0000 |
commit | b54db8568cae6f5be8b98977a82d11df2d5c8c73 (patch) | |
tree | b7027454a641e7c51404b316cb9b0b28f66acd3d /pack.c | |
parent | 8f043b64fb245bb4ce6748850f77e1ff48d97fa5 (diff) | |
download | ruby-b54db8568cae6f5be8b98977a82d11df2d5c8c73.tar.gz ruby-b54db8568cae6f5be8b98977a82d11df2d5c8c73.tar.xz ruby-b54db8568cae6f5be8b98977a82d11df2d5c8c73.zip |
2000-03-17
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'pack.c')
-rw-r--r-- | pack.c | 14 |
1 files changed, 1 insertions, 13 deletions
@@ -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*)); } |