diff options
author | Remi Collet <remi@remirepo.net> | 2018-01-26 08:54:33 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2018-01-26 08:54:33 +0100 |
commit | 1302bb81b72570ed8896846d3041ab8829dc9036 (patch) | |
tree | b66a3e2db76f0f044412a2ba48e78f87ed728435 | |
parent | 0c80cee00d760828e47a2bc57eb15b5b792b737c (diff) |
clean up + release 0.1.0v0.1.0
-rw-r--r-- | php_rpminfo.h | 2 | ||||
-rw-r--r-- | rpminfo.c | 75 |
2 files changed, 5 insertions, 72 deletions
diff --git a/php_rpminfo.h b/php_rpminfo.h index d90e9e1..370fdd5 100644 --- a/php_rpminfo.h +++ b/php_rpminfo.h @@ -22,7 +22,7 @@ extern zend_module_entry rpminfo_module_entry; #define phpext_rpminfo_ptr &rpminfo_module_entry -#define PHP_RPMINFO_VERSION "0.1.0-dev" /* Replace with version number for your extension */ +#define PHP_RPMINFO_VERSION "0.1.0" #ifdef PHP_WIN32 # define PHP_RPMINFO_API __declspec(dllexport) @@ -32,19 +32,6 @@ ZEND_DECLARE_MODULE_GLOBALS(rpminfo) -/* True global resources - no need for thread safety here */ -// static int le_rpminfo; - -/* {{{ PHP_INI - */ -/* Remove comments and fill if you need to have entries in php.ini -PHP_INI_BEGIN() - STD_PHP_INI_ENTRY("rpminfo.global_value", "42", PHP_INI_ALL, OnUpdateLong, global_value, zend_rpminfo_globals, rpminfo_globals) - STD_PHP_INI_ENTRY("rpminfo.global_string", "foobar", PHP_INI_ALL, OnUpdateString, global_string, zend_rpminfo_globals, rpminfo_globals) -PHP_INI_END() -*/ -/* }}} */ - static rpmts rpminfo_getts(rpmVSFlags flags) { if (!RPMINFO_G(ts)) { RPMINFO_G(ts) = rpmtsCreate(); @@ -183,60 +170,6 @@ PHP_FUNCTION(rpmvercmp) } /* }}} */ -/* {{{ php_rpminfo_init_globals - */ -/* Uncomment this function if you have INI entries -static void php_rpminfo_init_globals(zend_rpminfo_globals *rpminfo_globals) -{ - rpminfo_globals->global_value = 0; - rpminfo_globals->global_string = NULL; -} -*/ -/* }}} */ - -/* {{{ PHP_MINIT_FUNCTION - */ -PHP_MINIT_FUNCTION(rpminfo) -{ - /* If you have INI entries, uncomment these lines - REGISTER_INI_ENTRIES(); - */ - return SUCCESS; -} -/* }}} */ - -/* {{{ PHP_MSHUTDOWN_FUNCTION - */ -PHP_MSHUTDOWN_FUNCTION(rpminfo) -{ - /* uncomment this line if you have INI entries - UNREGISTER_INI_ENTRIES(); - */ - return SUCCESS; -} -/* }}} */ - -/* Remove if there's nothing to do at request start */ -/* {{{ PHP_RINIT_FUNCTION - */ -PHP_RINIT_FUNCTION(rpminfo) -{ -#if defined(COMPILE_DL_RPMINFO) && defined(ZTS) - ZEND_TSRMLS_CACHE_UPDATE(); -#endif - return SUCCESS; -} -/* }}} */ - -/* Remove if there's nothing to do at request end */ -/* {{{ PHP_RSHUTDOWN_FUNCTION - */ -PHP_RSHUTDOWN_FUNCTION(rpminfo) -{ - return SUCCESS; -} -/* }}} */ - /* {{{ PHP_MINFO_FUNCTION */ PHP_MINFO_FUNCTION(rpminfo) @@ -292,10 +225,10 @@ zend_module_entry rpminfo_module_entry = { NULL, "rpminfo", rpminfo_functions, - PHP_MINIT(rpminfo), - PHP_MSHUTDOWN(rpminfo), - PHP_RINIT(rpminfo), /* Replace with NULL if there's nothing to do at request start */ - PHP_RSHUTDOWN(rpminfo), /* Replace with NULL if there's nothing to do at request end */ + NULL, + NULL, + NULL, + NULL, PHP_MINFO(rpminfo), PHP_RPMINFO_VERSION, PHP_MODULE_GLOBALS(rpminfo), |