1 /*
2   +----------------------------------------------------------------------+
3   | See COPYING file for further copyright information                   |
4   +----------------------------------------------------------------------+
5   | Author: Oleg Grenrus <oleg.grenrus@dynamoid.com>                     |
6   | See CREDITS for contributors                                         |
7   +----------------------------------------------------------------------+
8 */
9 
10 #ifndef PHP_IGBINARY_H
11 #define PHP_IGBINARY_H
12 // Note: php_igbinary.h should contain publicly exposed variables, functions, and macros of igbinary.
13 // If a macro is needed by *only* igbinary, put it in igbinary_macros.h
14 
15 #include "php.h"
16 
17 /** Module entry of igbinary. */
18 extern zend_module_entry igbinary_module_entry;
19 #define phpext_igbinary_ptr &igbinary_module_entry
20 
21 #ifdef PHP_WIN32
22 #define PHP_IGBINARY_API __declspec(dllexport)
23 #else
24 #define PHP_IGBINARY_API
25 #endif
26 
27 ZEND_BEGIN_MODULE_GLOBALS(igbinary)
28 	zend_bool compact_strings;
29 ZEND_END_MODULE_GLOBALS(igbinary)
30 
31 #ifdef ZTS
32 #include "TSRM.h"
33 #endif
34 
35 #include "ext/standard/php_smart_string.h"
36 
37 /** Module init function. */
38 PHP_MINIT_FUNCTION(igbinary);
39 
40 /** Module shutdown function. */
41 PHP_MSHUTDOWN_FUNCTION(igbinary);
42 
43 /** Request init function. */
44 PHP_RINIT_FUNCTION(igbinary);
45 
46 /** Request shutdown function. */
47 PHP_RSHUTDOWN_FUNCTION(igbinary);
48 
49 /** Module info function for phpinfo(). */
50 PHP_MINFO_FUNCTION(igbinary);
51 
52 /** string igbinary_serialize(mixed value).
53  * Returns the binary serialized value.
54  */
55 PHP_FUNCTION(igbinary_serialize);
56 
57 /** mixed igbinary_unserialize(string data).
58  * Unserializes the given inputstring (value).
59  */
60 PHP_FUNCTION(igbinary_unserialize);
61 
62 #ifdef ZTS
63 #define IGBINARY_G(v) TSRMG(igbinary_globals_id, zend_igbinary_globals *, v)
64 #else
65 #define IGBINARY_G(v) (igbinary_globals.v)
66 #endif
67 
68 #endif /* PHP_IGBINARY_H */
69 
70 /*
71  * Local variables:
72  * tab-width: 2
73  * c-basic-offset: 0
74  * End:
75  * vim600: noet sw=2 ts=2 fdm=marker
76  * vim<600: noet sw=2 ts=2
77  */
78