Skip to content

Commit 96460a4

Browse files
committed
start peeling back the amount of PHP 5 shim code
1 parent e954c15 commit 96460a4

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

ibm_db2.c

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,6 @@
3737

3838
ZEND_DECLARE_MODULE_GLOBALS(ibm_db2)
3939

40-
41-
#define ZEND_RESOURCE zend_resource
42-
43-
#if ZEND_MODULE_API_NO > 20020429
44-
#define ONUPDATEFUNCTION OnUpdateLong
45-
#else
46-
#define ONUPDATEFUNCTION OnUpdateInt
47-
#endif
48-
4940
#define ZEND_Z_STRVAL_PP(data) Z_STRVAL_P(*data)
5041

5142
#define ZEND_RETVAL_STRINGL(str, len, dup) RETVAL_STRINGL(str, len)
@@ -682,7 +673,7 @@ ZEND_GET_MODULE(ibm_db2)
682673
/* {{{ PHP_INI
683674
*/
684675
PHP_INI_BEGIN()
685-
STD_PHP_INI_ENTRY("ibm_db2.binmode", "1", PHP_INI_ALL, ONUPDATEFUNCTION,
676+
STD_PHP_INI_ENTRY("ibm_db2.binmode", "1", PHP_INI_ALL, OnUpdateLong,
686677
bin_mode, zend_ibm_db2_globals, ibm_db2_globals)
687678
/* orig - IBM i legacy CRTLIB containers fail under commit control (isolation *NONE) */
688679
STD_PHP_INI_BOOLEAN("ibm_db2.i5_allow_commit", "0", PHP_INI_SYSTEM, OnUpdateLong,
@@ -959,7 +950,7 @@ static void _php_db2_i5_test_helper() {
959950
#endif /* PASE */
960951

961952
/* {{{ static void _php_db2_free_conn_struct */
962-
static void _php_db2_free_conn_struct(ZEND_RESOURCE *rsrc)
953+
static void _php_db2_free_conn_struct(zend_resource *rsrc)
963954
{
964955
int rc;
965956

@@ -988,7 +979,7 @@ static void _php_db2_free_conn_struct(ZEND_RESOURCE *rsrc)
988979
/* }}} */
989980

990981
/* {{{ static void _php_db2_free_pconn_struct */
991-
static void _php_db2_free_pconn_struct(ZEND_RESOURCE *rsrc)
982+
static void _php_db2_free_pconn_struct(zend_resource *rsrc)
992983
{
993984
_php_db2_free_conn_struct(rsrc);
994985
}
@@ -1132,7 +1123,7 @@ static int _php_db2_decr_stmt_struct(stmt_handle *handle)
11321123
#endif /* PASE */
11331124

11341125
/* {{{ static _php_db2_free_stmt_struct */
1135-
static void _php_db2_free_stmt_struct(ZEND_RESOURCE *rsrc)
1126+
static void _php_db2_free_stmt_struct(zend_resource *rsrc)
11361127
{
11371128
int rc;
11381129

@@ -1282,7 +1273,7 @@ PHP_MSHUTDOWN_FUNCTION(ibm_db2)
12821273

12831274
/* {{{ _php_ibm_db2_conn
12841275
*/
1285-
static int _php_ibm_db2_conn (ZEND_RESOURCE *le)
1276+
static int _php_ibm_db2_conn (zend_resource *le)
12861277
{
12871278
conn_handle *conn_res;
12881279
int rc = 0;
@@ -2792,7 +2783,7 @@ static int _php_db2_connect_helper( INTERNAL_FUNCTION_PARAMETERS, conn_handle **
27922783
do {
27932784
/* Check if we already have a connection for this userID & database combination */
27942785
if (isPersistent) {
2795-
ZEND_RESOURCE *entry;
2786+
zend_resource *entry;
27962787
hKeyLen = strlen(database) + strlen(uid) + 8;
27972788
hKey = (char *) ecalloc(1, hKeyLen);
27982789

0 commit comments

Comments
 (0)