@@ -42,9 +42,6 @@ res = (stmt_type) zend_fetch_resource(Z_RES_P(*stmt),resource_type_name,le_stmt)
42
42
if (res == NULL )\
43
43
RETURN_FALSE ;
44
44
45
- #define ZEND_REGISTER_RESOURCE_NEW (return_value , stmt_res , le_stmt_struct ) \
46
- RETURN_RES(zend_register_resource( stmt_res, le_stmt_struct))
47
-
48
45
#define ZEND_FETCH_RESOURCE_2 (rsrc , rsrc_type , passed_id , default_id , resource_type_name , resource_type1 , resource_type2 )\
49
46
rsrc = (rsrc_type) zend_fetch_resource2(Z_RES_P(*passed_id),resource_type_name,resource_type1,resource_type2); \
50
47
if(rsrc == NULL)\
@@ -3241,7 +3238,7 @@ PHP_FUNCTION(db2_connect)
3241
3238
return ;
3242
3239
}
3243
3240
else {
3244
- ZEND_REGISTER_RESOURCE_NEW ( return_value , conn_res , le_pconn_struct );
3241
+ RETURN_RES ( zend_register_resource ( conn_res , le_pconn_struct ) );
3245
3242
}
3246
3243
}
3247
3244
else {
@@ -3260,7 +3257,7 @@ PHP_FUNCTION(db2_connect)
3260
3257
RETVAL_FALSE ;
3261
3258
return ;
3262
3259
} else {
3263
- ZEND_REGISTER_RESOURCE_NEW ( return_value , conn_res , le_conn_struct );
3260
+ RETURN_RES ( zend_register_resource ( conn_res , le_conn_struct ) );
3264
3261
}
3265
3262
#ifdef PASE /* ini file switch all to pconnect */
3266
3263
}
@@ -3282,7 +3279,7 @@ PHP_FUNCTION(db2_pconnect)
3282
3279
return ;
3283
3280
}
3284
3281
else {
3285
- ZEND_REGISTER_RESOURCE_NEW ( return_value , conn_res , le_pconn_struct );
3282
+ RETURN_RES ( zend_register_resource ( conn_res , le_pconn_struct ) );
3286
3283
}
3287
3284
}
3288
3285
/* }}} */
@@ -3696,7 +3693,7 @@ PHP_FUNCTION(db2_column_privileges)
3696
3693
#ifdef PASE /* IBM i reuses handles. Connect close out of sync with le_stmt_struct dtor logic */
3697
3694
_php_db2_incr_stmt_struct (stmt_res );
3698
3695
#endif /* PASE */
3699
- ZEND_REGISTER_RESOURCE_NEW ( return_value , stmt_res , le_stmt_struct );
3696
+ RETURN_RES ( zend_register_resource ( stmt_res , le_stmt_struct ) );
3700
3697
} else {
3701
3698
RETURN_FALSE ;
3702
3699
}
@@ -3763,7 +3760,7 @@ PHP_FUNCTION(db2_columns)
3763
3760
#ifdef PASE /* IBM i reuses handles. Connect close out of sync with le_stmt_struct dtor logic */
3764
3761
_php_db2_incr_stmt_struct (stmt_res );
3765
3762
#endif /* PASE */
3766
- ZEND_REGISTER_RESOURCE_NEW ( return_value , stmt_res , le_stmt_struct );
3763
+ RETURN_RES ( zend_register_resource ( stmt_res , le_stmt_struct ) );
3767
3764
}
3768
3765
}
3769
3766
/* }}} */
@@ -3829,7 +3826,7 @@ PHP_FUNCTION(db2_foreign_keys)
3829
3826
#ifdef PASE /* IBM i reuses handles. Connect close out of sync with le_stmt_struct dtor logic */
3830
3827
_php_db2_incr_stmt_struct (stmt_res );
3831
3828
#endif /* PASE */
3832
- ZEND_REGISTER_RESOURCE_NEW ( return_value , stmt_res , le_stmt_struct );
3829
+ RETURN_RES ( zend_register_resource ( stmt_res , le_stmt_struct ) );
3833
3830
} else {
3834
3831
RETURN_FALSE ;
3835
3832
}
@@ -3893,7 +3890,7 @@ PHP_FUNCTION(db2_primary_keys)
3893
3890
#ifdef PASE /* IBM i reuses handles. Connect close out of sync with le_stmt_struct dtor logic */
3894
3891
_php_db2_incr_stmt_struct (stmt_res );
3895
3892
#endif /* PASE */
3896
- ZEND_REGISTER_RESOURCE_NEW ( return_value , stmt_res , le_stmt_struct );
3893
+ RETURN_RES ( zend_register_resource ( stmt_res , le_stmt_struct ) );
3897
3894
} else {
3898
3895
RETURN_FALSE ;
3899
3896
}
@@ -3959,7 +3956,7 @@ PHP_FUNCTION(db2_procedure_columns)
3959
3956
#ifdef PASE /* IBM i reuses handles. Connect close out of sync with le_stmt_struct dtor logic */
3960
3957
_php_db2_incr_stmt_struct (stmt_res );
3961
3958
#endif /* PASE */
3962
- ZEND_REGISTER_RESOURCE_NEW ( return_value , stmt_res , le_stmt_struct );
3959
+ RETURN_RES ( zend_register_resource ( stmt_res , le_stmt_struct ) );
3963
3960
} else {
3964
3961
RETURN_FALSE ;
3965
3962
}
@@ -4021,7 +4018,7 @@ PHP_FUNCTION(db2_procedures)
4021
4018
#ifdef PASE /* IBM i reuses handles. Connect close out of sync with le_stmt_struct dtor logic */
4022
4019
_php_db2_incr_stmt_struct (stmt_res );
4023
4020
#endif /* PASE */
4024
- ZEND_REGISTER_RESOURCE_NEW ( return_value , stmt_res , le_stmt_struct );
4021
+ RETURN_RES ( zend_register_resource ( stmt_res , le_stmt_struct ) );
4025
4022
} else {
4026
4023
RETURN_FALSE ;
4027
4024
}
@@ -4086,7 +4083,7 @@ PHP_FUNCTION(db2_special_columns)
4086
4083
#ifdef PASE /* IBM i reuses handles. Connect close out of sync with le_stmt_struct dtor logic */
4087
4084
_php_db2_incr_stmt_struct (stmt_res );
4088
4085
#endif /* PASE */
4089
- ZEND_REGISTER_RESOURCE_NEW ( return_value , stmt_res , le_stmt_struct );
4086
+ RETURN_RES ( zend_register_resource ( stmt_res , le_stmt_struct ) );
4090
4087
} else {
4091
4088
RETURN_FALSE ;
4092
4089
}
@@ -4154,7 +4151,7 @@ PHP_FUNCTION(db2_statistics)
4154
4151
#ifdef PASE /* IBM i reuses handles. Connect close out of sync with le_stmt_struct dtor logic */
4155
4152
_php_db2_incr_stmt_struct (stmt_res );
4156
4153
#endif /* PASE */
4157
- ZEND_REGISTER_RESOURCE_NEW ( return_value , stmt_res , le_stmt_struct );
4154
+ RETURN_RES ( zend_register_resource ( stmt_res , le_stmt_struct ) );
4158
4155
} else {
4159
4156
RETURN_FALSE ;
4160
4157
}
@@ -4222,7 +4219,7 @@ PHP_FUNCTION(db2_table_privileges)
4222
4219
#ifdef PASE /* IBM i reuses handles. Connect close out of sync with le_stmt_struct dtor logic */
4223
4220
_php_db2_incr_stmt_struct (stmt_res );
4224
4221
#endif /* PASE */
4225
- ZEND_REGISTER_RESOURCE_NEW ( return_value , stmt_res , le_stmt_struct );
4222
+ RETURN_RES ( zend_register_resource ( stmt_res , le_stmt_struct ) );
4226
4223
} else {
4227
4224
RETURN_FALSE ;
4228
4225
}
@@ -4293,7 +4290,7 @@ PHP_FUNCTION(db2_tables)
4293
4290
#ifdef PASE /* IBM i reuses handles. Connect close out of sync with le_stmt_struct dtor logic */
4294
4291
_php_db2_incr_stmt_struct (stmt_res );
4295
4292
#endif /* PASE */
4296
- ZEND_REGISTER_RESOURCE_NEW ( return_value , stmt_res , le_stmt_struct );
4293
+ RETURN_RES ( zend_register_resource ( stmt_res , le_stmt_struct ) );
4297
4294
} else {
4298
4295
RETURN_FALSE ;
4299
4296
}
@@ -4447,7 +4444,7 @@ PHP_FUNCTION(db2_exec)
4447
4444
#ifdef PASE /* IBM i reuses handles. Connect close out of sync with le_stmt_struct dtor logic */
4448
4445
_php_db2_incr_stmt_struct (stmt_res );
4449
4446
#endif /* PASE */
4450
- ZEND_REGISTER_RESOURCE_NEW ( return_value , stmt_res , le_stmt_struct );
4447
+ RETURN_RES ( zend_register_resource ( stmt_res , le_stmt_struct ) );
4451
4448
}
4452
4449
}
4453
4450
/* }}} */
@@ -4522,7 +4519,7 @@ PHP_FUNCTION(db2_prepare)
4522
4519
#ifdef PASE /* IBM i reuses handles. Connect close out of sync with le_stmt_struct dtor logic */
4523
4520
_php_db2_incr_stmt_struct (stmt_res );
4524
4521
#endif /* PASE */
4525
- ZEND_REGISTER_RESOURCE_NEW ( return_value , stmt_res , le_stmt_struct );
4522
+ RETURN_RES ( zend_register_resource ( stmt_res , le_stmt_struct ) );
4526
4523
}
4527
4524
}
4528
4525
/* }}} */
@@ -5547,7 +5544,7 @@ PHP_FUNCTION(db2_next_result)
5547
5544
#ifdef PASE /* IBM i reuses handles. Connect close out of sync with le_stmt_struct dtor logic */
5548
5545
_php_db2_incr_stmt_struct (stmt_res );
5549
5546
#endif /* PASE */
5550
- ZEND_REGISTER_RESOURCE_NEW ( return_value , new_stmt_res , le_stmt_struct );
5547
+ RETURN_RES ( zend_register_resource ( new_stmt_res , le_stmt_struct ) );
5551
5548
} else {
5552
5549
RETURN_FALSE ;
5553
5550
}
0 commit comments