@@ -389,7 +389,7 @@ int preprocess(const char* sql, int sql_len, char* sql_out, HashTable* named_par
389
389
}
390
390
strncpy (pname , start , l );
391
391
pname [l ] = '\0' ;
392
-
392
+
393
393
if (named_params ) {
394
394
zval tmp ;
395
395
ZVAL_LONG (& tmp , pindex );
@@ -691,7 +691,7 @@ static int firebird_handle_quoter(pdo_dbh_t *dbh, const char *unquoted, size_t u
691
691
/* }}} */
692
692
693
693
/* called by PDO to start a transaction */
694
- static int firebird_handle_begin (pdo_dbh_t * dbh ) /* {{{ */
694
+ static bool firebird_handle_begin (pdo_dbh_t * dbh ) /* {{{ */
695
695
{
696
696
pdo_firebird_db_handle * H = (pdo_firebird_db_handle * )dbh -> driver_data ;
697
697
char tpb [8 ] = { isc_tpb_version3 }, * ptpb = tpb + 1 ;
@@ -737,35 +737,35 @@ static int firebird_handle_begin(pdo_dbh_t *dbh) /* {{{ */
737
737
#endif
738
738
if (isc_start_transaction (H -> isc_status , & H -> tr , 1 , & H -> db , (unsigned short )(ptpb - tpb ), tpb )) {
739
739
RECORD_ERROR (dbh );
740
- return 0 ;
740
+ return false ;
741
741
}
742
- return 1 ;
742
+ return true ;
743
743
}
744
744
/* }}} */
745
745
746
746
/* called by PDO to commit a transaction */
747
- static int firebird_handle_commit (pdo_dbh_t * dbh ) /* {{{ */
747
+ static bool firebird_handle_commit (pdo_dbh_t * dbh ) /* {{{ */
748
748
{
749
749
pdo_firebird_db_handle * H = (pdo_firebird_db_handle * )dbh -> driver_data ;
750
750
751
751
if (isc_commit_transaction (H -> isc_status , & H -> tr )) {
752
752
RECORD_ERROR (dbh );
753
- return 0 ;
753
+ return false ;
754
754
}
755
- return 1 ;
755
+ return true ;
756
756
}
757
757
/* }}} */
758
758
759
759
/* called by PDO to rollback a transaction */
760
- static int firebird_handle_rollback (pdo_dbh_t * dbh ) /* {{{ */
760
+ static bool firebird_handle_rollback (pdo_dbh_t * dbh ) /* {{{ */
761
761
{
762
762
pdo_firebird_db_handle * H = (pdo_firebird_db_handle * )dbh -> driver_data ;
763
763
764
764
if (isc_rollback_transaction (H -> isc_status , & H -> tr )) {
765
765
RECORD_ERROR (dbh );
766
- return 0 ;
766
+ return false ;
767
767
}
768
- return 1 ;
768
+ return true ;
769
769
}
770
770
/* }}} */
771
771
@@ -789,7 +789,7 @@ static int firebird_alloc_prepare_stmt(pdo_dbh_t *dbh, const char *sql, size_t s
789
789
if (!firebird_handle_begin (dbh )) {
790
790
return 0 ;
791
791
}
792
- dbh -> in_txn = 1 ;
792
+ dbh -> in_txn = true ;
793
793
}
794
794
795
795
/* allocate the statement */
@@ -804,7 +804,7 @@ static int firebird_alloc_prepare_stmt(pdo_dbh_t *dbh, const char *sql, size_t s
804
804
new_sql [0 ] = '\0' ;
805
805
if (!preprocess (sql , sql_len , new_sql , named_params )) {
806
806
strcpy (dbh -> error_code , "07000" );
807
- efree (new_sql );
807
+ efree (new_sql );
808
808
return 0 ;
809
809
}
810
810
@@ -843,7 +843,7 @@ static int firebird_handle_set_attribute(pdo_dbh_t *dbh, zend_long attr, zval *v
843
843
if (!firebird_handle_commit (dbh )) {
844
844
break ;
845
845
}
846
- dbh -> in_txn = 0 ;
846
+ dbh -> in_txn = false ;
847
847
}
848
848
}
849
849
dbh -> auto_commit = bval ;
@@ -1008,7 +1008,7 @@ static const struct pdo_dbh_methods firebird_methods = { /* {{{ */
1008
1008
NULL , /* check_liveness */
1009
1009
NULL , /* get driver methods */
1010
1010
NULL , /* request shutdown */
1011
- NULL , /* in transaction */
1011
+ NULL , /* in transaction, use PDO's internal tracking mechanism */
1012
1012
NULL /* get gc */
1013
1013
};
1014
1014
/* }}} */
0 commit comments