summaryrefslogtreecommitdiff
path: root/pack.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-03-17 08:58:21 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-03-17 08:58:21 +0000
commit5c13dd59db1ee6c04cdac4ce2ee97d5934115439 (patch)
treeb7027454a641e7c51404b316cb9b0b28f66acd3d /pack.c
parentd8f981b972aab02d1432abe1c9cadf0507945e77 (diff)
2000-03-17
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'pack.c')
-rw-r--r--pack.c14
1 files changed, 1 insertions, 13 deletions
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*));
}