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.

64 lines
2.5 KiB

27 years ago
27 years ago
27 years ago
27 years ago
27 years ago
27 years ago
27 years ago
27 years ago
27 years ago
27 years ago
27 years ago
27 years ago
27 years ago
27 years ago
27 years ago
27 years ago
27 years ago
27 years ago
  1. /*
  2. +----------------------------------------------------------------------+
  3. | Zend Engine |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 1998, 1999 Andi Gutmans, Zeev Suraski |
  6. +----------------------------------------------------------------------+
  7. | This source file is subject to version 0.91 of the Zend license, |
  8. | that is bundled with this package in the file LICENSE, and is |
  9. | available at through the world-wide-web at |
  10. | http://www.zend.com/license/0_91.txt. |
  11. | If you did not receive a copy of the Zend license and are unable to |
  12. | obtain it through the world-wide-web, please send a note to |
  13. | license@zend.com so we can mail you a copy immediately. |
  14. +----------------------------------------------------------------------+
  15. | Authors: Andi Gutmans <andi@zend.com> |
  16. | Zeev Suraski <zeev@zend.com> |
  17. +----------------------------------------------------------------------+
  18. */
  19. #ifndef _MODULES_H
  20. #define _MODULES_H
  21. #define INIT_FUNC_ARGS int type, int module_number
  22. #define INIT_FUNC_ARGS_PASSTHRU type, module_number
  23. #define SHUTDOWN_FUNC_ARGS int type, int module_number
  24. #define SHUTDOWN_FUNC_ARGS_PASSTHRU type, module_number
  25. #define ZEND_MODULE_INFO_FUNC_ARGS zend_module_entry *zend_module
  26. #define STANDARD_MODULE_PROPERTIES_EX 0, 0, NULL, 0
  27. #define STANDARD_MODULE_PROPERTIES \
  28. NULL, NULL, STANDARD_MODULE_PROPERTIES_EX
  29. #define MODULE_PERSISTENT 1
  30. #define MODULE_TEMPORARY 2
  31. typedef struct _zend_module_entry zend_module_entry;
  32. struct _zend_module_entry {
  33. char *name;
  34. zend_function_entry *functions;
  35. int (*module_startup_func)(INIT_FUNC_ARGS);
  36. int (*module_shutdown_func)(SHUTDOWN_FUNC_ARGS);
  37. int (*request_startup_func)(INIT_FUNC_ARGS);
  38. int (*request_shutdown_func)(SHUTDOWN_FUNC_ARGS);
  39. void (*info_func)(ZEND_MODULE_INFO_FUNC_ARGS);
  40. int (*global_startup_func)(void);
  41. int (*global_shutdown_func)(void);
  42. int module_started;
  43. unsigned char type;
  44. void *handle;
  45. int module_number;
  46. };
  47. extern HashTable module_registry;
  48. void module_destructor(zend_module_entry *module);
  49. int module_registry_cleanup(zend_module_entry *module);
  50. int module_registry_request_startup(zend_module_entry *module);
  51. #define ZEND_MODULE_DTOR (int (*)(void *)) module_destructor
  52. #endif