[svn:parrot] r41744 - trunk/src/io
darbelo at svn.parrot.org
darbelo at svn.parrot.org
Wed Oct 7 00:44:32 UTC 2009
Author: darbelo
Date: Wed Oct 7 00:44:29 2009
New Revision: 41744
URL: https://trac.parrot.org/parrot/changeset/41744
Log:
Replace anther 'fake' STRING with a real one.
Modified:
trunk/src/io/api.c
Modified: trunk/src/io/api.c
==============================================================================
--- trunk/src/io/api.c Tue Oct 6 21:21:38 2009 (r41743)
+++ trunk/src/io/api.c Wed Oct 7 00:44:29 2009 (r41744)
@@ -466,17 +466,14 @@
ASSERT_ARGS(Parrot_io_write)
DECL_CONST_CAST;
INTVAL result;
- STRING fake;
+ STRING *s;
if (PMC_IS_NULL(pmc))
return -1;
- fake.strstart = (char *) PARROT_const_cast(void *, buffer);
- fake.strlen = fake.bufused = length;
- fake.charset = Parrot_default_charset_ptr;
- fake.encoding = Parrot_default_encoding_ptr;
+ s = Parrot_str_new(interp, (char *) PARROT_const_cast(void *, buffer), length);
- result = Parrot_io_putps(interp, pmc, &fake);
+ result = Parrot_io_putps(interp, pmc, s);
return result;
}
More information about the parrot-commits
mailing list