26 #include <ext/standard/info.h>
27 #include <Zend/zend_extensions.h>
36 extern zend_module_entry groonga_module_entry;
37 #define phpext_groonga_ptr &groonga_module_entry
40 #define PHP_GROONGA_API __declspec(dllexport)
42 #define PHP_GROONGA_API
45 PHP_MINIT_FUNCTION(groonga);
46 PHP_MSHUTDOWN_FUNCTION(groonga);
47 PHP_RINIT_FUNCTION(groonga);
48 PHP_RSHUTDOWN_FUNCTION(groonga);
49 PHP_MINFO_FUNCTION(groonga);
55 #define FREE_RESOURCE(resource) zend_list_delete(Z_LVAL_P(resource))
57 #define PROP_GET_LONG(name) Z_LVAL_P(zend_read_property(_this_ce, _this_zval, #name, strlen(#name), 1 TSRMLS_CC))
58 #define PROP_SET_LONG(name, l) zend_update_property_long(_this_ce, _this_zval, #name, strlen(#name), l TSRMLS_CC)
60 #define PROP_GET_DOUBLE(name) Z_DVAL_P(zend_read_property(_this_ce, _this_zval, #name, strlen(#name), 1 TSRMLS_CC))
61 #define PROP_SET_DOUBLE(name, d) zend_update_property_double(_this_ce, _this_zval, #name, strlen(#name), d TSRMLS_CC)
63 #define PROP_GET_STRING(name) Z_STRVAL_P(zend_read_property(_this_ce, _this_zval, #name, strlen(#name), 1 TSRMLS_CC))
64 #define PROP_GET_STRLEN(name) Z_STRLEN_P(zend_read_property(_this_ce, _this_zval, #name, strlen(#name), 1 TSRMLS_CC))
65 #define PROP_SET_STRING(name, s) zend_update_property_string(_this_ce, _this_zval, #name, strlen(#name), s TSRMLS_CC)
66 #define PROP_SET_STRINGL(name, s, l) zend_update_property_stringl(_this_ce, _this_zval, #name, strlen(#name), s, l TSRMLS_CC)
70 #if (PHP_MAJOR_VERSION >= 5)
71 ZEND_BEGIN_ARG_INFO_EX(grn_ctx_init_arg_info, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 1)
72 ZEND_ARG_INFO(0, flags)
75 #define grn_ctx_init_arg_info NULL
79 #if (PHP_MAJOR_VERSION >= 5)
80 ZEND_BEGIN_ARG_INFO_EX(grn_ctx_close_arg_info, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 1)
84 #define grn_ctx_close_arg_info NULL
88 #if (PHP_MAJOR_VERSION >= 5)
89 ZEND_BEGIN_ARG_INFO_EX(grn_ctx_connect_arg_info, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 4)
91 ZEND_ARG_INFO(0, host)
92 ZEND_ARG_INFO(0, port)
93 ZEND_ARG_INFO(0, flags)
96 #define grn_ctx_connect_arg_info NULL
100 #if (PHP_MAJOR_VERSION >= 5)
101 ZEND_BEGIN_ARG_INFO_EX(grn_ctx_send_arg_info, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 3)
102 ZEND_ARG_INFO(0, res)
103 ZEND_ARG_INFO(0, query)
104 ZEND_ARG_INFO(0, flags)
107 #define grn_ctx_send_arg_info NULL
111 #if (PHP_MAJOR_VERSION >= 5)
112 ZEND_BEGIN_ARG_INFO_EX(grn_ctx_recv_arg_info, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 1)
113 ZEND_ARG_INFO(0, res)
116 #define grn_ctx_recv_arg_info NULL