Skip to content

Commit ec89c85

Browse files
committed
cleaning up the version macros
1 parent 88b2a2d commit ec89c85

File tree

23 files changed

+46
-26
lines changed

23 files changed

+46
-26
lines changed

ext/bcmath/bcmath.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ zend_module_entry bcmath_module_entry = {
118118
NULL,
119119
NULL,
120120
PHP_MINFO(bcmath),
121-
NO_VERSION_YET,
121+
PHP_BCMATH_VERSION,
122122
PHP_MODULE_GLOBALS(bcmath),
123123
PHP_GINIT(bcmath),
124124
PHP_GSHUTDOWN(bcmath),

ext/bcmath/php_bcmath.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
extern zend_module_entry bcmath_module_entry;
2727
#define phpext_bcmath_ptr &bcmath_module_entry
2828

29+
#include "php_version.h"
30+
#define PHP_BCMATH_VERSION PHP_VERSION
31+
2932
PHP_MINIT_FUNCTION(bcmath);
3033
PHP_MSHUTDOWN_FUNCTION(bcmath);
3134
PHP_MINFO_FUNCTION(bcmath);

ext/bz2/bz2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ zend_module_entry bz2_module_entry = {
120120
NULL,
121121
NULL,
122122
PHP_MINFO(bz2),
123-
NO_VERSION_YET,
123+
PHP_BZ2_VERSION,
124124
STANDARD_MODULE_PROPERTIES
125125
};
126126

ext/bz2/php_bz2.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ extern zend_module_entry bz2_module_entry;
4747
# define PHP_BZ2_API
4848
#endif
4949

50+
#include "php_version.h"
51+
#define PHP_BZ2_VERSION PHP_VERSION
52+
5053
PHP_BZ2_API php_stream *_php_stream_bz2open(php_stream_wrapper *wrapper, const char *path, const char *mode, int options, zend_string **opened_path, php_stream_context *context STREAMS_DC);
5154
PHP_BZ2_API php_stream *_php_stream_bz2open_from_BZFILE(BZFILE *bz, const char *mode, php_stream *innerstream STREAMS_DC);
5255

ext/calendar/calendar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ zend_module_entry calendar_module_entry = {
161161
NULL,
162162
NULL,
163163
PHP_MINFO(calendar),
164-
NO_VERSION_YET,
164+
PHP_CALENDAR_VERSION,
165165
STANDARD_MODULE_PROPERTIES,
166166
};
167167

ext/calendar/php_calendar.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
extern zend_module_entry calendar_module_entry;
55
#define calendar_module_ptr &calendar_module_entry
66

7+
#include "php_version.h"
8+
#define PHP_CALENDAR_VERSION PHP_VERSION
9+
710
/* Functions */
811

912
PHP_MINIT_FUNCTION(calendar);

ext/com_dotnet/com_extension.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ zend_module_entry com_dotnet_module_entry = {
244244
PHP_RINIT(com_dotnet),
245245
PHP_RSHUTDOWN(com_dotnet),
246246
PHP_MINFO(com_dotnet),
247-
"0.1",
247+
PHP_COM_DOTNET_VERSION,
248248
PHP_MODULE_GLOBALS(com_dotnet),
249249
PHP_GINIT(com_dotnet),
250250
NULL,

ext/com_dotnet/php_com_dotnet.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ extern zend_module_entry com_dotnet_module_entry;
3636
# define PHP_COM_DOTNET_API
3737
#endif
3838

39+
#include "php_version.h"
40+
#define PHP_COM_DOTNET_VERSION PHP_VERSION
41+
3942
PHP_MINIT_FUNCTION(com_dotnet);
4043
PHP_MSHUTDOWN_FUNCTION(com_dotnet);
4144
PHP_RINIT_FUNCTION(com_dotnet);

ext/ctype/ctype.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ zend_module_entry ctype_module_entry = {
121121
NULL,
122122
NULL,
123123
PHP_MINFO(ctype),
124-
NO_VERSION_YET,
124+
PHP_CTYPE_VERSION,
125125
STANDARD_MODULE_PROPERTIES
126126
};
127127
/* }}} */

ext/ctype/php_ctype.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
#ifndef PHP_CTYPE_H
2020
#define PHP_CTYPE_H
2121

22+
#include "php_version.h"
23+
#define PHP_CTYPE_VERSION PHP_VERSION
24+
2225
#if HAVE_CTYPE
2326

2427
extern zend_module_entry ctype_module_entry;

ext/curl/interface.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ zend_module_entry curl_module_entry = {
486486
NULL,
487487
NULL,
488488
PHP_MINFO(curl),
489-
NO_VERSION_YET,
489+
PHP_CURL_VERSION,
490490
STANDARD_MODULE_PROPERTIES
491491
};
492492
/* }}} */

ext/curl/php_curl.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
# define PHP_CURL_API
4343
#endif
4444

45+
#include "php_version.h"
46+
#define PHP_CURL_VERSION PHP_VERSION
47+
4548
#include <curl/curl.h>
4649
#include <curl/multi.h>
4750

ext/date/php_date.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ zend_module_entry date_module_entry = {
667667
PHP_RINIT(date), /* request startup */
668668
PHP_RSHUTDOWN(date), /* request shutdown */
669669
PHP_MINFO(date), /* extension info */
670-
PHP_VERSION, /* extension version */
670+
PHP_DATE_VERSION, /* extension version */
671671
PHP_MODULE_GLOBALS(date), /* globals descriptor */
672672
PHP_GINIT(date), /* globals ctor */
673673
NULL, /* globals dtor */

ext/date/php_date.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
#include "lib/timelib.h"
2525
#include "Zend/zend_hash.h"
2626

27+
#include "php_version.h"
28+
#define PHP_DATE_VERSION PHP_VERSION
29+
2730
extern zend_module_entry date_module_entry;
2831
#define phpext_date_ptr &date_module_entry
2932

ext/dba/dba.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ zend_module_entry dba_module_entry = {
178178
NULL,
179179
NULL,
180180
PHP_MINFO(dba),
181-
NO_VERSION_YET,
181+
PHP_DBA_VERSION,
182182
PHP_MODULE_GLOBALS(dba),
183183
PHP_GINIT(dba),
184184
NULL,

ext/dba/php_dba.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
#ifndef PHP_DBA_H
2222
#define PHP_DBA_H
2323

24+
#include "php_version.h"
25+
#define PHP_DBA_VERSION PHP_VERSION
26+
2427
#if HAVE_DBA
2528

2629
typedef enum {

ext/enchant/enchant.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,19 +151,15 @@ zend_function_entry enchant_functions[] = {
151151
/* {{{ enchant_module_entry
152152
*/
153153
zend_module_entry enchant_module_entry = {
154-
#if ZEND_MODULE_API_NO >= 20010901
155154
STANDARD_MODULE_HEADER,
156-
#endif
157155
"enchant",
158156
enchant_functions,
159157
PHP_MINIT(enchant),
160158
PHP_MSHUTDOWN(enchant),
161159
NULL, /* Replace with NULL if there's nothing to do at request start */
162160
NULL, /* Replace with NULL if there's nothing to do at request end */
163161
PHP_MINFO(enchant),
164-
#if ZEND_MODULE_API_NO >= 20010901
165162
PHP_ENCHANT_VERSION,
166-
#endif
167163
STANDARD_MODULE_PROPERTIES
168164
};
169165
/* }}} */

ext/exif/exif.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,13 @@ const zend_function_entry exif_functions[] = {
128128
};
129129
/* }}} */
130130

131-
#define EXIF_VERSION "1.4 $Id$"
132-
133131
/* {{{ PHP_MINFO_FUNCTION
134132
*/
135133
PHP_MINFO_FUNCTION(exif)
136134
{
137135
php_info_print_table_start();
138136
php_info_print_table_row(2, "EXIF Support", "enabled");
139-
php_info_print_table_row(2, "EXIF Version", EXIF_VERSION);
137+
php_info_print_table_row(2, "EXIF Version", PHP_EXIF_VERSION);
140138
php_info_print_table_row(2, "Supported EXIF Version", "0220");
141139
php_info_print_table_row(2, "Supported filetypes", "JPEG,TIFF");
142140
php_info_print_table_end();
@@ -265,18 +263,12 @@ zend_module_entry exif_module_entry = {
265263
PHP_MSHUTDOWN(exif),
266264
NULL, NULL,
267265
PHP_MINFO(exif),
268-
#if ZEND_MODULE_API_NO >= 20010901
269-
EXIF_VERSION,
270-
#endif
271-
#if ZEND_MODULE_API_NO >= 20060613
266+
PHP_EXIF_VERSION,
272267
PHP_MODULE_GLOBALS(exif),
273268
PHP_GINIT(exif),
274269
NULL,
275270
NULL,
276271
STANDARD_MODULE_PROPERTIES_EX
277-
#else
278-
STANDARD_MODULE_PROPERTIES
279-
#endif
280272
};
281273
/* }}} */
282274

ext/exif/php_exif.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
/* $Id$ */
2121

2222
#if HAVE_EXIF
23+
24+
#include "php_version.h"
25+
#define PHP_EXIF_VERSION "1.4 $Id: 8bdc0c8f27c2c9dd1f7551f1f9fe3ab57a06a4b1 $"
26+
2327
extern zend_module_entry exif_module_entry;
2428
#define phpext_exif_ptr &exif_module_entry
2529

ext/filter/filter.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,17 +137,15 @@ static const zend_function_entry filter_functions[] = {
137137
/* {{{ filter_module_entry
138138
*/
139139
zend_module_entry filter_module_entry = {
140-
#if ZEND_MODULE_API_NO >= 20010901
141140
STANDARD_MODULE_HEADER,
142-
#endif
143141
"filter",
144142
filter_functions,
145143
PHP_MINIT(filter),
146144
PHP_MSHUTDOWN(filter),
147145
NULL,
148146
PHP_RSHUTDOWN(filter),
149147
PHP_MINFO(filter),
150-
"0.11.0",
148+
PHP_FILTER_VERSION,
151149
STANDARD_MODULE_PROPERTIES
152150
};
153151
/* }}} */

ext/filter/php_filter.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ extern zend_module_entry filter_module_entry;
3838
#include "TSRM.h"
3939
#endif
4040

41+
#include "php_version.h"
42+
#define PHP_FILTER_VERSION "0.11.0"
43+
4144
PHP_MINIT_FUNCTION(filter);
4245
PHP_MSHUTDOWN_FUNCTION(filter);
4346
PHP_RINIT_FUNCTION(filter);

ext/ftp/php_ftp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ zend_module_entry php_ftp_module_entry = {
292292
NULL,
293293
NULL,
294294
PHP_MINFO(ftp),
295-
NO_VERSION_YET,
295+
PHP_FTP_VERSION,
296296
STANDARD_MODULE_PROPERTIES
297297
};
298298

ext/ftp/php_ftp.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
extern zend_module_entry php_ftp_module_entry;
2828
#define php_ftp_module_ptr &php_ftp_module_entry
2929

30+
#include "php_version.h"
31+
#define PHP_FTP_VERSION PHP_VERSION
32+
3033
#define PHP_FTP_OPT_TIMEOUT_SEC 0
3134
#define PHP_FTP_OPT_AUTOSEEK 1
3235
#define PHP_FTP_AUTORESUME -1

0 commit comments

Comments
 (0)