in reply to XS: exposing C++ library constant as package variable
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.
|
|---|