summaryrefslogtreecommitdiff
path: root/ext/odbc/birdstep.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/odbc/birdstep.c')
-rw-r--r--ext/odbc/birdstep.c72
1 files changed, 36 insertions, 36 deletions
diff --git a/ext/odbc/birdstep.c b/ext/odbc/birdstep.c
index 3857c6955c..42d6f44fd4 100644
--- a/ext/odbc/birdstep.c
+++ b/ext/odbc/birdstep.c
@@ -159,11 +159,11 @@ ZEND_GET_MODULE(birdstep)
THREAD_LS birdstep_module php_birdstep_module;
THREAD_LS static HENV henv;
-#define PHP_GET_BIRDSTEP_RES_IDX(id) if (!(res = birdstep_find_result(list, id))) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Birdstep: Not result index (%ld)", id); RETURN_FALSE; }
-#define PHP_BIRDSTEP_CHK_LNK(id) if (!(conn = birdstep_find_conn(list, id))) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Birdstep: Not connection index (%ld)", id); RETURN_FALSE; }
+#define PHP_GET_BIRDSTEP_RES_IDX(id) if (!(res = birdstep_find_result(list, id))) { php_error_docref(NULL, E_WARNING, "Birdstep: Not result index (%ld)", id); RETURN_FALSE; }
+#define PHP_BIRDSTEP_CHK_LNK(id) if (!(conn = birdstep_find_conn(list, id))) { php_error_docref(NULL, E_WARNING, "Birdstep: Not connection index (%ld)", id); RETURN_FALSE; }
-static void _close_birdstep_link(zend_rsrc_list_entry *rsrc TSRMLS_DC)
+static void _close_birdstep_link(zend_rsrc_list_entry *rsrc)
{
VConn *conn = (VConn *)rsrc->ptr;
@@ -172,7 +172,7 @@ static void _close_birdstep_link(zend_rsrc_list_entry *rsrc TSRMLS_DC)
}
}
-static void _free_birdstep_result(zend_rsrc_list_entry *rsrc TSRMLS_DC)
+static void _free_birdstep_result(zend_rsrc_list_entry *rsrc)
{
Vresult *res = (Vresult *)rsrc->ptr;
@@ -224,11 +224,11 @@ PHP_MSHUTDOWN_FUNCTION(birdstep)
/* Some internal functions. Connections and result manupulate */
-static int birdstep_add_conn(HashTable *list,VConn *conn,HDBC hdbc TSRMLS_DC)
+static int birdstep_add_conn(HashTable *list,VConn *conn,HDBC hdbc)
{
int ind;
- ind = zend_list_insert(conn,php_birdstep_module.le_link TSRMLS_CC);
+ ind = zend_list_insert(conn,php_birdstep_module.le_link);
conn->hdbc = hdbc;
conn->index = ind;
@@ -293,28 +293,28 @@ PHP_FUNCTION(birdstep_connect)
VConn *new;
zend_long ind;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sss", &serv, &serv_len, &user, &user_len, &pass, &pass_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "sss", &serv, &serv_len, &user, &user_len, &pass, &pass_len) == FAILURE) {
return;
}
if ( php_birdstep_module.max_links != -1 && php_birdstep_module.num_links == php_birdstep_module.max_links ) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Birdstep: Too many open connections (%d)",php_birdstep_module.num_links);
+ php_error_docref(NULL, E_WARNING, "Birdstep: Too many open connections (%d)",php_birdstep_module.num_links);
RETURN_FALSE;
}
stat = SQLAllocConnect(henv,&hdbc);
if ( stat != SQL_SUCCESS ) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Birdstep: Could not allocate connection handle");
+ php_error_docref(NULL, E_WARNING, "Birdstep: Could not allocate connection handle");
RETURN_FALSE;
}
stat = SQLConnect(hdbc, serv, SQL_NTS, user, SQL_NTS, pass, SQL_NTS);
if ( stat != SQL_SUCCESS && stat != SQL_SUCCESS_WITH_INFO ) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Birdstep: Could not connect to server \"%s\" for %s", serv, user);
+ php_error_docref(NULL, E_WARNING, "Birdstep: Could not connect to server \"%s\" for %s", serv, user);
SQLFreeConnect(hdbc);
RETURN_FALSE;
}
new = (VConn *)emalloc(sizeof(VConn));
- ind = birdstep_add_conn(list,new,hdbc TSRMLS_CC);
+ ind = birdstep_add_conn(list,new,hdbc);
php_birdstep_module.num_links++;
RETURN_LONG(ind);
}
@@ -327,7 +327,7 @@ PHP_FUNCTION(birdstep_close)
zend_long id;
VConn *conn;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &id) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &id) == FAILURE) {
return;
}
@@ -354,7 +354,7 @@ PHP_FUNCTION(birdstep_exec)
SWORD cols,i,colnamelen;
SDWORD rows,coldesc;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ls", &ind, &query, &query_len) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ls", &ind, &query, &query_len) == FAILURE) {
return;
}
@@ -363,13 +363,13 @@ PHP_FUNCTION(birdstep_exec)
res = (Vresult *)emalloc(sizeof(Vresult));
stat = SQLAllocStmt(conn->hdbc,&res->hstmt);
if ( stat != SQL_SUCCESS && stat != SQL_SUCCESS_WITH_INFO ) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Birdstep: SQLAllocStmt return %d",stat);
+ php_error_docref(NULL, E_WARNING, "Birdstep: SQLAllocStmt return %d",stat);
efree(res);
RETURN_FALSE;
}
stat = SQLExecDirect(res->hstmt,query,SQL_NTS);
if ( stat != SQL_SUCCESS && stat != SQL_SUCCESS_WITH_INFO ) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Birdstep: Cannot execute \"%s\" query",query);
+ php_error_docref(NULL, E_WARNING, "Birdstep: Cannot execute \"%s\" query",query);
SQLFreeStmt(res->hstmt,SQL_DROP);
efree(res);
RETURN_FALSE;
@@ -377,7 +377,7 @@ PHP_FUNCTION(birdstep_exec)
/* Success query */
stat = SQLNumResultCols(res->hstmt,&cols);
if ( stat != SQL_SUCCESS ) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Birdstep: SQLNumResultCols return %d",stat);
+ php_error_docref(NULL, E_WARNING, "Birdstep: SQLNumResultCols return %d",stat);
SQLFreeStmt(res->hstmt,SQL_DROP);
efree(res);
RETURN_FALSE;
@@ -385,7 +385,7 @@ PHP_FUNCTION(birdstep_exec)
if ( !cols ) { /* Was INSERT, UPDATE, DELETE, etc. query */
stat = SQLRowCount(res->hstmt,&rows);
if ( stat != SQL_SUCCESS ) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Birdstep: SQLNumResultCols return %d",stat);
+ php_error_docref(NULL, E_WARNING, "Birdstep: SQLNumResultCols return %d",stat);
SQLFreeStmt(res->hstmt,SQL_DROP);
efree(res);
RETURN_FALSE;
@@ -432,7 +432,7 @@ PHP_FUNCTION(birdstep_fetch)
UDWORD row;
UWORD RowStat[1];
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &ind) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &ind) == FAILURE) {
return;
}
@@ -445,7 +445,7 @@ PHP_FUNCTION(birdstep_fetch)
RETURN_FALSE;
}
if ( stat != SQL_SUCCESS && stat != SQL_SUCCESS_WITH_INFO ) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Birdstep: SQLFetch return error");
+ php_error_docref(NULL, E_WARNING, "Birdstep: SQLFetch return error");
SQLFreeStmt(res->hstmt,SQL_DROP);
birdstep_del_result(list,Z_LVAL_PP(ind));
RETURN_FALSE;
@@ -469,7 +469,7 @@ PHP_FUNCTION(birdstep_result)
SWORD indx = -1;
char *field = NULL;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lZ", &ind, &col) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "lZ", &ind, &col) == FAILURE) {
return;
}
@@ -489,12 +489,12 @@ PHP_FUNCTION(birdstep_result)
}
}
if ( indx < 0 ) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Field %s not found",field);
+ php_error_docref(NULL, E_WARNING, "Field %s not found",field);
RETURN_FALSE;
}
} else {
if ( indx < 0 || indx >= res->numcols ) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Birdstep: Field index not in range");
+ php_error_docref(NULL, E_WARNING, "Birdstep: Field index not in range");
RETURN_FALSE;
}
}
@@ -506,7 +506,7 @@ PHP_FUNCTION(birdstep_result)
RETURN_FALSE;
}
if ( stat != SQL_SUCCESS && stat != SQL_SUCCESS_WITH_INFO ) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Birdstep: SQLFetch return error");
+ php_error_docref(NULL, E_WARNING, "Birdstep: SQLFetch return error");
SQLFreeStmt(res->hstmt,SQL_DROP);
birdstep_del_result(list,Z_LVAL_PP(ind));
RETURN_FALSE;
@@ -531,7 +531,7 @@ l1:
RETURN_FALSE;
}
if ( stat != SQL_SUCCESS && stat != SQL_SUCCESS_WITH_INFO ) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Birdstep: SQLGetData return error");
+ php_error_docref(NULL, E_WARNING, "Birdstep: SQLGetData return error");
SQLFreeStmt(res->hstmt,SQL_DROP);
birdstep_del_result(list,Z_LVAL_PP(ind));
RETURN_FALSE;
@@ -556,7 +556,7 @@ PHP_FUNCTION(birdstep_freeresult)
zend_long ind;
Vresult *res;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &ind) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &ind) == FAILURE) {
return;
}
@@ -576,7 +576,7 @@ PHP_FUNCTION(birdstep_autocommit)
RETCODE stat;
VConn *conn;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &id) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &id) == FAILURE) {
return;
}
@@ -584,7 +584,7 @@ PHP_FUNCTION(birdstep_autocommit)
stat = SQLSetConnectOption(conn->hdbc,SQL_AUTOCOMMIT,SQL_AUTOCOMMIT_ON);
if ( stat != SQL_SUCCESS && stat != SQL_SUCCESS_WITH_INFO ) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Birdstep: Set autocommit_on option failure");
+ php_error_docref(NULL, E_WARNING, "Birdstep: Set autocommit_on option failure");
RETURN_FALSE;
}
RETURN_TRUE;
@@ -599,7 +599,7 @@ PHP_FUNCTION(birdstep_off_autocommit)
RETCODE stat;
VConn *conn;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &id) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &id) == FAILURE) {
return;
}
@@ -607,7 +607,7 @@ PHP_FUNCTION(birdstep_off_autocommit)
stat = SQLSetConnectOption(conn->hdbc,SQL_AUTOCOMMIT,SQL_AUTOCOMMIT_OFF);
if ( stat != SQL_SUCCESS && stat != SQL_SUCCESS_WITH_INFO ) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Birdstep: Set autocommit_off option failure");
+ php_error_docref(NULL, E_WARNING, "Birdstep: Set autocommit_off option failure");
RETURN_FALSE;
}
RETURN_TRUE;
@@ -622,7 +622,7 @@ zend_long
RETCODE stat;
VConn *conn;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &id) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &id) == FAILURE) {
return;
}
@@ -630,7 +630,7 @@ zend_long
stat = SQLTransact(NULL,conn->hdbc,SQL_COMMIT);
if ( stat != SQL_SUCCESS ) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Birdstep: Commit failure");
+ php_error_docref(NULL, E_WARNING, "Birdstep: Commit failure");
RETURN_FALSE;
}
RETURN_TRUE;
@@ -645,7 +645,7 @@ PHP_FUNCTION(birdstep_rollback)
RETCODE stat;
VConn *conn;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &id) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &id) == FAILURE) {
return;
}
@@ -653,7 +653,7 @@ PHP_FUNCTION(birdstep_rollback)
stat = SQLTransact(NULL,conn->hdbc,SQL_ROLLBACK);
if ( stat != SQL_SUCCESS ) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Birdstep: Rollback failure");
+ php_error_docref(NULL, E_WARNING, "Birdstep: Rollback failure");
RETURN_FALSE;
}
RETURN_TRUE;
@@ -668,7 +668,7 @@ PHP_FUNCTION(birdstep_fieldname)
Vresult *res;
SWORD indx;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &ind, &col) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll", &ind, &col) == FAILURE) {
return;
}
@@ -676,7 +676,7 @@ PHP_FUNCTION(birdstep_fieldname)
indx = col;
if ( indx < 0 || indx >= res->numcols ) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Birdstep: Field index not in range");
+ php_error_docref(NULL, E_WARNING, "Birdstep: Field index not in range");
RETURN_FALSE;
}
RETURN_STRING(res->values[indx].name,TRUE);
@@ -690,7 +690,7 @@ PHP_FUNCTION(birdstep_fieldnum)
zend_long ind;
Vresult *res;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &ind) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &ind) == FAILURE) {
return;
}