diff options
author | Daniel Dragan <bulk88@hotmail.com> | 2014-02-13 11:07:56 +1100 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2014-02-17 09:26:14 +1100 |
commit | f9d625cd420cfb80ebe062541aa8812057b10117 (patch) | |
tree | a5c05fe4b536109593686764ff37f33f2fd9ccc5 /dist/ExtUtils-ParseXS/lib | |
parent | 90a04aed2328e6eb9574bec97888e5929ede257d (diff) | |
download | perl-f9d625cd420cfb80ebe062541aa8812057b10117.tar.gz |
add #define PERL_NO_GET_CONTEXT to ParseXS's pods
Not using PERL_NO_GET_CONTEXT is for legacy or unmaintained pre-ithreads
code. New code should define it.
Diffstat (limited to 'dist/ExtUtils-ParseXS/lib')
-rw-r--r-- | dist/ExtUtils-ParseXS/lib/perlxs.pod | 8 | ||||
-rw-r--r-- | dist/ExtUtils-ParseXS/lib/perlxstut.pod | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/dist/ExtUtils-ParseXS/lib/perlxs.pod b/dist/ExtUtils-ParseXS/lib/perlxs.pod index 12e2227ef4..0e9c84edb9 100644 --- a/dist/ExtUtils-ParseXS/lib/perlxs.pod +++ b/dist/ExtUtils-ParseXS/lib/perlxs.pod @@ -109,9 +109,11 @@ C and Perl and so preserves the interface even from Perl. This XSUB will be invoked from Perl with the usage shown above. Note that the first three #include statements, for C<EXTERN.h>, C<perl.h>, and C<XSUB.h>, will always be present at the -beginning of an XS file. This approach and others will be -expanded later in this document. +beginning of an XS file. PERL_NO_GET_CONTEXT should be present to use +the modern Perl C API. This approach and others will be expanded later +in this document. + #define PERL_NO_GET_CONTEXT #include "EXTERN.h" #include "perl.h" #include "XSUB.h" @@ -1870,6 +1872,7 @@ the C<-g> (C<--global>) option with h2xs (see L<h2xs>). Below is an example module that makes use of the macros. + #define PERL_NO_GET_CONTEXT #include "EXTERN.h" #include "perl.h" #include "XSUB.h" @@ -2050,6 +2053,7 @@ or even crashes become more likely), nor is it very portable. File C<RPC.xs>: Interface to some ONC+ RPC bind library functions. + #define PERL_NO_GET_CONTEXT #include "EXTERN.h" #include "perl.h" #include "XSUB.h" diff --git a/dist/ExtUtils-ParseXS/lib/perlxstut.pod b/dist/ExtUtils-ParseXS/lib/perlxstut.pod index 829e714b17..2f332731b4 100644 --- a/dist/ExtUtils-ParseXS/lib/perlxstut.pod +++ b/dist/ExtUtils-ParseXS/lib/perlxstut.pod @@ -146,6 +146,7 @@ the extension. Finally, the Mytest.xs file should look something like this: + #define PERL_NO_GET_CONTEXT #include "EXTERN.h" #include "perl.h" #include "XSUB.h" @@ -1227,6 +1228,7 @@ Suppose that for some strange reason we need a wrapper around the standard C library function C<fputs()>. This is all we need: #define PERLIO_NOT_STDIO 0 + #define PERL_NO_GET_CONTEXT #include "EXTERN.h" #include "perl.h" #include "XSUB.h" |