RETVAL = Nullsv;
if (! SvOK(RETVAL)) {
...
}
as it turns out, Nullsv really expands to
#define Nullsv Null(SV*)
then to
#define Null(type) ((type)NULL)
now, maybe it's obvious to the perl core gurus, but I never would have expected SvOK not to protect against situations like these, especially while SvTRUE is DWIMmy. but that's just me.
Didn't know it either (Score:2)
SvOKto check that an SV is non-NULL, oups. Whereas I only usedSvTRUEafter I tested for nun-NULLness (with the help ofSvOKof course:-).A patch to
SvOKadding a NULL-check would probably be in order.Re:Didn't know it either (Score:2)
Re:Didn't know it either (Score:2)
SvOOK (Score:1)
sky