php_spl.h 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*
  2. +----------------------------------------------------------------------+
  3. | PHP Version 5 |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 1997-2016 The PHP Group |
  6. +----------------------------------------------------------------------+
  7. | This source file is subject to version 3.01 of the PHP license, |
  8. | that is bundled with this package in the file LICENSE, and is |
  9. | available through the world-wide-web at the following url: |
  10. | http://www.php.net/license/3_01.txt |
  11. | If you did not receive a copy of the PHP license and are unable to |
  12. | obtain it through the world-wide-web, please send a note to |
  13. | license@php.net so we can mail you a copy immediately. |
  14. +----------------------------------------------------------------------+
  15. | Authors: Marcus Boerger <helly@php.net> |
  16. +----------------------------------------------------------------------+
  17. */
  18. #ifndef PHP_SPL_H
  19. #define PHP_SPL_H
  20. #include "php.h"
  21. #include <stdarg.h>
  22. #if 0
  23. #define SPL_DEBUG(x) x
  24. #else
  25. #define SPL_DEBUG(x)
  26. #endif
  27. extern zend_module_entry spl_module_entry;
  28. #define phpext_spl_ptr &spl_module_entry
  29. #ifdef PHP_WIN32
  30. # ifdef SPL_EXPORTS
  31. # define SPL_API __declspec(dllexport)
  32. # elif defined(COMPILE_DL_SPL)
  33. # define SPL_API __declspec(dllimport)
  34. # else
  35. # define SPL_API /* nothing */
  36. # endif
  37. #elif defined(__GNUC__) && __GNUC__ >= 4
  38. # define SPL_API __attribute__ ((visibility("default")))
  39. #else
  40. # define SPL_API
  41. #endif
  42. #if defined(PHP_WIN32) && !defined(COMPILE_DL_SPL)
  43. #undef phpext_spl
  44. #define phpext_spl NULL
  45. #endif
  46. PHP_MINIT_FUNCTION(spl);
  47. PHP_MSHUTDOWN_FUNCTION(spl);
  48. PHP_RINIT_FUNCTION(spl);
  49. PHP_RSHUTDOWN_FUNCTION(spl);
  50. PHP_MINFO_FUNCTION(spl);
  51. ZEND_BEGIN_MODULE_GLOBALS(spl)
  52. char * autoload_extensions;
  53. HashTable * autoload_functions;
  54. int autoload_running;
  55. int autoload_extensions_len;
  56. intptr_t hash_mask_handle;
  57. intptr_t hash_mask_handlers;
  58. int hash_mask_init;
  59. ZEND_END_MODULE_GLOBALS(spl)
  60. #ifdef ZTS
  61. # define SPL_G(v) TSRMG(spl_globals_id, zend_spl_globals *, v)
  62. extern int spl_globals_id;
  63. #else
  64. # define SPL_G(v) (spl_globals.v)
  65. extern zend_spl_globals spl_globals;
  66. #endif
  67. PHP_FUNCTION(spl_classes);
  68. PHP_FUNCTION(class_parents);
  69. PHP_FUNCTION(class_implements);
  70. PHP_FUNCTION(class_uses);
  71. PHPAPI void php_spl_object_hash(zval *obj, char* md5str TSRMLS_DC);
  72. #endif /* PHP_SPL_H */
  73. /*
  74. * Local Variables:
  75. * c-basic-offset: 4
  76. * tab-width: 4
  77. * End:
  78. * vim600: fdm=marker
  79. * vim: noet sw=4 ts=4
  80. */