diff options
-rw-r--r-- | MANIFEST | 4 | ||||
-rw-r--r-- | dist/ExtUtils-ParseXS/lib/perlxs.pod (renamed from pod/perlxs.pod) | 46 | ||||
-rw-r--r-- | dist/ExtUtils-ParseXS/lib/perlxstut.pod (renamed from pod/perlxstut.pod) | 0 | ||||
-rw-r--r-- | lib/.gitignore | 2 | ||||
-rw-r--r-- | pod.lst | 4 | ||||
-rw-r--r-- | t/porting/known_pod_issues.dat | 4 | ||||
-rw-r--r-- | vms/descrip_mms.template | 11 | ||||
-rw-r--r-- | win32/pod.mak | 16 |
8 files changed, 36 insertions, 51 deletions
@@ -2982,6 +2982,8 @@ dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/OutputMap.pm ExtUtils::Typemaps guts dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps.pm ExtUtils::Typemaps, a PXS helper dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps/Type.pm ExtUtils::Typemaps guts dist/ExtUtils-ParseXS/lib/ExtUtils/xsubpp External subroutine preprocessor +dist/ExtUtils-ParseXS/lib/perlxs.pod Perl XS application programming interface +dist/ExtUtils-ParseXS/lib/perlxstut.pod Perl XS tutorial dist/ExtUtils-ParseXS/t/001-basic.t See if ExtUtils::ParseXS works dist/ExtUtils-ParseXS/t/002-more.t Extended ExtUtils::ParseXS testing dist/ExtUtils-ParseXS/t/003-usage.t ExtUtils::ParseXS tests @@ -4486,8 +4488,6 @@ pod/perlunitut.pod Perl Unicode tutorial pod/perlutil.pod utilities packaged with the Perl distribution pod/perlvar.pod Perl predefined variables pod/perlvms.pod Perl notes for VMS -pod/perlxs.pod Perl XS application programming interface -pod/perlxstut.pod Perl XS tutorial pod/roffitall troff the whole man page set pod/rofftoc Generate a table of contents in troff format pod/splitman Splits perlfunc into multiple man pages diff --git a/pod/perlxs.pod b/dist/ExtUtils-ParseXS/lib/perlxs.pod index e5077a8240..910bc2f083 100644 --- a/pod/perlxs.pod +++ b/dist/ExtUtils-ParseXS/lib/perlxs.pod @@ -68,7 +68,7 @@ first C<MODULE =Z<>> directive. Other XS directives and XSUB definitions may follow this line. The "language" used in this part of the file is usually referred to as the XS language. B<xsubpp> recognizes and skips POD (see L<perlpod>) in both the C and XS language sections, which -allows the XS file to contain embedded documentation. +allows the XS file to contain embedded documentation. See L<perlxstut> for a tutorial on the whole extension creation process. @@ -1314,7 +1314,7 @@ for your functions (like the ALIAS: keyword above). However, the overloaded functions must be defined with three parameters (except for the nomethod() function which needs four parameters). If any function has the OVERLOAD: keyword, several additional lines -will be defined in the c file generated by xsubpp in order to +will be defined in the c file generated by xsubpp in order to register with the overload magic. Since blessed objects are actually stored as RV's, it is useful @@ -1337,7 +1337,7 @@ this: In this case, the function will overload both of the three way comparison operators. For all overload operations using non-alpha characters, you must type the parameter without quoting, separating -multiple overloads with whitespace. Note that "" (the stringify +multiple overloads with whitespace. Note that "" (the stringify overload) should be entered as \"\" (i.e. escaped). =head2 The FALLBACK: Keyword @@ -1353,7 +1353,7 @@ FALLBACK keyword in the module header section, like this: where FALLBACK can take any of the three values TRUE, FALSE, or UNDEF. If you do not set any FALLBACK value when using OVERLOAD, -it defaults to UNDEF. FALLBACK is not used except when one or +it defaults to UNDEF. FALLBACK is not used except when one or more functions using OVERLOAD have been defined. Please see L<overload/fallback> for more details. @@ -1372,11 +1372,11 @@ subtract() all having the signature: you can make them all to use the same XSUB using this: symbolic - interface_s_ss(arg1, arg2) + interface_s_ss(arg1, arg2) symbolic arg1 symbolic arg2 INTERFACE: - multiply divide + multiply divide add subtract (This is the complete XSUB code for 4 Perl functions!) Four generated @@ -1387,7 +1387,7 @@ is no need to code a switch statement, each Perl function (which shares the same XSUB) knows which C function it should call. Additionally, one can attach an extra function remainder() at runtime by using - CV *mycv = newXSproto("Symbolic::remainder", + CV *mycv = newXSproto("Symbolic::remainder", XS_Symbolic_interface_s_ss, __FILE__, "$$"); XSINTERFACE_FUNC_SET(mycv, remainder); @@ -1408,10 +1408,10 @@ The default value is C<XSINTERFACE_FUNC> and C<XSINTERFACE_FUNC_SET>. An INTERFACE keyword with an empty list of functions can be omitted if INTERFACE_MACRO keyword is used. -Suppose that in the previous example functions pointers for +Suppose that in the previous example functions pointers for multiply(), divide(), add(), subtract() are kept in a global C array C<fp[]> with offsets being C<multiply_off>, C<divide_off>, C<add_off>, -C<subtract_off>. Then one can use +C<subtract_off>. Then one can use #define XSINTERFACE_FUNC_BYOFFSET(ret,cv,f) \ ((XSINTERFACE_CVT_ANON(ret))fp[CvXSUBANY(cv).any_i32]) @@ -1421,14 +1421,14 @@ C<subtract_off>. Then one can use in C section, symbolic - interface_s_ss(arg1, arg2) + interface_s_ss(arg1, arg2) symbolic arg1 symbolic arg2 - INTERFACE_MACRO: + INTERFACE_MACRO: XSINTERFACE_FUNC_BYOFFSET XSINTERFACE_FUNC_BYOFFSET_set INTERFACE: - multiply divide + multiply divide add subtract in XSUB section. @@ -1632,7 +1632,7 @@ not listed. color::set_blue( val ) int val -Both Perl functions will expect an object as the first parameter. In the +Both Perl functions will expect an object as the first parameter. In the generated C++ code the object is called C<THIS>, and the method call will be performed on this object. So in the C++ code the blue() and set_blue() methods will be called as this: @@ -1688,16 +1688,16 @@ example. # The Perl object is blessed into 'CLASS', which should be a # char* having the name of the package for the blessing. O_OBJECT - sv_setref_pv( $arg, CLASS, (void*)$var ); + sv_setref_pv( $arg, CLASS, (void*)$var ); INPUT O_OBJECT - if( sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVMG) ) - $var = ($type)SvIV((SV*)SvRV( $arg )); - else{ - warn( \"${Package}::$func_name() -- $var is not a blessed SV reference\" ); - XSRETURN_UNDEF; - } + if( sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVMG) ) + $var = ($type)SvIV((SV*)SvRV( $arg )); + else{ + warn( \"${Package}::$func_name() -- $var is not a blessed SV reference\" ); + XSRETURN_UNDEF; + } =head2 Interface Strategy @@ -1889,7 +1889,7 @@ The INPUT and OUTPUT sections substitute underscores for double-colons on the fly, giving the desired effect. This example demonstrates some of the power and versatility of the typemap facility. -The INT2PTR macro (defined in perl.h) casts an integer to a pointer, +The INT2PTR macro (defined in perl.h) casts an integer to a pointer, of a given type, taking care of the possible different size of integers and pointers. There are also PTR2IV, PTR2UV, PTR2NV macros, to map the other way, which may be useful in OUTPUT sections. @@ -1935,7 +1935,7 @@ Below is an example module that makes use of the macros. strcpy(MY_CXT.name[0], "None"); strcpy(MY_CXT.name[1], "None"); strcpy(MY_CXT.name[2], "None"); - } + } int newMouse(char * name) @@ -2015,7 +2015,7 @@ MY_CXT. =item MY_CXT Use the MY_CXT macro to access members of the C<my_cxt_t> struct. For -example, if C<my_cxt_t> is +example, if C<my_cxt_t> is typedef struct { int index; diff --git a/pod/perlxstut.pod b/dist/ExtUtils-ParseXS/lib/perlxstut.pod index 15d8f77b8f..15d8f77b8f 100644 --- a/pod/perlxstut.pod +++ b/dist/ExtUtils-ParseXS/lib/perlxstut.pod diff --git a/lib/.gitignore b/lib/.gitignore index 75022003f5..db67151c4f 100644 --- a/lib/.gitignore +++ b/lib/.gitignore @@ -398,6 +398,8 @@ /parent.pm /perldoc.pod /perlfaq* +/perlxs.pod +/perlxstut.pod /re.pm /threads /threads.pm @@ -109,8 +109,8 @@ h Internals and C Language Interface perlembed Perl ways to embed perl in your C or C++ application perldebguts Perl debugging guts and tips - perlxstut Perl XS tutorial - perlxs Perl XS application programming interface + dist/ExtUtils-ParseXS/lib/perlxstut Perl XS tutorial + dist/ExtUtils-ParseXS/lib/perlxs Perl XS application programming interface perlclib Internal replacements for standard C library functions perlguts Perl internal functions for those doing extensions perlcall Perl calling conventions from C diff --git a/t/porting/known_pod_issues.dat b/t/porting/known_pod_issues.dat index 830cf65a6c..c78905ef9f 100644 --- a/t/porting/known_pod_issues.dat +++ b/t/porting/known_pod_issues.dat @@ -148,6 +148,8 @@ dist/data-dumper/dumper.pm Verbatim line length including indents exceeds 80 by dist/extutils-install/lib/extutils/installed.pm Verbatim line length including indents exceeds 80 by 2 dist/extutils-parsexs/lib/extutils/typemaps.pm Verbatim line length including indents exceeds 80 by 4 dist/extutils-parsexs/lib/extutils/typemaps/outputmap.pm Verbatim line length including indents exceeds 80 by 1 +dist/extutils-parsexs/lib/perlxs.pod Verbatim line length including indents exceeds 80 by 4 +dist/extutils-parsexs/lib/perlxstut.pod Verbatim line length including indents exceeds 80 by 10 dist/filter-simple/lib/filter/simple.pm Verbatim paragraph in NAME section 1 dist/i18n-langtags/lib/i18n/langtags.pm Verbatim line length including indents exceeds 80 by 2 dist/io/io.pm Verbatim line length including indents exceeds 80 by 1 @@ -302,8 +304,6 @@ pod/perlvar.pod Verbatim line length including indents exceeds 80 by 9 pod/perlvms.pod ? Should you be using F<...> or maybe L<...> instead of 1 pod/perlvms.pod Verbatim line length including indents exceeds 80 by 2 pod/perlwin32.pod Verbatim line length including indents exceeds 80 by 12 -pod/perlxs.pod Verbatim line length including indents exceeds 80 by 4 -pod/perlxstut.pod Verbatim line length including indents exceeds 80 by 10 porting/epigraphs.pod Verbatim line length including indents exceeds 80 by 3 porting/expand-macro.pl Verbatim line length including indents exceeds 80 by 2 porting/how_to_write_a_perldelta.pod There is no NAME 1 diff --git a/vms/descrip_mms.template b/vms/descrip_mms.template index 235acf006a..97b8396180 100644 --- a/vms/descrip_mms.template +++ b/vms/descrip_mms.template @@ -425,8 +425,7 @@ pod30 = [.lib.pods]perlsymbian.pod [.lib.pods]perlsyn.pod [.lib.pods]perlthrtut. pod31 = [.lib.pods]perltooc.pod [.lib.pods]perltoot.pod [.lib.pods]perltrap.pod [.lib.pods]perltru64.pod [.lib.pods]perltw.pod [.lib.pods]perlunicode.pod pod32 = [.lib.pods]perlunifaq.pod [.lib.pods]perluniintro.pod [.lib.pods]perluniprops.pod [.lib.pods]perlunitut.pod [.lib.pods]perlutil.pod pod33 = [.lib.pods]perluts.pod [.lib.pods]perlvar.pod [.lib.pods]perlvmesa.pod [.lib.pods]perlvms.pod [.lib.pods]perlvos.pod [.lib.pods]perlwin32.pod -pod34 = [.lib.pods]perlxs.pod [.lib.pods]perlxstut.pod -pod = $(pod0) $(pod1) $(pod2) $(pod3) $(pod4) $(pod5) $(pod6) $(pod7) $(pod8) $(pod9) $(pod10) $(pod11) $(pod12) $(pod13) $(pod14) $(pod15) $(pod16) $(pod17) $(pod18) $(pod19) $(pod20) $(pod21) $(pod22) $(pod23) $(pod24) $(pod25) $(pod26) $(pod27) $(pod28) $(pod29) $(pod30) $(pod31) $(pod32) $(pod33) $(pod34) +pod = $(pod0) $(pod1) $(pod2) $(pod3) $(pod4) $(pod5) $(pod6) $(pod7) $(pod8) $(pod9) $(pod10) $(pod11) $(pod12) $(pod13) $(pod14) $(pod15) $(pod16) $(pod17) $(pod18) $(pod19) $(pod20) $(pod21) $(pod22) $(pod23) $(pod24) $(pod25) $(pod26) $(pod27) $(pod28) $(pod29) $(pod30) $(pod31) $(pod32) $(pod33) PERLDELTA_CURRENT = [.pod]perl5151delta.pod @@ -1409,14 +1408,6 @@ makeppport : $(MINIPERL_EXE) $(ARCHDIR)Config.pm nonxsext @ If F$Search("[.lib]pods.dir").eqs."" Then Create/Directory [.lib.pods] Copy/NoConfirm/Log $(MMS$SOURCE) [.lib.pods] -[.lib.pods]perlxs.pod : [.pod]perlxs.pod - @ If F$Search("[.lib]pods.dir").eqs."" Then Create/Directory [.lib.pods] - Copy/NoConfirm/Log $(MMS$SOURCE) [.lib.pods] - -[.lib.pods]perlxstut.pod : [.pod]perlxstut.pod - @ If F$Search("[.lib]pods.dir").eqs."" Then Create/Directory [.lib.pods] - Copy/NoConfirm/Log $(MMS$SOURCE) [.lib.pods] - install.html : [.pod]perltoc.pod @ @perl_setup.com @ If F$Search("perl_root:[lib]html.dir").eqs."" Then Create/Directory perl_root:[lib.html] diff --git a/win32/pod.mak b/win32/pod.mak index 4723ca21e1..d2744d2631 100644 --- a/win32/pod.mak +++ b/win32/pod.mak @@ -160,9 +160,7 @@ POD = \ perlunitut.pod \ perlutil.pod \ perlvar.pod \ - perlvms.pod \ - perlxs.pod \ - perlxstut.pod + perlvms.pod MAN = \ perl.man \ @@ -309,9 +307,7 @@ MAN = \ perlunitut.man \ perlutil.man \ perlvar.man \ - perlvms.man \ - perlxs.man \ - perlxstut.man + perlvms.man HTML = \ perl.html \ @@ -457,9 +453,7 @@ HTML = \ perlunitut.html \ perlutil.html \ perlvar.html \ - perlvms.html \ - perlxs.html \ - perlxstut.html + perlvms.html # not perltoc.html TEX = \ @@ -607,9 +601,7 @@ TEX = \ perlunitut.tex \ perlutil.tex \ perlvar.tex \ - perlvms.tex \ - perlxs.tex \ - perlxstut.tex + perlvms.tex man: $(POD2MAN) $(MAN) |