Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: Inline::C hash access

by dave_the_m (Monsignor)
on Sep 04, 2008 at 15:14 UTC ( #709036=note: print w/replies, xml ) Need Help??


in reply to Re^2: Inline::C hash access
in thread Inline::C hash access

if( SvOK(sv) && SvTYPE(sv) == SVt_RV )
That's not what you want - the SvTYPE just says what the SV's body physically consists of, and says nothing about whether it currently contains a valid RV. For example, if you do  $x = "foo"; $x = \$y; then the SvTYPE of $x is actually SVt_PV. You probably want:
if (SvROK(sv)) ...

Dave.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://709036]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (9)
As of 2021-03-01 11:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?