@@ -4520,8 +4520,7 @@ static int php_pgsql_add_quotes(zval *src, bool should_free)
4520
4520
{
4521
4521
smart_str str = {0 };
4522
4522
4523
- assert (Z_TYPE_P (src ) == IS_STRING );
4524
- assert (should_free == 1 || should_free == 0 );
4523
+ ZEND_ASSERT (Z_TYPE_P (src ) == IS_STRING );
4525
4524
4526
4525
smart_str_appendc (& str , 'E' );
4527
4526
smart_str_appendc (& str , '\'' );
@@ -5315,9 +5314,9 @@ PHP_PGSQL_API int php_pgsql_insert(PGconn *pg_link, const char *table, zval *var
5315
5314
int ret = FAILURE ;
5316
5315
zend_string * fld ;
5317
5316
5318
- assert (pg_link != NULL );
5319
- assert (table != NULL );
5320
- assert (Z_TYPE_P (var_array ) == IS_ARRAY );
5317
+ ZEND_ASSERT (pg_link != NULL );
5318
+ ZEND_ASSERT (table != NULL );
5319
+ ZEND_ASSERT (Z_TYPE_P (var_array ) == IS_ARRAY );
5321
5320
5322
5321
ZVAL_UNDEF (& converted );
5323
5322
if (zend_hash_num_elements (Z_ARRVAL_P (var_array )) == 0 ) {
@@ -5578,11 +5577,11 @@ PHP_PGSQL_API int php_pgsql_update(PGconn *pg_link, const char *table, zval *var
5578
5577
smart_str querystr = {0 };
5579
5578
int ret = FAILURE ;
5580
5579
5581
- assert (pg_link != NULL );
5582
- assert (table != NULL );
5583
- assert (Z_TYPE_P (var_array ) == IS_ARRAY );
5584
- assert (Z_TYPE_P (ids_array ) == IS_ARRAY );
5585
- assert (!(opt & ~(PGSQL_CONV_OPTS |PGSQL_DML_NO_CONV |PGSQL_DML_EXEC |PGSQL_DML_STRING |PGSQL_DML_ESCAPE )));
5580
+ ZEND_ASSERT (pg_link != NULL );
5581
+ ZEND_ASSERT (table != NULL );
5582
+ ZEND_ASSERT (Z_TYPE_P (var_array ) == IS_ARRAY );
5583
+ ZEND_ASSERT (Z_TYPE_P (ids_array ) == IS_ARRAY );
5584
+ ZEND_ASSERT (!(opt & ~(PGSQL_CONV_OPTS |PGSQL_DML_NO_CONV |PGSQL_DML_EXEC |PGSQL_DML_STRING |PGSQL_DML_ESCAPE )));
5586
5585
5587
5586
if (zend_hash_num_elements (Z_ARRVAL_P (var_array )) == 0
5588
5587
|| zend_hash_num_elements (Z_ARRVAL_P (ids_array )) == 0 ) {
@@ -5688,10 +5687,10 @@ PHP_PGSQL_API int php_pgsql_delete(PGconn *pg_link, const char *table, zval *ids
5688
5687
smart_str querystr = {0 };
5689
5688
int ret = FAILURE ;
5690
5689
5691
- assert (pg_link != NULL );
5692
- assert (table != NULL );
5693
- assert (Z_TYPE_P (ids_array ) == IS_ARRAY );
5694
- assert (!(opt & ~(PGSQL_CONV_FORCE_NULL |PGSQL_DML_EXEC |PGSQL_DML_STRING |PGSQL_DML_ESCAPE )));
5690
+ ZEND_ASSERT (pg_link != NULL );
5691
+ ZEND_ASSERT (table != NULL );
5692
+ ZEND_ASSERT (Z_TYPE_P (ids_array ) == IS_ARRAY );
5693
+ ZEND_ASSERT (!(opt & ~(PGSQL_CONV_FORCE_NULL |PGSQL_DML_EXEC |PGSQL_DML_STRING |PGSQL_DML_ESCAPE )));
5695
5694
5696
5695
if (zend_hash_num_elements (Z_ARRVAL_P (ids_array )) == 0 ) {
5697
5696
return FAILURE ;
@@ -5785,7 +5784,8 @@ PHP_PGSQL_API void php_pgsql_result2array(PGresult *pg_result, zval *ret_array,
5785
5784
size_t num_fields ;
5786
5785
int pg_numrows , pg_row ;
5787
5786
uint32_t i ;
5788
- assert (Z_TYPE_P (ret_array ) == IS_ARRAY );
5787
+
5788
+ ZEND_ASSERT (Z_TYPE_P (ret_array ) == IS_ARRAY );
5789
5789
5790
5790
pg_numrows = PQntuples (pg_result );
5791
5791
for (pg_row = 0 ; pg_row < pg_numrows ; pg_row ++ ) {
@@ -5825,11 +5825,11 @@ PHP_PGSQL_API void php_pgsql_result2array(PGresult *pg_result, zval *ret_array,
5825
5825
int ret = FAILURE ;
5826
5826
PGresult * pg_result ;
5827
5827
5828
- assert (pg_link != NULL );
5829
- assert (table != NULL );
5830
- assert (Z_TYPE_P (ids_array ) == IS_ARRAY );
5831
- assert (Z_TYPE_P (ret_array ) == IS_ARRAY );
5832
- assert (!(opt & ~(PGSQL_CONV_OPTS |PGSQL_DML_NO_CONV |PGSQL_DML_EXEC |PGSQL_DML_ASYNC |PGSQL_DML_STRING |PGSQL_DML_ESCAPE )));
5828
+ ZEND_ASSERT (pg_link != NULL );
5829
+ ZEND_ASSERT (table != NULL );
5830
+ ZEND_ASSERT (Z_TYPE_P (ids_array ) == IS_ARRAY );
5831
+ ZEND_ASSERT (Z_TYPE_P (ret_array ) == IS_ARRAY );
5832
+ ZEND_ASSERT (!(opt & ~(PGSQL_CONV_OPTS |PGSQL_DML_NO_CONV |PGSQL_DML_EXEC |PGSQL_DML_ASYNC |PGSQL_DML_STRING |PGSQL_DML_ESCAPE )));
5833
5833
5834
5834
if (zend_hash_num_elements (Z_ARRVAL_P (ids_array )) == 0 ) {
5835
5835
return FAILURE ;
0 commit comments