cvsuser 04/09/21 12:13:57
Modified: io io_buf.c
Log:
Switch over to using string allocation routines to avoid a GC/COW related
crash
Revision Changes Path
1.30 +5 -7 parrot/io/io_buf.c
Index: io_buf.c
===================================================================
RCS file: /cvs/public/parrot/io/io_buf.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -w -r1.29 -r1.30
--- io_buf.c 8 Sep 2004 00:33:55 -0000 1.29
+++ io_buf.c 21 Sep 2004 19:13:57 -0000 1.30
@@ -1,6 +1,6 @@
/*
Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
-$Id: io_buf.c,v 1.29 2004/09/08 00:33:55 dan Exp $
+$Id: io_buf.c,v 1.30 2004/09/21 19:13:57 dan Exp $
=head1 NAME
@@ -579,11 +579,9 @@
if (may_realloc) {
s->representation = enum_stringrep_one;
if (s->strstart) {
- PObj_bufstart(s) =
- s->strstart =
- mem_sys_realloc(s->strstart, l);
+ Parrot_reallocate_string(interpreter, s, l);
} else {
- PObj_bufstart(s) = s->strstart = mem_sys_allocate(l);
+ Parrot_allocate_string(interpreter, s, l);
}
PObj_buflen(s) = l;
}
@@ -602,9 +600,9 @@
if (may_realloc) {
s->representation = enum_stringrep_one;
if (s->strstart) {
- PObj_bufstart(s) = s->strstart = mem_sys_realloc(s->strstart, l);
+ Parrot_reallocate_string(interpreter, s, l);
} else {
- PObj_bufstart(s) = s->strstart = mem_sys_allocate(l);
+ Parrot_allocate_string(interpreter, s, l);
}
PObj_buflen(s) = l;
}