Skip to content

Commit 2d78023

Browse files
committed
cleanup the mod version macros, round 2
1 parent ec89c85 commit 2d78023

33 files changed

+57
-34
lines changed

ext/gd/gd.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,7 @@ zend_module_entry gd_module_entry = {
10561056
NULL,
10571057
#endif
10581058
PHP_MINFO(gd),
1059-
NO_VERSION_YET,
1059+
PHP_GD_VERSION,
10601060
STANDARD_MODULE_PROPERTIES
10611061
};
10621062

ext/gd/php_gd.h

+3
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ PHPAPI extern const char php_sig_png[8];
6464
extern zend_module_entry gd_module_entry;
6565
#define phpext_gd_ptr &gd_module_entry
6666

67+
#include "php_version.h"
68+
#define PHP_GD_VERSION PHP_VERSION
69+
6770
/* gd.c functions */
6871
PHP_MINFO_FUNCTION(gd);
6972
PHP_MINIT_FUNCTION(gd);

ext/gettext/gettext.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ zend_module_entry php_gettext_module_entry = {
127127
NULL,
128128
NULL,
129129
PHP_MINFO(php_gettext),
130-
NO_VERSION_YET,
130+
PHP_GETTEXT_VERSION,
131131
STANDARD_MODULE_PROPERTIES
132132
};
133133

ext/gettext/php_gettext.h

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
extern zend_module_entry php_gettext_module_entry;
2727
#define gettext_module_ptr &php_gettext_module_entry
2828

29+
#include "php_version.h"
30+
#define PHP_GETTEXT_VERSION PHP_VERSION
31+
2932
PHP_MINFO_FUNCTION(php_gettext);
3033

3134
PHP_NAMED_FUNCTION(zif_textdomain);

