1 
2 #ifndef PHP_PSR_H
3 #define PHP_PSR_H
4 
5 #include "php.h"
6 #include "php_ini.h"
7 #include "ext/standard/info.h"
8 
9 #ifdef ZTS
10 #include "TSRM.h"
11 #endif
12 
13 #ifdef PHP_WIN32
14 # ifdef PHP_PSR_EXPORTS
15 #  define PHP_PSR_API __declspec(dllexport)
16 # else
17 #  define PHP_PSR_API __declspec(dllimport)
18 # endif
19 #elif defined(__GNUC__) && __GNUC__ >= 4
20 # define PHP_PSR_API __attribute__ ((visibility("default")))
21 #else
22 # define PHP_PSR_API
23 #endif
24 
25 #define PHP_PSR_NAME "psr"
26 #define PHP_PSR_VERSION "1.1.0"
27 #define PHP_PSR_VERSION_ID 10100
28 #define PHP_PSR_RELEASE "2021-04-10"
29 #define PHP_PSR_AUTHORS "John Boehr <jbboehr@gmail.com> (lead)"
30 
31 #define PHP_PSR_ABSTRACT_ME(c, f) PHP_ABSTRACT_ME(c, f, arginfo_ ## c ## _ ## f)
32 #define PHP_PSR_ABSTRACT_ME_WITH_FLAGS(c, f, fl) ZEND_FENTRY(f, NULL, arginfo_ ## c ## _ ## f, fl)
33 #define PHP_PSR_BEGIN_ARG_INFO(c, f, n) ZEND_BEGIN_ARG_INFO_EX(arginfo_ ## c ## _ ## f, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, n)
34 #define PHP_PSR_END_ARG_INFO ZEND_END_ARG_INFO
35 #define REGISTER_PSR_CLASS_CONST_STRING(ce, const_name, value) \
36         zend_declare_class_constant_stringl(ce, const_name, sizeof(const_name)-1, value, sizeof(value)-1);
37 
38 #ifdef ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX
39 #define PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(c, f, n, cn, an) ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_ ## c ## _ ## f, ZEND_RETURN_VALUE, n, cn, an)
40 #define PHP_PSR_BEGIN_ARG_WITH_RETURN_TYPE_INFO(c, f, n, t, an) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ ## c ## _ ## f, ZEND_RETURN_VALUE, n, t, an)
41 #else
42 #define PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(c, f, n, cn, an) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ ## c ## _ ## f, ZEND_RETURN_VALUE, n, IS_OBJECT, #cn, an)
43 #define PHP_PSR_BEGIN_ARG_WITH_RETURN_TYPE_INFO(c, f, n, t, an) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ ## c ## _ ## f, ZEND_RETURN_VALUE, n, t, NULL, an)
44 #endif
45 
46 extern zend_module_entry psr_module_entry;
47 #define phpext_psr_ptr &psr_module_entry
48 
49 #endif /* PHP_PSR_H */
50 
51 /*
52  * Local variables:
53  * tab-width: 4
54  * c-basic-offset: 4
55  * End:
56  * vim600: fdm=marker
57  * vim: et sw=4 ts=4
58  */
59