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.

96 lines
2.9 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
  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 _ZEND_EXTENSIONS_H
  20. #define _ZEND_EXTENSIONS_H
  21. #include "zend_compile.h"
  22. #define ZEND_EXTENSION_API_NO 19990619
  23. typedef struct _zend_extension_version_info {
  24. int zend_extension_api_no;
  25. char *required_zend_version;
  26. unsigned char thread_safe;
  27. unsigned char debug;
  28. } zend_extension_version_info;
  29. typedef struct _zend_extension zend_extension;
  30. struct _zend_extension {
  31. char *name;
  32. char *version;
  33. char *author;
  34. char *URL;
  35. char *copyright;
  36. int (*startup)(zend_extension *extension);
  37. void (*shutdown)(zend_extension *extension);
  38. void (*activate)();
  39. void (*deactivate)();
  40. void (*op_array_handler)(zend_op_array *op_array);
  41. void (*statement_handler)(zend_op_array *op_array);
  42. void (*fcall_begin_handler)(zend_op_array *op_array);
  43. void (*fcall_end_handler)(zend_op_array *op_array);
  44. void (*op_array_ctor)(void **resource);
  45. void (*op_array_dtor)(void **resource);
  46. void *reserved1;
  47. void *reserved2;
  48. void *reserved3;
  49. void *reserved4;
  50. void *reserved5;
  51. void *reserved6;
  52. void *reserved7;
  53. void *reserved8;
  54. DL_HANDLE handle;
  55. int resource_number;
  56. };
  57. ZEND_API int zend_get_resource_handle(zend_extension *extension);
  58. #ifdef ZTS
  59. #define ZTS_V 1
  60. #else
  61. #define ZTS_V 0
  62. #endif
  63. #define ZEND_EXTENSION() \
  64. ZEND_EXT_API zend_extension_version_info extension_version_info = { ZEND_EXTENSION_API_NO, "0.90", ZTS_V, ZEND_DEBUG }
  65. #define STANDARD_ZEND_EXTENSION_PROPERTIES NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -1
  66. ZEND_API extern zend_llist zend_extensions;
  67. void zend_extension_dtor(zend_extension *extension);
  68. int zend_load_extension(char *path);
  69. int zend_load_extensions(char **extension_paths);
  70. void zend_append_version_info(zend_extension *extension);
  71. void zend_shutdown_extensions(void);
  72. #endif /* _ZEND_EXTENSIONS_H */