xref: /PHP-7.4/ext/spl/php_spl.h (revision 92ac598a)
1 /*
2    +----------------------------------------------------------------------+
3    | PHP Version 7                                                        |
4    +----------------------------------------------------------------------+
5    | Copyright (c) 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 
19 #ifndef PHP_SPL_H
20 #define PHP_SPL_H
21 
22 #include "php.h"
23 #include <stdarg.h>
24 
25 #define PHP_SPL_VERSION PHP_VERSION
26 
27 extern zend_module_entry spl_module_entry;
28 #define phpext_spl_ptr &spl_module_entry
29 
30 #ifdef PHP_WIN32
31 #	ifdef SPL_EXPORTS
32 #		define SPL_API __declspec(dllexport)
33 #	elif defined(COMPILE_DL_SPL)
34 #		define SPL_API __declspec(dllimport)
35 #	else
36 #		define SPL_API /* nothing */
37 #	endif
38 #elif defined(__GNUC__) && __GNUC__ >= 4
39 #	define SPL_API __attribute__ ((visibility("default")))
40 #else
41 #	define SPL_API
42 #endif
43 
44 #if defined(PHP_WIN32) && !defined(COMPILE_DL_SPL)
45 #undef phpext_spl
46 #define phpext_spl NULL
47 #endif
48 
49 PHP_MINIT_FUNCTION(spl);
50 PHP_MSHUTDOWN_FUNCTION(spl);
51 PHP_RINIT_FUNCTION(spl);
52 PHP_RSHUTDOWN_FUNCTION(spl);
53 PHP_MINFO_FUNCTION(spl);
54 
55 
56 ZEND_BEGIN_MODULE_GLOBALS(spl)
57 	zend_string *autoload_extensions;
58 	HashTable   *autoload_functions;
59 	intptr_t     hash_mask_handle;
60 	intptr_t     hash_mask_handlers;
61 	int          hash_mask_init;
62 	int          autoload_running;
63 ZEND_END_MODULE_GLOBALS(spl)
64 
65 ZEND_EXTERN_MODULE_GLOBALS(spl)
66 #define SPL_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(spl, v)
67 
68 PHP_FUNCTION(spl_classes);
69 PHP_FUNCTION(class_parents);
70 PHP_FUNCTION(class_implements);
71 PHP_FUNCTION(class_uses);
72 
73 PHPAPI zend_string *php_spl_object_hash(zval *obj);
74 
75 #endif /* PHP_SPL_H */
76