You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.5 KiB

  1. Between PHP 4.0.6 and 4.1.0, the Zend module struct changed in a way
  2. that broke both source and binary compatibility. If you are
  3. maintaining a third party extension, here's how to update it:
  4. If this was your old module entry:
  5. zend_module_entry foo_module_entry = {
  6. "foo", /* extension name */
  7. foo_functions, /* extension function list */
  8. NULL, /* extension-wide startup function */
  9. NULL, /* extension-wide shutdown function */
  10. PHP_RINIT(foo), /* per-request startup function */
  11. PHP_RSHUTDOWN(foo), /* per-request shutdown function */
  12. PHP_MINFO(foo), /* information function */
  13. STANDARD_MODULE_PROPERTIES
  14. };
  15. Here's how it should look if you want your code to build with PHP
  16. 4.1.0 and up:
  17. zend_module_entry foo_module_entry = {
  18. #if ZEND_MODULE_API_NO >= 20010901
  19. STANDARD_MODULE_HEADER,
  20. #endif
  21. "foo", /* extension name */
  22. foo_functions, /* extension function list */
  23. NULL, /* extension-wide startup function */
  24. NULL, /* extension-wide shutdown function */
  25. PHP_RINIT(foo), /* per-request startup function */
  26. PHP_RSHUTDOWN(foo), /* per-request shutdown function */
  27. PHP_MINFO(foo), /* information function */
  28. #if ZEND_MODULE_API_NO >= 20010901
  29. FOO_VERSION, /* extension version number (string) */
  30. #endif
  31. STANDARD_MODULE_PROPERTIES
  32. };
  33. If you don't care about source compatibility with earlier PHP releases
  34. than 4.1.0, you can drop the #if/#endif lines.