Browse files

Organizing the Pecl version into just one variable

  • Loading branch information...
1 parent 128bb30 commit 8759c854e185f5daabcfbb64a88a4b3e4d4bf478 @ecaron committed Sep 26, 2012
Showing with 4 additions and 74 deletions.
  1. +1 −1 TECH_NOTES
  2. +0 −1 package.xml
  3. +0 −67 php_solr_version.h
  4. +3 −1 solr_constants.h
  5. +0 −4 solr_functions_helpers.c
View
2 TECH_NOTES
@@ -59,7 +59,7 @@ zend_hash_init() is setting up the HashTable pointer to use.
==================================================================
Release Checklist
==================================================================
-0. Make sure version information is updated in php_solr_version.h and package.xml
+0. Make sure version information is updated in solr_constants.h and package.xml
1. Checkout release candidate source code from SVN, then compile and install.
svn co http://svn.php.net/repository/pecl/solr/trunk pecl-solr
View
1 package.xml
@@ -70,7 +70,6 @@
<file role="src" name="solr.dsp"/>
<file role="src" name="php_solr.h"/>
<file role="src" name="php_solr_api.h"/>
- <file role="src" name="php_solr_version.h"/>
<file role="src" name="php_solr_bc_macros.h"/>
<file role="src" name="solr_constants.h"/>
<file role="src" name="solr_macros.h"/>
View
67 php_solr_version.h
@@ -1,67 +0,0 @@
-/*
- +----------------------------------------------------------------------+
- | PHP Version 5 |
- +----------------------------------------------------------------------+
- | Copyright (c) 1997-2009 The PHP Group |
- +----------------------------------------------------------------------+
- | This source file is subject to version 3.01 of the PHP license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.php.net/license/3_01.txt |
- | If you did not receive a copy of the PHP license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@php.net so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Author: Israel Ekpo <iekpo@php.net> |
- +----------------------------------------------------------------------+
-*/
-
-/* $Id: php_solr_version.h 311799 2011-06-04 08:05:00Z iekpo $ */
-
-#include "php_version.h"
-
-#ifndef PHP_SOLR_VERSION_H
-#define PHP_SOLR_VERSION_H
-
-#define PHP_SOLR_MAJOR_VERSION 1
-#define PHP_SOLR_MINOR_VERSION 0
-#define PHP_SOLR_PATCH_VERSION 1
-
-#define PHP_SOLR_RELEASE_VERSION PHP_SOLR_PATCH_VERSION
-
-#define PHP_SOLR_DOTTED_VERSION "1.0.1"
-
-/**
- * Extension version numbers using hexadecimal numbers
- *
- * This is the numeric version of the extension, meant for easier
- * parsing and comparisons by programs. The PHP_SOLR_VERSION_ID define will
- * always follow this syntax:
- *
- * 0xXXYYZZ
- *
- * Where XX, YY and ZZ are the main version, minor version and patch numbers in
- * hexadecimal (using 8 bits each). All three numbers are always represented
- * using two digits. 1.2 would appear as "0x010200" while version 9.11.7
- * appears as "0x090b07".
- *
- * This 6-digit (24 bits) hexadecimal number does not show pre-release number,
- * and it is always a greater number in a more recent release. It makes
- * comparisons with greater than and less than work.
- */
-
-#define PHP_SOLR_VERSION_ID 0x010001
-
-#define SOLR_CLIENT_USER_AGENT "PHP Solr Client 1.0.1"
-
-#endif /* PHP_SOLR_VERSION_H */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * indent-tabs-mode: t
- * End:
- * vim600: fdm=marker
- * vim: noet sw=4 ts=4
- */
View
4 solr_constants.h
@@ -21,7 +21,9 @@
#ifndef SOLR_CONSTANTS_H
#define SOLR_CONSTANTS_H
-#include "php_solr_version.h"
+/* {{{ Current version of Solr extension */
+#define PHP_SOLR_DOTTED_VERSION "1.0.1"
+#define SOLR_CLIENT_USER_AGENT "PHP Solr Client " PHP_SOLR_DOTTED_VERSION
#define SOLR_SPACE_STRING " "
View
4 solr_functions_helpers.c
@@ -31,10 +31,6 @@
/* {{{ void solr_extension_register_constants(int type, int module_number TSRMLS_DC) */
PHP_SOLR_API void solr_extension_register_constants(int type, int module_number TSRMLS_DC)
{
- REGISTER_LONG_CONSTANT("SOLR_MAJOR_VERSION", PHP_SOLR_MAJOR_VERSION, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("SOLR_MINOR_VERSION", PHP_SOLR_MINOR_VERSION, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("SOLR_PATCH_VERSION", PHP_SOLR_PATCH_VERSION, CONST_CS | CONST_PERSISTENT);
-
REGISTER_STRING_CONSTANT("SOLR_EXTENSION_VERSION", PHP_SOLR_DOTTED_VERSION, CONST_CS | CONST_PERSISTENT);
}
/* }}} */

0 comments on commit 8759c85

Please sign in to comment.