php_test.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*
  2. +----------------------------------------------------------------------+
  3. | Copyright (c) The PHP Group |
  4. +----------------------------------------------------------------------+
  5. | This source file is subject to version 3.01 of the PHP license, |
  6. | that is bundled with this package in the file LICENSE, and is |
  7. | available through the world-wide-web at the following url: |
  8. | https://www.php.net/license/3_01.txt |
  9. | If you did not receive a copy of the PHP license and are unable to |
  10. | obtain it through the world-wide-web, please send a note to |
  11. | license@php.net so we can mail you a copy immediately. |
  12. +----------------------------------------------------------------------+
  13. | Author: |
  14. +----------------------------------------------------------------------+
  15. */
  16. #ifndef PHP_TEST_H
  17. #define PHP_TEST_H
  18. #include "fiber.h"
  19. extern zend_module_entry zend_test_module_entry;
  20. #define phpext_zend_test_ptr &zend_test_module_entry
  21. #define PHP_ZEND_TEST_VERSION "0.1.0"
  22. #ifdef ZTS
  23. #include "TSRM.h"
  24. #endif
  25. #if defined(ZTS) && defined(COMPILE_DL_ZEND_TEST)
  26. ZEND_TSRMLS_CACHE_EXTERN()
  27. #endif
  28. ZEND_BEGIN_MODULE_GLOBALS(zend_test)
  29. int observer_enabled;
  30. int observer_show_output;
  31. int observer_observe_all;
  32. int observer_observe_includes;
  33. int observer_observe_functions;
  34. zend_array *observer_observe_function_names;
  35. int observer_show_return_type;
  36. int observer_show_return_value;
  37. int observer_show_init_backtrace;
  38. int observer_show_opcode;
  39. char *observer_show_opcode_in_user_handler;
  40. int observer_nesting_depth;
  41. int observer_fiber_init;
  42. int observer_fiber_switch;
  43. int observer_fiber_destroy;
  44. HashTable global_weakmap;
  45. int replace_zend_execute_ex;
  46. int register_passes;
  47. zend_test_fiber *active_fiber;
  48. ZEND_END_MODULE_GLOBALS(zend_test)
  49. extern ZEND_DECLARE_MODULE_GLOBALS(zend_test)
  50. #define ZT_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(zend_test, v)
  51. struct bug79096 {
  52. uint64_t a;
  53. uint64_t b;
  54. };
  55. #ifdef PHP_WIN32
  56. # define PHP_ZEND_TEST_API __declspec(dllexport)
  57. #elif defined(__GNUC__) && __GNUC__ >= 4
  58. # define PHP_ZEND_TEST_API __attribute__ ((visibility("default")))
  59. #else
  60. # define PHP_ZEND_TEST_API
  61. #endif
  62. PHP_ZEND_TEST_API int ZEND_FASTCALL bug78270(const char *str, size_t str_len);
  63. PHP_ZEND_TEST_API struct bug79096 bug79096(void);
  64. PHP_ZEND_TEST_API void bug79532(off_t *array, size_t elems);
  65. extern PHP_ZEND_TEST_API int *(*bug79177_cb)(void);
  66. PHP_ZEND_TEST_API void bug79177(void);
  67. #endif