On Sat Dec 16 18:59:18 2006, stmpeters wrote: > This patch silences a minor warning on Cygwin. > > Steve Peters > [EMAIL PROTECTED] > > $ diff -u parrot/src/pmc/parrotio.pmc parrot-patch/src/pmc/parrotio.pmc > --- parrot/src/pmc/parrotio.pmc 2006-12-16 20:46:58.375000000 -0600 > +++ parrot-patch/src/pmc/parrotio.pmc 2006-12-16 20:47:31.125000000 -0600 > @@ -199,7 +199,7 @@ > PIO_setlinebuf(interp, SELF); > res = PIO_reads(interp, SELF, 0); > if (!res) > - return res; > + return (PMC*)res; > /* readline should better return the string w/o NL */ > len = string_length(INTERP, res); > while (len && (((char*)res->strstart)[len-1] == '\n' > @@ -208,7 +208,7 @@ > --res->strlen; > --res->bufused; > } > - return res; > + return (PMC*)res; > } > }
Actually, no, not the previous patch. Try the following instead. --- parrot/src/pmc/parrotio.pmc 2006-12-16 20:46:58.375000000 -0600 +++ parrot-patch/src/pmc/parrotio.pmc 2006-12-16 21:26:49.203125000 -0600 @@ -199,7 +199,7 @@ PIO_setlinebuf(interp, SELF); res = PIO_reads(interp, SELF, 0); if (!res) - return res; + return PMCNULL; /* readline should better return the string w/o NL */ len = string_length(INTERP, res); while (len && (((char*)res->strstart)[len-1] == '\n' @@ -208,7 +208,8 @@ --res->strlen; --res->bufused; } - return res; + PMC_str_val(pmc_res) = res; + return pmc_res; } }