stas01/11/29 08:26:32
Modified:src/devel/core_explained core_explained.pod
Log:
- document the BOOT= directive in the map file
Revision ChangesPath
1.8 +36 -3 modperl-docs/src/devel/core_explained/core_explained.pod
Index: core_explained.pod
===
RCS file: /home/cvs/modperl-docs/src/devel/core_explained/core_explained.pod,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- core_explained.pod2001/11/22 15:43:58 1.7
+++ core_explained.pod2001/11/29 16:26:32 1.8
@@ -156,7 +156,40 @@
=item * CBOOT
-META: complete
+The CBOOT directive tells the XS generator, whether to add the boot
+function to the autogenerated XS file or not. If the value of CBOOT
+is not true or it's simply not declared, the boot function won't be
+added.
+
+If the value is true, a boot function will be added to the XS file.
+Note, that this function is not declared in the map file.
+
+The boot function name must be constructed from three parts:
+
+ 'mpxs_' . MODULE . '_BOOT'
+
+where CMODULE is the one declared with CMODULE= in the map file.
+
+For example if we want to have an XS boot function for a class
+CAPR::IO, we create this function in Ixs/APR/IO/APR__IO.h:
+
+ static void mpxs_APR__IO_BOOT(pTHX)
+ {
+ /* boot code here */
+ }
+
+and now we add the CBOOT=1 declaration to the
+Ixs/maps/modperl_functions.map file:
+
+ MODULE=APR::IO PACKAGE=APR::IO BOOT=1
+
+When Imake xs_generate is run (after running Imake source_scan),
+it autogenerates IWrap/APR/IO/IO.xs and amongst other things will
+include:
+
+ BOOT:
+ mpxs_APR__IO_BOOT(aTHXo);
+
=item * CISA
@@ -164,8 +197,8 @@
=back
-Every function definition is declared on a separate line, using the
-following format:
+Every function definition is declared on a separate line (use C\ if
+the line is too long), using the following format:
C function name | Dispatch function name | Argspec | Perl alias
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]