ibase_trans *ib_trans;
ISC_TEB *teb;
- isc_tr_handle tr_handle = NULL;
+ isc_tr_handle tr_handle = NULL;
RESET_ERRMSG;
}
if (argn) {
- /* the number of databases this transaction connects to */
- link_cnt = argn-1;
+ /* the number of databases this transaction connects to */
+ link_cnt = argn-1;
args = (zval ***) emalloc(sizeof(zval **) * argn);
if (zend_get_parameters_array_ex(argn, args) == FAILURE) {
}
if (argn < 2) {
- link_cnt = 1;
+ link_cnt = 1;
ZEND_FETCH_RESOURCE2(ib_link[0], ibase_db_link *, NULL, IBG(default_link), "InterBase link", le_link, le_plink);
}
tpb[tpb_len++] = isc_tpb_read_committed;
if (trans_argl & PHP_IBASE_REC_VERSION) {
tpb[tpb_len++] = isc_tpb_rec_version;
- }else{
+ } else {
tpb[tpb_len++] = isc_tpb_no_rec_version; /* default in read_committed */
}
} else if (trans_argl & PHP_IBASE_CONSISTENCY) {
/* allocate a TEB array */
teb = (ISC_TEB*) emalloc(sizeof(ISC_TEB) * link_cnt);
for (i = 0; i < link_cnt; ++i) {
- teb[i].db_ptr = &ib_link[i]->link;
- teb[i].tpb_len = tpb_len;
- teb[i].tpb_ptr = tpb;
+ teb[i].db_ptr = &ib_link[i]->link;
+ teb[i].tpb_len = tpb_len;
+ teb[i].tpb_ptr = tpb;
}
/* start the transaction */
ibase_tr_list **l;
ib_trans->link[i] = ib_link[i];
- /* the first item in the connection-transaction list is reserved for
- the default transaction */
+ /* the first item in the connection-transaction list is reserved for the default transaction */
if (ib_link[i]->trans == NULL) {
ib_link[i]->trans = (ibase_tr_list*)emalloc(sizeof(ibase_tr_list));
ib_link[i]->trans->trans = NULL;
ib_link[i]->trans->next = NULL;
}
-
+
/* link the transaction into the connection-transaction list */
for (l = &ib_link[i]->trans; *l != NULL; l = &(*l)->next);
*l = (ibase_tr_list*) emalloc(sizeof(ibase_tr_list));
return FAILURE;
}
- /* the first item in the connection-transaction list is reserved for
- the default transaction */
+ /* the first item in the connection-transaction list is reserved for the default transaction */
if (ib_link->trans == NULL) {
ib_link->trans = (ibase_tr_list*)emalloc(sizeof(ibase_tr_list));
ib_link->trans->trans = NULL;
ib_link->trans->next = NULL;
}
-
+
if (*trans == NULL) {
if (ib_link->trans->trans == NULL) {
ibase_trans *tr = (ibase_trans*)emalloc(sizeof(ibase_trans));
}
return SUCCESS;
}
-/*}}}*/
+/* }}} */
/* {{{ _php_ibase_trans_end() */
#define COMMIT 1
#define PHP_INTERBASE_H
#if HAVE_IBASE
+
#include <ibase.h>
extern zend_module_entry ibase_module_entry;
#ifdef PHP_WIN32
#define PHP_IBASE_API __declspec(dllexport)
#ifndef ISC_INT64_FORMAT
- #define ISC_INT64_FORMAT "I64"
+#define ISC_INT64_FORMAT "I64"
#endif
#else
#define PHP_IBASE_API
#ifndef ISC_INT64_FORMAT
- #define ISC_INT64_FORMAT "ll"
+#define ISC_INT64_FORMAT "ll"
#endif
#endif
PHP_IBASE_DEFAULT = 0,
PHP_IBASE_TEXT = 1,
PHP_IBASE_UNIXTIME = 2,
- PHP_IBASE_TIMESTAMP = 4,
+ PHP_IBASE_TIMESTAMP = 4,
PHP_IBASE_DATE = 8,
PHP_IBASE_TIME = 16,
- /* transactions */
- PHP_IBASE_WRITE = 2,
+ /* transactions */
+ PHP_IBASE_WRITE = 2,
PHP_IBASE_READ = 4,
- PHP_IBASE_COMMITTED = 8,
+ PHP_IBASE_COMMITTED = 8,
PHP_IBASE_CONSISTENCY = 16,
PHP_IBASE_CONCURRENCY = 32,
PHP_IBASE_REC_VERSION = 64,
PHP_IBASE_REC_NO_VERSION = 128,
- PHP_IBASE_NOWAIT = 256,
+ PHP_IBASE_NOWAIT = 256,
PHP_IBASE_WAIT = 512
};