summaryrefslogtreecommitdiffstats
path: root/rpminfo.c
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-01-26 11:35:29 +0100
committerRemi Collet <remi@remirepo.net>2018-01-26 11:35:29 +0100
commit3b842cb8e777be978fb72fbfac7a2e5f2855d19e (patch)
treeefe880afde094e6a99b7009aa86d421c4b36255a /rpminfo.c
parentc4521c64e148640fa9ad840e9ea3cb45293204dd (diff)
add RPMVERSION constant
Diffstat (limited to 'rpminfo.c')
-rw-r--r--rpminfo.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/rpminfo.c b/rpminfo.c
index 169ef96..fcc4041 100644
--- a/rpminfo.c
+++ b/rpminfo.c
@@ -163,7 +163,16 @@ PHP_FUNCTION(rpmvercmp)
}
/* }}} */
-/* Remove if there's nothing to do at request start */
+/* {{{ PHP_MINIT_FUNCTION
+ */
+PHP_MINIT_FUNCTION(rpminfo)
+{
+ REGISTER_STRING_CONSTANT("RPMVERSION", (char *)RPMVERSION, CONST_CS | CONST_PERSISTENT);
+
+ return SUCCESS;
+}
+/* }}} */
+
/* {{{ PHP_RINIT_FUNCTION
*/
PHP_RINIT_FUNCTION(rpminfo)
@@ -232,7 +241,7 @@ zend_module_entry rpminfo_module_entry = {
NULL,
"rpminfo",
rpminfo_functions,
- NULL,
+ PHP_MINIT(rpminfo),
NULL,
PHP_RINIT(rpminfo),
NULL,