On Wed, Mar 23, 2005 at 07:42:20PM +0300, Alexander M. Pravking wrote:
> - if ((sv != NULL) && (SvPOK(sv))) {
> - val = SvPV(sv, val_len);
> + if (SvTRUE(sv)) {
> + val = SvPV_nolen(sv);
>
> What if sv is 0 (or "0")? SvTRUE would fail, I think...
> SvLEN(sv) != 0 maybe? Or just (SvPOK(sv) || SvNIOK(sv))?
Yes you are right if sv is 0 it doesnt work.
> What are you trying to check? Maybe (sv != &PL_sv_undef) is sufficient?
no PL_sv_undef is not good ideia. i think SvOK should be enough.
--
Best Regards,
Boian Jordanov
SNE
Orbitel - the Internet Company
tel. +359 2 4004 723
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html