File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / README.EXTENSIONS
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Sun Jun 15 20:03:41 2014 UTC (10 years, 6 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_29, HEAD
php 5.4.29

    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: 
    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
   41:     PHP_FOO_VERSION,      /* extension version number (string) */
   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>