[svn:parrot] r38606 - trunk/src/ops
Infinoid at svn.parrot.org
Infinoid at svn.parrot.org
Fri May 8 14:05:05 UTC 2009
Author: Infinoid
Date: Fri May 8 14:05:05 2009
New Revision: 38606
URL: https://trac.parrot.org/parrot/changeset/38606
Log:
[ops] Fix a couple warnings introduced by r38588.
If Parrot_io_peek returns an error, the "peek" opcode now returns "".
I'm not sure this is the expected behavior, but at least "make test" passes.
Modified:
trunk/src/ops/io.ops
Modified: trunk/src/ops/io.ops
==============================================================================
--- trunk/src/ops/io.ops Fri May 8 13:37:27 2009 (r38605)
+++ trunk/src/ops/io.ops Fri May 8 14:05:05 2009 (r38606)
@@ -383,14 +383,18 @@
STRING ** const s = &$1;
*s = NULL;
- Parrot_io_peek(interp, _PIO_STDIN(interp), s);
+ if(Parrot_io_peek(interp, _PIO_STDIN(interp), s) < 0) {
+ $1 = Parrot_str_new_noinit(interp, enum_stringrep_one, 0);
+ }
}
op peek(out STR, invar PMC) :base_io {
STRING ** const s = &$1;
*s = NULL;
- Parrot_io_peek(interp, $2, s);
+ if(Parrot_io_peek(interp, $2, s) < 0) {
+ $1 = Parrot_str_new_noinit(interp, enum_stringrep_one, 0);
+ }
}
##########################################
More information about the parrot-commits
mailing list