RE: Am I checking for undef in the wrong way?
[email protected] (Erland Sommarskog)
| Newsgroups | perl.xs |
|---|---|
| Organization | Erland Sommarskog |
| Message-ID | <[email protected]> |
"Jan Dubois" ([email protected]) writes: > This can happen with other magical SVs too. You must call SvGETMAGIC() > before you can trust the SVf_?OK flags. SvIV() will do this as a side > effect. Thus, in any place where I receive a value of which I don't know the origin, I should call SvGETMAGIC first. I could then just as well have BOOL sv_isdefined(SV *sv) { SvGETMAGIC(sv); return SvOK(sv); } Or would this lead in my new problems? Thanks a lot for your quick answer! -- Erland Sommarskog, Stockholm, [email protected]