diff --git a/donkeyid.c b/donkeyid.c index 64c6c15..0a2c56e 100644 --- a/donkeyid.c +++ b/donkeyid.c @@ -62,6 +62,9 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_donkeyid_parseId, 0, 0, 0) ZEND_ARG_INFO(0, id) ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_INFO_EX(arginfo_void, 0, 0, 0) +ZEND_END_ARG_INFO() + /* Remove the following function when you have successfully modified config.m4 so that your module can be compiled into PHP, it exists only for testing purposes. */ @@ -70,13 +73,13 @@ ZEND_END_ARG_INFO() * Every user visible function must have an entry in donkeyid_functions[]. */ const zend_function_entry donkeyid_methods[] = { - PHP_FE(dk_get_next_id, NULL) + PHP_FE(dk_get_next_id, arginfo_void) PHP_FE(dk_get_next_ids, arginfo_donkeyid_getIdByTime) PHP_FE(dk_parse_id, arginfo_donkeyid_parseId) - PHP_FE(dk_get_ts_id, NULL) + PHP_FE(dk_get_ts_id, arginfo_void) PHP_FE(dk_get_ts_ids, arginfo_donkeyid_getIdByTime) PHP_FE(dk_parse_ts_id, arginfo_donkeyid_parseId) - PHP_FE(dk_get_dt_id, NULL) + PHP_FE(dk_get_dt_id, arginfo_void) PHP_FE_END /* Must be the last line in donkeyid_functions[] */ }; /* }}} */ diff --git a/php_donkeyid.h b/php_donkeyid.h index bf8b84a..cb11623 100644 --- a/php_donkeyid.h +++ b/php_donkeyid.h @@ -24,7 +24,7 @@ extern zend_module_entry donkeyid_module_entry; #define phpext_donkeyid_ptr &donkeyid_module_entry -#define PHP_DONKEYID_VERSION "1.0.1" /* Replace with version number for your extension */ +#define PHP_DONKEYID_VERSION "1.1.1" /* Replace with version number for your extension */ #ifdef PHP_WIN32 # define PHP_DONKEYID_API __declspec(dllexport) diff --git a/php_wrapper.h b/php_wrapper.h index 7c6902f..ad43044 100644 --- a/php_wrapper.h +++ b/php_wrapper.h @@ -10,7 +10,6 @@ #if PHP_MAJOR_VERSION < 7 -#define dk_zend_read_property zend_read_property #define DK_RETURN_STRINGL RETURN_STRINGL typedef int zend_size_t; @@ -23,15 +22,20 @@ typedef int zend_size_t; #define dk_add_next_index_stringl(a,s,l,d) add_next_index_stringl(a,s,l) #define dk_add_assoc_stringl_ex(a,ks,kl,s,l,d) add_assoc_stringl_ex(a,ks,kl,s,l) -static inline zval* dk_zend_read_property(zend_class_entry *scope, zval *object, const char *name, size_t name_length, zend_bool silent){ - zval rv; - return zend_read_property(scope,object,name,name_length,silent,&rv); -} typedef size_t zend_size_t; #endif +#if PHP_VERSION_ID >= 80000 +#define TSRMLS_C +#define TSRMLS_CC +#define TSRMLS_D +#define TSRMLS_DC +#define TSRMLS_FETCH_FROM_CTX(ctx) +#define TSRMLS_SET_CTX(ctx) +#endif + #endif //DONKEYID_PHP_WRAPPER_H