CVS update: php3/functions
| From: | jah | Date: | Tue, 06 Oct 1998 18:39:46 +0000 |
| Subject: | CVS update: php3/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-1707@lists.php.net to get a copy of this message | ||
Date: Tuesday October 6, 1998 @ 14:39
Author: jah
Update of /repository/php3/functions
In directory asf:/u2/tmp/cvs-serv25247/functions
Modified Files:
interbase.c
Log Message:
Closed a lot things in IBASE_GLOBAL(). This thing runs on Windows too.
Index: php3/functions/interbase.c
diff -c php3/functions/interbase.c:1.1 php3/functions/interbase.c:1.2
*** php3/functions/interbase.c:1.1 Tue Oct 6 09:51:46 1998
--- php3/functions/interbase.c Tue Oct 6 14:39:45 1998
***************
*** 28,34 ****
+----------------------------------------------------------------------+
*/
! /* $Id: interbase.c,v 1.1 1998/10/06 13:51:46 jah Exp $ */
/* TODO: A lot... */
--- 28,34 ----
+----------------------------------------------------------------------+
*/
! /* $Id: interbase.c,v 1.2 1998/10/06 18:39:45 jah Exp $ */
/* TODO: A lot... */
***************
*** 94,106 ****
static void _php3_ibase_close_link(isc_db_handle db)
{
ISC_STATUS status[20];
isc_detach_database(status, &db);
! php3_ibase_module.num_links--;
}
static void _php3_ibase_close_plink(isc_db_handle db)
{
ISC_STATUS status[20];
isc_detach_database(status, &db);
php3_ibase_module.num_persistent--;
php3_ibase_module.num_links--;
--- 94,110 ----
static void _php3_ibase_close_link(isc_db_handle db)
{
ISC_STATUS status[20];
+ IBASE_TLS_VARS;
+
isc_detach_database(status, &db);
! IBASE_GLOBAL(php3_ibase_module).num_links--;
}
static void _php3_ibase_close_plink(isc_db_handle db)
{
ISC_STATUS status[20];
+ IBASE_TLS_VARS;
+
isc_detach_database(status, &db);
php3_ibase_module.num_persistent--;
php3_ibase_module.num_links--;
***************
*** 110,117 ****
{
int i;
ISC_STATUS status[20];
! if (!php3_ibase_module.manualtransactions && result->commitok) {
isc_commit_transaction(status, &result->trans);
}
if (result->sqlda != NULL) {
--- 114,122 ----
{
int i;
ISC_STATUS status[20];
+ IBASE_TLS_VARS;
! if (!IBASE_GLOBAL(php3_ibase_module).manualtransactions && result->commitok) {
isc_commit_transaction(status, &result->trans);
}
if (result->sqlda != NULL) {
***************
*** 145,185 ****
int php3_minit_ibase(INIT_FUNC_ARGS)
{
! if (cfg_get_long("ibase.allow_persistent", &php3_ibase_module.allow_persistent) ==
FAILURE) {
! php3_ibase_module.allow_persistent = 1;
}
! if (cfg_get_long("ibase.max_persistent", &php3_ibase_module.max_persistent) ==
FAILURE) {
! php3_ibase_module.max_persistent = -1;
}
! if (cfg_get_long("ibase.max_links", &php3_ibase_module.max_links) == FAILURE) {
! php3_ibase_module.max_links = -1;
}
/*
! if (cfg_get_long("ibase.manualtransactions", &php3_ibase_module.manualtransactions)
== FAILURE) {
! php3_ibase_module.manualtransactions = 0;
}
*/
! php3_ibase_module.manualtransactions = 0;
if (cfg_get_string("ibase.timeformat", &IBASE_GLOBAL(php3_ibase_module).timeformat)
== FAILURE) {
! php3_ibase_module.timeformat = "%Y-%m-%d %H:%M:%S";
}
! php3_ibase_module.num_persistent=0;
! php3_ibase_module.le_result = register_list_destructors(_php3_ibase_free_result, NULL);
! php3_ibase_module.le_query = register_list_destructors(_php3_ibase_free_query, NULL);
! php3_ibase_module.le_link = register_list_destructors(_php3_ibase_close_link, NULL);
! php3_ibase_module.le_plink = register_list_destructors(NULL, _php3_ibase_close_plink);
return SUCCESS;
}
int php3_rinit_ibase(INIT_FUNC_ARGS)
{
! php3_ibase_module.default_link=-1;
! php3_ibase_module.num_links = php3_ibase_module.num_persistent;
return SUCCESS;
}
int php3_mfinish_ibase(void)
{
return SUCCESS;
}
--- 150,197 ----
int php3_minit_ibase(INIT_FUNC_ARGS)
{
! IBASE_TLS_VARS;
!
! if (cfg_get_long("ibase.allow_persistent",
&IBASE_GLOBAL(php3_ibase_module).allow_persistent) == FAILURE) {
! IBASE_GLOBAL(php3_ibase_module).allow_persistent = 1;
}
! if (cfg_get_long("ibase.max_persistent",
&IBASE_GLOBAL(php3_ibase_module).max_persistent) == FAILURE) {
! IBASE_GLOBAL(php3_ibase_module).max_persistent = -1;
}
! if (cfg_get_long("ibase.max_links", &IBASE_GLOBAL(php3_ibase_module).max_links) ==
FAILURE) {
! IBASE_GLOBAL(php3_ibase_module).max_links = -1;
}
/*
! if (cfg_get_long("ibase.manualtransactions",
&IBASE_GLOBAL(php3_ibase_module).manualtransactions) == FAILURE) {
! IBASE_GLOBAL(php3_ibase_module).manualtransactions = 0;
}
*/
! IBASE_GLOBAL(php3_ibase_module).manualtransactions = 0;
if (cfg_get_string("ibase.timeformat", &IBASE_GLOBAL(php3_ibase_module).timeformat)
== FAILURE) {
! IBASE_GLOBAL(php3_ibase_module).timeformat = "%Y-%m-%d %H:%M:%S";
}
! IBASE_GLOBAL(php3_ibase_module).num_persistent=0;
! IBASE_GLOBAL(php3_ibase_module).le_result = register_list_destructors(_php3_ibase_free_result,
NULL);
! IBASE_GLOBAL(php3_ibase_module).le_query = register_list_destructors(_php3_ibase_free_query,
NULL);
! IBASE_GLOBAL(php3_ibase_module).le_link = register_list_destructors(_php3_ibase_close_link,
NULL);
! IBASE_GLOBAL(php3_ibase_module).le_plink = register_list_destructors(NULL,
_php3_ibase_close_plink);
return SUCCESS;
}
int php3_rinit_ibase(INIT_FUNC_ARGS)
{
! IBASE_TLS_VARS;
!
! IBASE_GLOBAL(php3_ibase_module).default_link=-1;
! IBASE_GLOBAL(php3_ibase_module).num_links = php3_ibase_module.num_persistent;
return SUCCESS;
}
int php3_mfinish_ibase(void)
{
+ IBASE_TLS_VARS;
+
+ efree(IBASE_GLOBAL(php3_ibase_module).timeformat);
return SUCCESS;
}
***************
*** 246,251 ****
--- 258,264 ----
isc_db_handle db_handle = NULL;
char *hashed_details;
int hashed_details_length;
+ IBASE_TLS_VARS;
switch(ARG_COUNT(ht)) {
case 1:
***************
*** 282,294 ****
if (_php3_hash_find(plist, hashed_details, hashed_details_length+1, (void **) &le)==FAILURE)
{
list_entry new_le;
! if (php3_ibase_module.max_links!=-1 &&
php3_ibase_module.num_links>=php3_ibase_module.max_links) {
! php3_error(E_WARNING,"InterBase: Too many open links
(%d)",php3_ibase_module.num_links);
efree(hashed_details);
RETURN_FALSE;
}
! if (php3_ibase_module.max_persistent!=-1 &&
php3_ibase_module.num_persistent>=php3_ibase_module.max_persistent) {
! php3_error(E_WARNING,"InterBase: Too many open persistent links
(%d)",php3_ibase_module.num_persistent);
efree(hashed_details);
RETURN_FALSE;
}
--- 295,307 ----
if (_php3_hash_find(plist, hashed_details, hashed_details_length+1, (void **) &le)==FAILURE)
{
list_entry new_le;
! if (IBASE_GLOBAL(php3_ibase_module).max_links!=-1 &&
IBASE_GLOBAL(php3_ibase_module).num_links>=IBASE_GLOBAL(php3_ibase_module).max_links) {
! php3_error(E_WARNING,"InterBase: Too many open links (%d)",
IBASE_GLOBAL(php3_ibase_module).num_links);
efree(hashed_details);
RETURN_FALSE;
}
! if (IBASE_GLOBAL(php3_ibase_module).max_persistent!=-1 &&
IBASE_GLOBAL(php3_ibase_module).num_persistent>=IBASE_GLOBAL(php3_ibase_module).max_persistent) {
! php3_error(E_WARNING,"InterBase: Too many open persistent links (%d)",
IBASE_GLOBAL(php3_ibase_module).num_persistent);
efree(hashed_details);
RETURN_FALSE;
}
***************
*** 307,326 ****
efree(hashed_details);
RETURN_FALSE;
}
! php3_ibase_module.num_links++;
! php3_ibase_module.num_persistent++;
} else {
! if (le->type != php3_ibase_module.le_plink) {
RETURN_FALSE;
}
/* TODO: ensure that the link did not die */
db_handle = (isc_db_handle) le->ptr;
}
! return_value->value.lval = php3_list_insert(db_handle, php3_ibase_module.le_plink);
return_value->type = IS_LONG;
} else {
! list_entry *index_ptr,new_index_ptr;
/* first we check the hash for the hashed_details key. if it exists,
* it should point us to the right offset where the actual pgsql link sits.
--- 320,339 ----
efree(hashed_details);
RETURN_FALSE;
}
! IBASE_GLOBAL(php3_ibase_module).num_links++;
! IBASE_GLOBAL(php3_ibase_module).num_persistent++;
} else {
! if (le->type != IBASE_GLOBAL(php3_ibase_module).le_plink) {
RETURN_FALSE;
}
/* TODO: ensure that the link did not die */
db_handle = (isc_db_handle) le->ptr;
}
! return_value->value.lval = php3_list_insert(db_handle,
IBASE_GLOBAL(php3_ibase_module).le_plink);
return_value->type = IS_LONG;
} else {
! list_entry *index_ptr, new_index_ptr;
/* first we check the hash for the hashed_details key. if it exists,
* it should point us to the right offset where the actual pgsql link sits.
***************
*** 336,343 ****
}
link = (int) index_ptr->ptr;
ptr = php3_list_find(link,&type); /* check if the link is still there */
! if (ptr && (type==php3_ibase_module.le_link || type==php3_ibase_module.le_plink)) {
! return_value->value.lval = php3_ibase_module.default_link = link;
return_value->type = IS_LONG;
efree(hashed_details);
return;
--- 349,356 ----
}
link = (int) index_ptr->ptr;
ptr = php3_list_find(link,&type); /* check if the link is still there */
! if (ptr && (type==IBASE_GLOBAL(php3_ibase_module).le_link ||
type==IBASE_GLOBAL(php3_ibase_module).le_plink)) {
! return_value->value.lval = IBASE_GLOBAL(php3_ibase_module).default_link = link;
return_value->type = IS_LONG;
efree(hashed_details);
return;
***************
*** 345,352 ****
_php3_hash_del(list,hashed_details,hashed_details_length+1);
}
}
! if (php3_ibase_module.max_links!=-1 &&
php3_ibase_module.num_links>=php3_ibase_module.max_links) {
! php3_error(E_WARNING,"InterBase: Too many open links
(%d)",php3_ibase_module.num_links);
efree(hashed_details);
RETURN_FALSE;
}
--- 358,365 ----
_php3_hash_del(list,hashed_details,hashed_details_length+1);
}
}
! if (IBASE_GLOBAL(php3_ibase_module).max_links!=-1 &&
IBASE_GLOBAL(php3_ibase_module).num_links>=IBASE_GLOBAL(php3_ibase_module).max_links) {
! php3_error(E_WARNING,"InterBase: Too many open links (%d)",
IBASE_GLOBAL(php3_ibase_module).num_links);
efree(hashed_details);
RETURN_FALSE;
}
***************
*** 358,364 ****
}
/* add it to the list */
! return_value->value.lval = php3_list_insert(db_handle,php3_ibase_module.le_link);
return_value->type = IS_LONG;
/* add it to the hash */
--- 371,377 ----
}
/* add it to the list */
! return_value->value.lval = php3_list_insert(db_handle,
IBASE_GLOBAL(php3_ibase_module).le_link);
return_value->type = IS_LONG;
/* add it to the hash */
***************
*** 368,377 ****
efree(hashed_details);
RETURN_FALSE;
}
! php3_ibase_module.num_links++;
}
efree(hashed_details);
! php3_ibase_module.default_link=return_value->value.lval;
}
void php3_ibase_connect(INTERNAL_FUNCTION_PARAMETERS)
--- 381,390 ----
efree(hashed_details);
RETURN_FALSE;
}
! IBASE_GLOBAL(php3_ibase_module).num_links++;
}
efree(hashed_details);
! IBASE_GLOBAL(php3_ibase_module).default_link=return_value->value.lval;
}
void php3_ibase_connect(INTERNAL_FUNCTION_PARAMETERS)
***************
*** 389,398 ****
pval *ibase_link;
int id, type;
isc_db_handle db_handle;
switch (ARG_COUNT(ht)) {
case 0:
! id = php3_ibase_module.default_link;
break;
case 1:
if (getParameters(ht, 1, &ibase_link) == FAILURE) {
--- 402,412 ----
pval *ibase_link;
int id, type;
isc_db_handle db_handle;
+ IBASE_TLS_VARS;
switch (ARG_COUNT(ht)) {
case 0:
! id = IBASE_GLOBAL(php3_ibase_module).default_link;
break;
case 1:
if (getParameters(ht, 1, &ibase_link) == FAILURE) {
***************
*** 407,413 ****
}
db_handle = (isc_db_handle) php3_list_find(id, &type);
! if (type!=php3_ibase_module.le_link && type!=php3_ibase_module.le_plink) {
php3_error(E_WARNING, "%d is not an InterBase link index",id);
RETURN_FALSE;
}
--- 421,427 ----
}
db_handle = (isc_db_handle) php3_list_find(id, &type);
! if (type!=IBASE_GLOBAL(php3_ibase_module).le_link &&
type!=IBASE_GLOBAL(php3_ibase_module).le_plink) {
php3_error(E_WARNING, "%d is not an InterBase link index",id);
RETURN_FALSE;
}
***************
*** 580,592 ****
ISC_STATUS status[20];
XSQLDA *isqlda, *osqlda;
ibase_result_handle *ibase_result;
switch (ARG_COUNT(ht)) {
case 1:
if (getParameters(ht, 1, &query) == FAILURE) {
RETURN_FALSE;
}
! id = php3_ibase_module.default_link;
break;
case 2:
if (getParameters(ht, 2, &ibase_link, &query) == FAILURE) {
--- 594,607 ----
ISC_STATUS status[20];
XSQLDA *isqlda, *osqlda;
ibase_result_handle *ibase_result;
+ IBASE_TLS_VARS;
switch (ARG_COUNT(ht)) {
case 1:
if (getParameters(ht, 1, &query) == FAILURE) {
RETURN_FALSE;
}
! id = IBASE_GLOBAL(php3_ibase_module).default_link;
break;
case 2:
if (getParameters(ht, 2, &ibase_link, &query) == FAILURE) {
***************
*** 601,614 ****
}
db_handle = (isc_db_handle) php3_list_find(id, &type);
! if (type!=php3_ibase_module.le_link && type!=php3_ibase_module.le_plink) {
php3_error(E_WARNING, "%d is not an InterBase link index", id);
RETURN_FALSE;
}
convert_to_string(query);
! if (!php3_ibase_module.manualtransactions) {
if (isc_start_transaction(status, &tr_handle, 1, &db_handle, 0, NULL)) {
php3_error(E_WARNING, "InterBase: couldn't start transaction");
RETURN_FALSE;
--- 616,629 ----
}
db_handle = (isc_db_handle) php3_list_find(id, &type);
! if (type!=IBASE_GLOBAL(php3_ibase_module).le_link &&
type!=IBASE_GLOBAL(php3_ibase_module).le_plink) {
php3_error(E_WARNING, "%d is not an InterBase link index", id);
RETURN_FALSE;
}
convert_to_string(query);
! if (!IBASE_GLOBAL(php3_ibase_module).manualtransactions) {
if (isc_start_transaction(status, &tr_handle, 1, &db_handle, 0, NULL)) {
php3_error(E_WARNING, "InterBase: couldn't start transaction");
RETURN_FALSE;
***************
*** 634,646 ****
return_value->type = IS_LONG;
} else {
if (status[0] == 1 && status[1]) {
! if (!php3_ibase_module.manualtransactions) {
isc_rollback_transaction(status, &tr_handle);
isc_dsql_free_statement(status, &query_handle, DSQL_drop);
RETURN_FALSE;
}
} else {
! if (!php3_ibase_module.manualtransactions) {
isc_commit_transaction(status, &tr_handle);
isc_dsql_free_statement(status, &query_handle, DSQL_drop);
RETURN_FALSE;
--- 649,661 ----
return_value->type = IS_LONG;
} else {
if (status[0] == 1 && status[1]) {
! if (!IBASE_GLOBAL(php3_ibase_module).manualtransactions) {
isc_rollback_transaction(status, &tr_handle);
isc_dsql_free_statement(status, &query_handle, DSQL_drop);
RETURN_FALSE;
}
} else {
! if (!IBASE_GLOBAL(php3_ibase_module).manualtransactions) {
isc_commit_transaction(status, &tr_handle);
isc_dsql_free_statement(status, &query_handle, DSQL_drop);
RETURN_FALSE;
***************
*** 662,667 ****
--- 677,683 ----
ISC_STATUS status[20];
XSQLVAR *var;
IBASE_VCHAR *vchar;
+ IBASE_TLS_VARS;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &result)==FAILURE) {
WRONG_PARAM_COUNT;
***************
*** 670,676 ****
convert_to_long(result);
ibase_result = (ibase_result_handle *) php3_list_find(result->value.lval, &type);
! if (type!=php3_ibase_module.le_result) {
php3_error(E_WARNING,"%d is not an InterBase result index", result->value.lval);
RETURN_FALSE;
}
--- 686,692 ----
convert_to_long(result);
ibase_result = (ibase_result_handle *) php3_list_find(result->value.lval, &type);
! if (type!=IBASE_GLOBAL(php3_ibase_module).le_result) {
php3_error(E_WARNING,"%d is not an InterBase result index", result->value.lval);
RETURN_FALSE;
}
***************
*** 799,804 ****
--- 815,821 ----
pval *result;
ibase_result_handle *ibase_result;
int type;
+ IBASE_TLS_VARS;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &result)==FAILURE) {
WRONG_PARAM_COUNT;
***************
*** 811,817 ****
ibase_result = (ibase_result_handle *) php3_list_find(result->value.lval,&type);
! if (type!=php3_ibase_module.le_result) {
php3_error(E_WARNING,"%d is not an InterBase result index",result->value.lval);
RETURN_FALSE;
}
--- 828,834 ----
ibase_result = (ibase_result_handle *) php3_list_find(result->value.lval,&type);
! if (type!=IBASE_GLOBAL(php3_ibase_module).le_result) {
php3_error(E_WARNING,"%d is not an InterBase result index",result->value.lval);
RETURN_FALSE;
}
***************
*** 829,841 ****
ISC_STATUS status[20];
XSQLDA *isqlda;
ibase_query_handle *ibase_query;
switch (ARG_COUNT(ht)) {
case 1:
if (getParameters(ht, 1, &query) == FAILURE) {
RETURN_FALSE;
}
! id = php3_ibase_module.default_link;
break;
case 2:
if (getParameters(ht, 2, &ibase_link, &query) == FAILURE) {
--- 846,859 ----
ISC_STATUS status[20];
XSQLDA *isqlda;
ibase_query_handle *ibase_query;
+ IBASE_TLS_VARS;
switch (ARG_COUNT(ht)) {
case 1:
if (getParameters(ht, 1, &query) == FAILURE) {
RETURN_FALSE;
}
! id = IBASE_GLOBAL(php3_ibase_module).default_link;
break;
case 2:
if (getParameters(ht, 2, &ibase_link, &query) == FAILURE) {
***************
*** 850,863 ****
}
db_handle = (isc_db_handle) php3_list_find(id, &type);
! if (type!=php3_ibase_module.le_link && type!=php3_ibase_module.le_plink) {
php3_error(E_WARNING, "%d is not an InterBase link index", id);
RETURN_FALSE;
}
convert_to_string(query);
! if (!php3_ibase_module.manualtransactions) {
if (isc_start_transaction(status, &tr_handle, 1, &db_handle, 0, NULL)) {
php3_error(E_WARNING, "InterBase: couldn't start transaction");
RETURN_FALSE;
--- 868,881 ----
}
db_handle = (isc_db_handle) php3_list_find(id, &type);
! if (type!=IBASE_GLOBAL(php3_ibase_module).le_link &&
type!=IBASE_GLOBAL(php3_ibase_module).le_plink) {
php3_error(E_WARNING, "%d is not an InterBase link index", id);
RETURN_FALSE;
}
convert_to_string(query);
! if (!IBASE_GLOBAL(php3_ibase_module).manualtransactions) {
if (isc_start_transaction(status, &tr_handle, 1, &db_handle, 0, NULL)) {
php3_error(E_WARNING, "InterBase: couldn't start transaction");
RETURN_FALSE;
***************
*** 879,884 ****
--- 897,903 ----
pval *query;
ibase_query_handle *ibase_query;
int type;
+ IBASE_TLS_VARS;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &query)==FAILURE) {
WRONG_PARAM_COUNT;
***************
*** 891,897 ****
ibase_query = (ibase_query_handle *) php3_list_find(query->value.lval,&type);
! if (type!=php3_ibase_module.le_query) {
php3_error(E_WARNING,"%d is not an InterBase query index",query->value.lval);
RETURN_FALSE;
}
--- 910,916 ----
ibase_query = (ibase_query_handle *) php3_list_find(query->value.lval,&type);
! if (type!=IBASE_GLOBAL(php3_ibase_module).le_query) {
php3_error(E_WARNING,"%d is not an InterBase query index",query->value.lval);
RETURN_FALSE;
}
***************
*** 938,943 ****
--- 957,963 ----
int type;
ISC_STATUS status[20];
XSQLDA *osqlda;
+ IBASE_TLS_VARS;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &query)==FAILURE) {
WRONG_PARAM_COUNT;
***************
*** 950,956 ****
ibase_query = (ibase_query_handle *) php3_list_find(query->value.lval,&type);
! if (type!=php3_ibase_module.le_query) {
php3_error(E_WARNING,"%d is not an InterBase query index", query->value.lval);
RETURN_FALSE;
}
--- 970,976 ----
ibase_query = (ibase_query_handle *) php3_list_find(query->value.lval,&type);
! if (type!=IBASE_GLOBAL(php3_ibase_module).le_query) {
php3_error(E_WARNING,"%d is not an InterBase query index", query->value.lval);
RETURN_FALSE;
}
***************
*** 959,965 ****
ibase_result = (ibase_result_handle *) emalloc(sizeof(ibase_result_handle));
ibase_result->result = ibase_query->query;
ibase_result->sqlda = osqlda;
! return_value->value.lval = php3_list_insert(ibase_result, php3_ibase_module.le_result);
return_value->type = IS_LONG;
}
--- 979,985 ----
ibase_result = (ibase_result_handle *) emalloc(sizeof(ibase_result_handle));
ibase_result->result = ibase_query->query;
ibase_result->sqlda = osqlda;
! return_value->value.lval = php3_list_insert(ibase_result,
IBASE_GLOBAL(php3_ibase_module).le_result);
return_value->type = IS_LONG;
}
***************
*** 968,973 ****
--- 988,994 ----
pval *query;
ibase_query_handle *ibase_query;
int type;
+ IBASE_TLS_VARS;
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &query)==FAILURE) {
WRONG_PARAM_COUNT;
***************
*** 978,987 ****
RETURN_FALSE;
}
! ibase_query = (ibase_query_handle *) php3_list_find(query->value.lval,&type);
! if (type!=php3_ibase_module.le_query) {
! php3_error(E_WARNING,"%d is not an InterBase query index",query->value.lval);
RETURN_FALSE;
}
php3_list_delete(query->value.lval);
--- 999,1008 ----
RETURN_FALSE;
}
! ibase_query = (ibase_query_handle *) php3_list_find(query->value.lval, &type);
! if (type!=IBASE_GLOBAL(php3_ibase_module).le_query) {
! php3_error(E_WARNING,"%d is not an InterBase query index", query->value.lval);
RETURN_FALSE;
}
php3_list_delete(query->value.lval);
***************
*** 990,996 ****
--- 1011,1026 ----
void php3_ibase_timefmt(INTERNAL_FUNCTION_PARAMETERS)
{
+ pval *pmode;
+ IBASE_TLS_VARS;
+
#if HAVE_STRFTIME
+ if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &pmode)==FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+ convert_to_string(pmode);
+
+ RETURN_TRUE;
#else
php3_error(E_WARNING,"InterBase: ibase_timefmt not supported on this platform");
RETURN_FALSE;
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net