On Apr 14, 2007, at 7:44 AM, Jonathan Worthington wrote:
Hi,
This patch broke the build on some platforms (Win32 with MSVC++
included).
INTVAL
PIO_poll(Interp *interp, PMC *pmc, INTVAL which, INTVAL sec, INTVAL
usec)
{
+ if (pmc == PMCNULL) {
+ real_exception(interp, NULL, E_ValueError, "Can't poll NULL
pmc");
+ }
ParrotIOLayer * const l = PMC_struct_val(pmc);
ParrotIO * const io = PMC_data0(pmc);
Under C89, declarations must come first. Fixed in r18187.
Thanks,
Jonathan
Wouldn't it be preferable to add a check to ops2c for all 'in' pmc's to
make sure they are not null? That would help prevent errors like this
from popping up easily, and just require that all C code using the
functions must check for it being valid before calling the function.