ext/gmp/gmp.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ zend_module_entry gmp_module_entry = {
204204
NULL,
205205
ZEND_MODULE_DEACTIVATE_N(gmp),
206206
ZEND_MODULE_INFO_N(gmp),
207-
NO_VERSION_YET,
207+
PHP_GMP_VERSION,
208208
ZEND_MODULE_GLOBALS(gmp),
209209
ZEND_GINIT(gmp),
210210
NULL,

ext/gmp/php_gmp.h

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
extern zend_module_entry gmp_module_entry;
2727
#define phpext_gmp_ptr &gmp_module_entry
2828

29+
#include "php_version.h"
30+
#define PHP_GMP_VERSION PHP_VERSION
31+
2932
ZEND_MODULE_STARTUP_D(gmp);
3033
ZEND_MODULE_DEACTIVATE_D(gmp);
3134
ZEND_MODULE_INFO_D(gmp);

ext/hash/hash.c

+2-6
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ zend_module_entry mhash_module_entry = {
814814
NULL,
815815
NULL,
816816
PHP_MINFO(mhash),
817-
NO_VERSION_YET,
817+
PHP_MHASH_VERSION,
818818
STANDARD_MODULE_PROPERTIES,
819819
};
820820

@@ -1271,19 +1271,15 @@ const zend_function_entry hash_functions[] = {
12711271
/* {{{ hash_module_entry
12721272
*/
12731273
zend_module_entry hash_module_entry = {
1274-
#if ZEND_MODULE_API_NO >= 20010901
12751274
STANDARD_MODULE_HEADER,
1276-
#endif
12771275
PHP_HASH_EXTNAME,
12781276
hash_functions,
12791277
PHP_MINIT(hash),
12801278
PHP_MSHUTDOWN(hash),
12811279
NULL, /* RINIT */
12821280
NULL, /* RSHUTDOWN */
12831281
PHP_MINFO(hash),
1284-
#if ZEND_MODULE_API_NO >= 20010901
1285-
PHP_HASH_EXTVER, /* Replace with version number for your extension */
1286-
#endif
1282+
PHP_HASH_VERSION,
12871283
STANDARD_MODULE_PROPERTIES
12881284
};
12891285
/* }}} */

ext/hash/php_hash.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
#include "php.h"
2525

2626
#define PHP_HASH_EXTNAME "hash"
27-
#define PHP_HASH_EXTVER "1.0"
27+
#define PHP_HASH_VERSION "1.0"
28+
#define PHP_MHASH_VERSION "1.0"
2829
#define PHP_HASH_RESNAME "Hash Context"
2930

3031
#define PHP_HASH_HMAC 0x0001

ext/iconv/iconv.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ zend_module_entry iconv_module_entry = {
154154
NULL,
155155
NULL,
156156
PHP_MINFO(miconv),
157-
NO_VERSION_YET,
157+
PHP_ICONV_VERSION,
158158
PHP_MODULE_GLOBALS(iconv),
159159
PHP_GINIT(iconv),
160160
NULL,

ext/iconv/php_iconv.h

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
# define PHP_ICONV_API
3535
#endif
3636

37+
#include "php_version.h"
38+
#define PHP_ICONV_VERSION PHP_VERSION
39+
3740
#ifdef PHP_ATOM_INC
3841
#include "ext/iconv/php_have_iconv.h"
3942
#include "ext/iconv/php_have_libiconv.h"

ext/imap/php_imap.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ zend_module_entry imap_module_entry = {
574574
PHP_RINIT(imap),
575575
PHP_RSHUTDOWN(imap),
576576
PHP_MINFO(imap),
577-
NO_VERSION_YET,
577+
PHP_IMAP_VERSION,
578578
PHP_MODULE_GLOBALS(imap),
579579
PHP_GINIT(imap),
580580
NULL,

ext/imap/php_imap.h

+2
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
extern zend_module_entry imap_module_entry;
4747
#define imap_module_ptr &imap_module_entry
4848

49+
#include "php_version.h"
50+
#define PHP_IMAP_VERSION PHP_VERSION
4951

5052
/* Data types */
5153

ext/interbase/interbase.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ zend_module_entry ibase_module_entry = {
451451
NULL,
452452
PHP_RSHUTDOWN(ibase),
453453
PHP_MINFO(ibase),
454-
NO_VERSION_YET,
454+
PHP_INTERBASE_VERSION,
455455
PHP_MODULE_GLOBALS(ibase),
456456
PHP_GINIT(ibase),
457457
NULL,

ext/interbase/php_interbase.h

+3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
extern zend_module_entry ibase_module_entry;
2525
#define phpext_interbase_ptr &ibase_module_entry
2626

27+
#include "php_version.h"
28+
#define PHP_INTERBASE_VERSION PHP_VERSION
29+
2730
PHP_MINIT_FUNCTION(ibase);
2831
PHP_RINIT_FUNCTION(ibase);
2932
PHP_MSHUTDOWN_FUNCTION(ibase);

ext/intl/php_intl.c

-2
Original file line numberDiff line numberDiff line change
@@ -874,9 +874,7 @@ static PHP_GINIT_FUNCTION(intl);
874874

875875
/* {{{ intl_module_entry */
876876
zend_module_entry intl_module_entry = {
877-
#if ZEND_MODULE_API_NO >= 20010901
878877
STANDARD_MODULE_HEADER,
879-
#endif
880878
"intl",
881879
intl_functions,
882880
PHP_MINIT( intl ),

ext/ldap/ldap.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -3289,7 +3289,7 @@ zend_module_entry ldap_module_entry = { /* {{{ */
32893289
NULL,
32903290
NULL,
32913291
PHP_MINFO(ldap),
3292-
NO_VERSION_YET,
3292+
PHP_LDAP_VERSION,
32933293
PHP_MODULE_GLOBALS(ldap),
32943294
PHP_GINIT(ldap),
32953295
NULL,

ext/ldap/php_ldap.h

+3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
extern zend_module_entry ldap_module_entry;
3333
#define ldap_module_ptr &ldap_module_entry
3434

35+
#include "php_version.h"
36+
#define PHP_LDAP_VERSION PHP_VERSION
37+
3538
/* LDAP functions */
3639
PHP_MINIT_FUNCTION(ldap);
3740
PHP_MSHUTDOWN_FUNCTION(ldap);

ext/libxml/libxml.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ zend_module_entry libxml_module_entry = {
144144
PHP_RINIT(libxml), /* per-request startup function */
145145
PHP_RSHUTDOWN(libxml), /* per-request shutdown function */
146146
PHP_MINFO(libxml), /* information function */
147-
NO_VERSION_YET,
147+
PHP_LIBXML_VERSION,
148148
PHP_MODULE_GLOBALS(libxml), /* globals descriptor */
149149
PHP_GINIT(libxml), /* globals ctor */
150150
NULL, /* globals dtor */

ext/libxml/php_libxml.h

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
extern zend_module_entry libxml_module_entry;
2727
#define libxml_module_ptr &libxml_module_entry
2828

29+
#include "php_version.h"
30+
#define PHP_LIBXML_VERSION PHP_VERSION
31+
2932
#ifdef PHP_WIN32
3033
# define PHP_LIBXML_API __declspec(dllexport)
3134
#elif defined(__GNUC__) && __GNUC__ >= 4

ext/mbstring/mbstring.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ zend_module_entry mbstring_module_entry = {
572572
PHP_RINIT(mbstring),
573573
PHP_RSHUTDOWN(mbstring),
574574
PHP_MINFO(mbstring),
575-
NO_VERSION_YET,
575+
PHP_MBSTRING_VERSION,
576576
PHP_MODULE_GLOBALS(mbstring),
577577
PHP_GINIT(mbstring),
578578
PHP_GSHUTDOWN(mbstring),

ext/mbstring/mbstring.h

+3
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@
5151
#define HAVE_MBSTRING 1
5252
#endif
5353

54+
#include "php_version.h"
55+
#define PHP_MBSTRING_VERSION PHP_VERSION
56+
5457
#ifdef PHP_WIN32
5558
# undef MBSTRING_API
5659
# ifdef MBSTRING_EXPORTS

ext/mcrypt/mcrypt.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ zend_module_entry mcrypt_module_entry = {
261261
PHP_MINIT(mcrypt), PHP_MSHUTDOWN(mcrypt),
262262
NULL, NULL,
263263
PHP_MINFO(mcrypt),
264-
NO_VERSION_YET,
264+
PHP_MCRYPT_VERSION,
265265
PHP_MODULE_GLOBALS(mcrypt),
266266
NULL,
267267
NULL,

ext/mcrypt/php_mcrypt.h

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
extern zend_module_entry mcrypt_module_entry;
3131
#define mcrypt_module_ptr &mcrypt_module_entry
3232

33+
#include "php_version.h"
34+
#define PHP_MCRYPT_VERSION PHP_VERSION
35+
3336
/* Functions for both old and new API */
3437
PHP_FUNCTION(mcrypt_ecb);
3538
PHP_FUNCTION(mcrypt_cbc);

ext/mysqli/mysqli.c

+1-5
Original file line numberDiff line numberDiff line change
@@ -1008,20 +1008,16 @@ static const zend_module_dep mysqli_deps[] = {
10081008
/* {{{ mysqli_module_entry
10091009
*/
10101010
zend_module_entry mysqli_module_entry = {
1011-
#if ZEND_MODULE_API_NO >= 20050922
10121011
STANDARD_MODULE_HEADER_EX, NULL,
10131012
mysqli_deps,
1014-
#elif ZEND_MODULE_API_NO >= 20010901
1015-
STANDARD_MODULE_HEADER,
1016-
#endif
10171013
"mysqli",
10181014
mysqli_functions,
10191015
PHP_MINIT(mysqli),
10201016
PHP_MSHUTDOWN(mysqli),
10211017
PHP_RINIT(mysqli),
10221018
PHP_RSHUTDOWN(mysqli),
10231019
PHP_MINFO(mysqli),
1024-
"0.1", /* Replace with version number for your extension */
1020+
PHP_MYSQLI_VERSION,
10251021
PHP_MODULE_GLOBALS(mysqli),
10261022
PHP_GINIT(mysqli),
10271023
NULL,

ext/mysqli/php_mysqli.h

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
#define phpext_mysqli_ptr &mysqli_module_entry
2727
extern zend_module_entry mysqli_module_entry;
2828

29+
#include "php_version.h"
30+
#define PHP_MYSQLI_VERSION PHP_VERSION
31+
2932
#endif /* PHP_MYSQLI.H */
3033

3134
/*

ext/mysqlnd/mysqlnd.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2053,7 +2053,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, info)(const MYSQLND_CONN_DATA * const conn)
20532053
/* {{{ mysqlnd_get_client_info */
20542054
PHPAPI const char * mysqlnd_get_client_info()
20552055
{
2056-
return MYSQLND_VERSION;
2056+
return PHP_MYSQLND_VERSION;
20572057
}
20582058
/* }}} */
20592059

ext/mysqlnd/mysqlnd.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#ifndef MYSQLND_H
2323
#define MYSQLND_H
2424

25-
#define MYSQLND_VERSION "mysqlnd 5.0.11-dev - 20120503 - $Id$"
25+
#define PHP_MYSQLND_VERSION "mysqlnd 5.0.11-dev - 20120503 - $Id$"
2626
#define MYSQLND_VERSION_ID 50011
2727

2828
#define MYSQLND_PLUGIN_API_VERSION 2

ext/mysqlnd/mysqlnd_auth.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ static struct st_mysqlnd_authentication_plugin mysqlnd_native_auth_plugin =
394394
MYSQLND_PLUGIN_API_VERSION,
395395
"auth_plugin_mysql_native_password",
396396
MYSQLND_VERSION_ID,
397-
MYSQLND_VERSION,
397+
PHP_MYSQLND_VERSION,
398398
"PHP License 3.01",
399399
"Andrey Hristov <[email protected]>, Ulf Wendel <[email protected]>, Georg Richter <[email protected]>",
400400
{
@@ -443,7 +443,7 @@ static struct st_mysqlnd_authentication_plugin mysqlnd_pam_authentication_plugin
443443
MYSQLND_PLUGIN_API_VERSION,
444444
"auth_plugin_mysql_clear_password",
445445
MYSQLND_VERSION_ID,
446-
MYSQLND_VERSION,
446+
PHP_MYSQLND_VERSION,
447447
"PHP License 3.01",
448448
"Andrey Hristov <[email protected]>, Ulf Wendel <[email protected]>, Georg Richter <[email protected]>",
449449
{
@@ -627,7 +627,7 @@ static struct st_mysqlnd_authentication_plugin mysqlnd_sha256_authentication_plu
627627
MYSQLND_PLUGIN_API_VERSION,
628628
"auth_plugin_sha256_password",
629629
MYSQLND_VERSION_ID,
630-
MYSQLND_VERSION,
630+
PHP_MYSQLND_VERSION,
631631
"PHP License 3.01",
632632
"Andrey Hristov <[email protected]>, Ulf Wendel <[email protected]>",
633633
{

ext/mysqlnd/mysqlnd_charset.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ static struct st_mysqlnd_plugin_charsets mysqlnd_plugin_charsets_plugin =
865865
MYSQLND_PLUGIN_API_VERSION,
866866
"charsets",
867867
MYSQLND_VERSION_ID,
868-
MYSQLND_VERSION,
868+
PHP_MYSQLND_VERSION,
869869
"PHP License 3.01",
870870
"Andrey Hristov <[email protected]>, Ulf Wendel <[email protected]>, Georg Richter <[email protected]>",
871871
{

ext/mysqlnd/mysqlnd_debug.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ static struct st_mysqlnd_plugin_trace_log mysqlnd_plugin_trace_log_plugin =
759759
MYSQLND_PLUGIN_API_VERSION,
760760
"debug_trace",
761761
MYSQLND_VERSION_ID,
762-
MYSQLND_VERSION,
762+
PHP_MYSQLND_VERSION,
763763
"PHP License 3.01",
764764
"Andrey Hristov <[email protected]>, Ulf Wendel <[email protected]>, Georg Richter <[email protected]>",
765765
{

ext/mysqlnd/mysqlnd_driver.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ static struct st_mysqlnd_plugin_core mysqlnd_plugin_core =
3838
MYSQLND_PLUGIN_API_VERSION,
3939
"mysqlnd",
4040
MYSQLND_VERSION_ID,
41-
MYSQLND_VERSION,
41+
PHP_MYSQLND_VERSION,
4242
"PHP License 3.01",
4343
"Andrey Hristov <[email protected]>, Ulf Wendel <[email protected]>, Georg Richter <[email protected]>",
4444
{

ext/mysqlnd/mysqlnd_libmysql_compat.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#define my_ulonglong uint64_t
3535

3636
#define MYSQL_VERSION_ID MYSQLND_VERSION_ID
37-
#define MYSQL_SERVER_VERSION MYSQLND_VERSION
37+
#define MYSQL_SERVER_VERSION PHP_MYSQLND_VERSION
3838
#define MYSQL_ERRMSG_SIZE MYSQLND_ERRMSG_SIZE
3939
#define SQLSTATE_LENGTH MYSQLND_SQLSTATE_LENGTH
4040

ext/mysqlnd/php_mysqlnd.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ zend_module_entry mysqlnd_module_entry = {
349349
NULL,
350350
#endif
351351
PHP_MINFO(mysqlnd),
352-
MYSQLND_VERSION,
352+
PHP_MYSQLND_VERSION,
353353
PHP_MODULE_GLOBALS(mysqlnd),
354354
PHP_GINIT(mysqlnd),
355355
NULL,

0 commit comments

Comments
 (0)