Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #41105] [PATCH] Silence a warning on Cygwin

5 views
Skip to first unread message

Steve Peters

unread,
Dec 16, 2006, 9:59:19 PM12/16/06
to bugs-bi...@rt.perl.org
# New Ticket Created by Steve Peters
# Please include the string: [perl #41105]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=41105 >


This patch silences a minor warning on Cygwin.

Steve Peters
st...@fisharerojo.org

$ 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;
}
}

Steve Peters via RT

unread,
Dec 16, 2006, 10:29:53 PM12/16/06
to perl6-i...@perl.org
On Sat Dec 16 18:59:18 2006, stmpeters wrote:
> This patch silences a minor warning on Cygwin.
>
> Steve Peters
> st...@fisharerojo.org
>
> $ 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;
}
}

Chromatic

unread,
Dec 17, 2006, 8:31:12 PM12/17/06
to perl6-i...@perl.org, parrotbug...@parrotcode.org
On Saturday 16 December 2006 19:29, Steve Peters via RT wrote:

> Actually, no, not the previous patch. Try the following instead.

Thanks, applied as 16177.

-- c

0 new messages