Annotation of embedaddon/php/README.EXTENSIONS, revision 1.1.1.2
1.1.1.2 ! misho 1: This file describes extension module API details. Refer to
! 2: README.EXT_SKEL to create extension skeleton files. Refer to
! 3: Hacker's Guide for PHP internals.
! 4:
! 5: http://www.php.net/manual/en/internals2.php
! 6:
! 7:
! 8:
1.1 misho 9: Between PHP 4.0.6 and 4.1.0, the Zend module struct changed in a way
10: that broke both source and binary compatibility. If you are
11: maintaining a third party extension, here's how to update it:
12:
13: If this was your old module entry:
14:
15: zend_module_entry foo_module_entry = {
16: "foo", /* extension name */
17: foo_functions, /* extension function list */
18: NULL, /* extension-wide startup function */
19: NULL, /* extension-wide shutdown function */
20: PHP_RINIT(foo), /* per-request startup function */
21: PHP_RSHUTDOWN(foo), /* per-request shutdown function */
22: PHP_MINFO(foo), /* information function */
23: STANDARD_MODULE_PROPERTIES
24: };
25:
26: Here's how it should look if you want your code to build with PHP
27: 4.1.0 and up:
28:
29: zend_module_entry foo_module_entry = {
30: #if ZEND_MODULE_API_NO >= 20010901
31: STANDARD_MODULE_HEADER,
32: #endif
33: "foo", /* extension name */
34: foo_functions, /* extension function list */
35: NULL, /* extension-wide startup function */
36: NULL, /* extension-wide shutdown function */
37: PHP_RINIT(foo), /* per-request startup function */
38: PHP_RSHUTDOWN(foo), /* per-request shutdown function */
39: PHP_MINFO(foo), /* information function */
40: #if ZEND_MODULE_API_NO >= 20010901
1.1.1.2 ! misho 41: PHP_FOO_VERSION, /* extension version number (string) */
1.1 misho 42: #endif
43: STANDARD_MODULE_PROPERTIES
44: };
45:
46: If you don't care about source compatibility with earlier PHP releases
47: than 4.1.0, you can drop the #if/#endif lines.
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>