From: Steph Fox Date: Sat, 22 Mar 2008 17:09:24 +0000 (+0000) Subject: Make versioning more standard X-Git-Tag: RELEASE_2_0_0a1~44 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c0619c65237e49c48157e6a11c3ea5b55d1e6b16;p=php Make versioning more standard --- diff --git a/ext/phar/phar.c b/ext/phar/phar.c index 732d935621..a34c642f3a 100644 --- a/ext/phar/phar.c +++ b/ext/phar/phar.c @@ -1119,7 +1119,7 @@ int phar_create_or_parse_filename(char *fname, int fname_len, char *alias, int a mydata->alias = alias ? estrndup(alias, alias_len) : estrndup(mydata->fname, fname_len); mydata->alias_len = alias ? alias_len : fname_len; } - snprintf(mydata->version, sizeof(mydata->version), "%s", PHAR_API_VERSION_STR); + snprintf(mydata->version, sizeof(mydata->version), "%s", PHP_PHAR_API_VERSION); mydata->is_temporary_alias = alias ? 0 : 1; mydata->internal_file_start = -1; mydata->fp = NULL; @@ -2831,8 +2831,8 @@ PHP_MINFO_FUNCTION(phar) /* {{{ */ { php_info_print_table_start(); php_info_print_table_header(2, "Phar: PHP Archive support", "enabled"); - php_info_print_table_row(2, "Phar EXT version", PHAR_EXT_VERSION_STR); - php_info_print_table_row(2, "Phar API version", PHAR_API_VERSION_STR); + php_info_print_table_row(2, "Phar EXT version", PHP_PHAR_VERSION); + php_info_print_table_row(2, "Phar API version", PHP_PHAR_API_VERSION); php_info_print_table_row(2, "CVS revision", "$Revision$"); php_info_print_table_row(2, "Phar-based phar archives", "enabled"); php_info_print_table_row(2, "Tar-based phar archives", "enabled"); @@ -2882,7 +2882,7 @@ zend_module_entry phar_module_entry = { NULL, PHP_RSHUTDOWN(phar), PHP_MINFO(phar), - PHAR_EXT_VERSION_STR, + PHP_PHAR_VERSION, STANDARD_MODULE_PROPERTIES }; /* }}} */ diff --git a/ext/phar/phar_internal.h b/ext/phar/phar_internal.h index 9efc8d6d1c..9d4900b2b7 100755 --- a/ext/phar/phar_internal.h +++ b/ext/phar/phar_internal.h @@ -75,8 +75,6 @@ #define E_RECOVERABLE_ERROR E_ERROR #endif -#define PHAR_EXT_VERSION_STR "2.0.0" -#define PHAR_API_VERSION_STR "1.1.1" /* x.y.z maps to 0xyz0 */ #define PHAR_API_VERSION 0x1110 /* if we bump PHAR_API_VERSION, change this from 0x1100 to PHAR_API_VERSION */ diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 1503d8a460..35bcd81375 100755 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -1012,7 +1012,7 @@ PHP_METHOD(Phar, loadPhar) * Returns the api version */ PHP_METHOD(Phar, apiVersion) { - RETURN_STRINGL(PHAR_API_VERSION_STR, sizeof(PHAR_API_VERSION_STR)-1, 1); + RETURN_STRINGL(PHP_PHAR_API_VERSION, sizeof(PHP_PHAR_API_VERSION)-1, 1); } /* }}}*/ diff --git a/ext/phar/php_phar.h b/ext/phar/php_phar.h index f99780fd8c..bea528c48f 100644 --- a/ext/phar/php_phar.h +++ b/ext/phar/php_phar.h @@ -22,6 +22,9 @@ #ifndef PHP_PHAR_H #define PHP_PHAR_H +#define PHP_PHAR_VERSION "2.0.0-dev" +#define PHP_PHAR_API_VERSION "1.1.1" + #include "ext/standard/basic_functions.h" extern zend_module_entry phar_module_entry; #define phpext_phar_ptr &phar_module_entry