From 3b842cb8e777be978fb72fbfac7a2e5f2855d19e Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 26 Jan 2018 11:35:29 +0100 Subject: add RPMVERSION constant --- rpminfo.c | 13 +++++++++++-- 1 file 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, -- cgit