halfcountplus has asked for the wisdom of the Perl Monks concerning the following question:
I'm turning some Inline::C modules into the more orthodox package format produced by h2xs and learning as I go. I just hit a problem when compiling some utility functions (i.e., stuff prior to the MODULE line) whereby there were complaints about 'my_perl' and various API types being undeclared.
In proper cargo cult style, I contemplated the #includes in relation to the source from a popular CPAN module, and noticed the boilerplate generated by h2xs has:
#define PERL_NO_GET_CONTEXT
Which is not in my example CPAN module, so I threw a dart and commented it out. Joy: the compile now goes fine (although I'll have to wait until later this morning to test whether everything will truly hang together properly).
I don't have the perl source at hand, so I'm wondering what this is about. It's not used in the perldoc examples (xs, xstut, etc), and searching the web just revealed various obscure bug reports where the solution was the same ("comment that out"). There are no references here on perl monks, but I'm hoping one of you can offer a brief explanation.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Significance of #define PERL_GET_NO_CONTEXT in XS
by dave_the_m (Monsignor) on Mar 13, 2014 at 13:24 UTC | |
by halfcountplus (Hermit) on Mar 13, 2014 at 18:08 UTC | |
by syphilis (Archbishop) on Mar 14, 2014 at 03:20 UTC | |
by dave_the_m (Monsignor) on Mar 14, 2014 at 12:34 UTC | |
by syphilis (Archbishop) on Mar 14, 2014 at 13:57 UTC |