P is for Practical | |
PerlMonks |
Re: XS: exposing C++ library constant as package variableby BrowserUk (Patriarch) |
on Oct 06, 2015 at 22:13 UTC ( [id://1143988]=note: print w/replies, xml ) | Need Help?? |
If you add GV_ADD in place of the 0 as the second argument to get_sv(), then you shouldn't need to pre-declare or initialise MyModule::CONSTANT_NAME in the Perl code, as it will be created for you. As for caveats with regard to threading; as it is a constant, there should be none. With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.
In Section
Seekers of Perl Wisdom
|
|