> 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!
If a scalar has a type of MAGIC: (SvTYPE(sv) == SVt_PVMG) and has the SVs_GMG flag set in its SvFLAGS field: ((SvFLAGS(sv) & SVs_GMG) you should invoke SvGETMAGIC. Otherwise, it isn't required. Greetings, Ferry -- Ing. Ferry Bolhár-Nordenkampf Magistrat der Stadt Wien - MA 14 A-1010 Wien E-mail: ferdinand.bolhar-nordenka...@wien.gv.at