1/*
2 +----------------------------------------------------------------------+
3 | PHP Version 5 |
4 +----------------------------------------------------------------------+
5 | Copyright (c) 1997-2015 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#if 0
26#define SPL_DEBUG(x) x
27#else
28#define SPL_DEBUG(x)
29#endif
30
31extern zend_module_entry spl_module_entry;
32#define phpext_spl_ptr &spl_module_entry
33
34#ifdef PHP_WIN32
35# ifdef SPL_EXPORTS
36# define SPL_API __declspec(dllexport)
37# elif defined(COMPILE_DL_SPL)
38# define SPL_API __declspec(dllimport)
39# else
40# define SPL_API /* nothing */
41# endif
42#elif defined(__GNUC__) && __GNUC__ >= 4
43# define SPL_API __attribute__ ((visibility("default")))
44#else
45# define SPL_API
46#endif
47
48#if defined(PHP_WIN32) && !defined(COMPILE_DL_SPL)
49#undef phpext_spl
50#define phpext_spl NULL
51#endif
52
53PHP_MINIT_FUNCTION(spl);
54PHP_MSHUTDOWN_FUNCTION(spl);
55PHP_RINIT_FUNCTION(spl);
56PHP_RSHUTDOWN_FUNCTION(spl);
57PHP_MINFO_FUNCTION(spl);
58
59
60ZEND_BEGIN_MODULE_GLOBALS(spl)
61 char * autoload_extensions;
62 HashTable * autoload_functions;
63 int autoload_running;
64 int autoload_extensions_len;
65 intptr_t hash_mask_handle;
66 intptr_t hash_mask_handlers;
67 int hash_mask_init;
68ZEND_END_MODULE_GLOBALS(spl)
69
70#ifdef ZTS
71# define SPL_G(v) TSRMG(spl_globals_id, zend_spl_globals *, v)
72extern int spl_globals_id;
73#else
74# define SPL_G(v) (spl_globals.v)
75extern zend_spl_globals spl_globals;
76#endif
77
78PHP_FUNCTION(spl_classes);
79PHP_FUNCTION(class_parents);
80PHP_FUNCTION(class_implements);
81PHP_FUNCTION(class_uses);
82
83PHPAPI void php_spl_object_hash(zval *obj, char* md5str TSRMLS_DC);
84
85#endif /* PHP_SPL_H */
86
87/*
88 * Local Variables:
89 * c-basic-offset: 4
90 * tab-width: 4
91 * End:
92 * vim600: fdm=marker
93 * vim: noet sw=4 ts=4
94 */
95