#if HAVE_IFX
/* local function prototypes */
-static void php_ifx_set_default_link(int id);
-static long php_intifx_getType(long id, HashTable *list);
+static void php_ifx_set_default_link(int id TSRMLS_DC);
+static long php_intifx_getType(long id, HashTable *list TSRMLS_DC);
static long php_intifx_create_blob(long type, long mode, char* param, long len, HashTable *list);
-static long php_intifx_free_blob(long id, HashTable *list);
-static long php_intifx2_free_blob(long id, HashTable *list);
-static long php_intifx_get_blob(long bid, HashTable *list, char** content);
-static long php_intifx_update_blob(long bid, char* param, long len, HashTable *list);
-static loc_t *php_intifx_get_blobloc(long bid, HashTable *list);
+static long php_intifx_free_blob(long id, HashTable *list TSRMLS_DC);
+static long php_intifx2_free_blob(long id, HashTable *list TSRMLS_DC);
+static long php_intifx_get_blob(long bid, HashTable *list, char** content TSRMLS_DC);
+static long php_intifx_update_blob(long bid, char* param, long len, HashTable *list TSRMLS_DC);
+static loc_t *php_intifx_get_blobloc(long bid, HashTable *list TSRMLS_DC);
static char* php_intifx_create_tmpfile(long bid);
-static long php_intifx_copy_blob(long bid, HashTable *list);
+static long php_intifx_copy_blob(long bid, HashTable *list TSRMLS_DC);
static char* php_intifx_null();
static long php_intifx_create_char(char* param, long len, HashTable *list);
-static long php_intifx_free_char(long id, HashTable *list);
-static long php_intifx_update_char(long bid, char* param, long len, HashTable *list);
-static long php_intifx_get_char(long bid, HashTable *list, char** content);
+static long php_intifx_free_char(long id, HashTable *list TSRMLS_DC);
+static long php_intifx_update_char(long bid, char* param, long len, HashTable *list TSRMLS_DC);
+static long php_intifx_get_char(long bid, HashTable *list, char** content TSRMLS_DC);
#if HAVE_IFX_IUS
static long php_intifxus_create_slob(long create_mode, HashTable *list);
-static long php_intifxus_free_slob(long bid, HashTable *list);
-static long php_intifxus_close_slob(long bid, HashTable *list);
-static long php_intifxus_open_slob(long bid, long create_mode, HashTable *list);
+static long php_intifxus_free_slob(long bid, HashTable *list TSRMLS_DC);
+static long php_intifxus_close_slob(long bid, HashTable *list TSRMLS_DC);
+static long php_intifxus_open_slob(long bid, long create_mode, HashTable *list TSRMLS_DC);
static long php_intifxus_new_slob(HashTable *list);
-static ifx_lo_t *php_intifxus_get_slobloc(long bid, HashTable *list);
+static ifx_lo_t *php_intifxus_get_slobloc(long bid, HashTable *list TSRMLS_DC);
#endif
/* 7.10 on (at least) AIX is missing this */
char *ifx_err_msg;
char c;
int errorcode;
- IFXLS_FETCH();
+ TSRMLS_FETCH();
if (IFXG(sv_sqlcode) == 0) {
errorcode = SQLCODE;
EXEC SQL BEGIN DECLARE SECTION;
char *link;
EXEC SQL END DECLARE SECTION;
- IFXLS_FETCH();
+ TSRMLS_FETCH();
link=(char *)rsrc->ptr;
EXEC SQL BEGIN DECLARE SECTION;
char *link;
EXEC SQL END DECLARE SECTION;
- IFXLS_FETCH();
+ TSRMLS_FETCH();
link = (char *)rsrc->ptr;
PHP_RINIT_FUNCTION(ifx)
{
- IFXLS_FETCH();
-
IFXG(default_link)=-1;
IFXG(num_links) = IFXG(num_persistent);
return SUCCESS;
PHP_MINFO_FUNCTION(ifx)
{
char buf[32];
- IFXLS_FETCH();
php_info_print_table_start();
php_info_print_table_header(2, "Informix support", "enabled");
DISPLAY_INI_ENTRIES();
}
-static void php_ifx_set_default_link(int id)
+static void php_ifx_set_default_link(int id TSRMLS_DC)
{
- IFXLS_FETCH();
-
if (IFXG(default_link) != -1) {
zend_list_delete(IFXG(default_link));
}
char *ifx;
EXEC SQL END DECLARE SECTION;
- IFXLS_FETCH();
- PLS_FETCH();
-
if (PG(sql_safe_mode)) {
if (ZEND_NUM_ARGS()>0) {
php_error(E_NOTICE, "SQL safe mode in effect - ignoring host/user/password information");
}
zend_list_addref(link);
return_value->value.lval = link;
- php_ifx_set_default_link(link);
+ php_ifx_set_default_link(link TSRMLS_CC);
return_value->type = IS_RESOURCE;
efree(hashed_details);
return;
IFXG(num_links)++;
}
efree(hashed_details);
- php_ifx_set_default_link(return_value->value.lval);
+ php_ifx_set_default_link(return_value->value.lval TSRMLS_CC);
}
/* {{{ proto int ifx_connect([string database [, string userid [, string password]]])
char *ifx;
EXEC SQL END DECLARE SECTION;
- IFXLS_FETCH();
-
switch (ZEND_NUM_ARGS()) {
case 0:
id = IFXG(default_link);
int argc=ZEND_NUM_ARGS();
long ifx_type;
- IFXLS_FETCH();
-
if(argc < 2 || zend_get_parameters_ex(argc, &query, &ifx_link, &dummy, &dummy)==FAILURE) {
WRONG_PARAM_COUNT;
}
EXEC SQL SET DESCRIPTOR :descrpid COUNT = :i;
}
- ifx_type=php_intifx_getType((int)(*tmp)->value.lval,&EG(regular_list));
+ ifx_type=php_intifx_getType((int)(*tmp)->value.lval,&EG(regular_list) TSRMLS_CC);
switch(ifx_type) {
case TYPE_BLTEXT:
case TYPE_BLBYTE:
- locator=php_intifx_get_blobloc((int)((*tmp)->value.lval),&EG(regular_list));
+ locator=php_intifx_get_blobloc((int)((*tmp)->value.lval),&EG(regular_list) TSRMLS_CC);
if(locator==NULL) {
IFXG(sv_sqlcode) = SQLCODE;
EXEC SQL DEALLOCATE DESCRIPTOR :descrpid;
break;
case TYPE_CHAR:
- len=php_intifx_get_char((int)((*tmp)->value.lval),&EG(regular_list),&char_tmp);
+ len=php_intifx_get_char((int)((*tmp)->value.lval),&EG(regular_list),&char_tmp TSRMLS_CC);
indicator=0;
if(char_tmp==NULL || len<0) {
indicator=-1;
int bid = 0;
if(fieldtype==SQLTEXT) {
bid=php_intifx_create_blob(TYPE_BLTEXT,BLMODE_INMEM,"",-1,&EG(regular_list));
- locator=php_intifx_get_blobloc(bid,&EG(regular_list));
+ locator=php_intifx_get_blobloc(bid,&EG(regular_list) TSRMLS_CC);
EXEC SQL SET DESCRIPTOR :descrpid VALUE :i DATA = :*locator;
}
if(fieldtype==SQLBYTES) {
if(IFXG(blobinfile)==0) {
bid=php_intifx_create_blob(TYPE_BLBYTE,BLMODE_INMEM,"",-1,&EG(regular_list));
- locator=php_intifx_get_blobloc(bid,&EG(regular_list));
+ locator=php_intifx_get_blobloc(bid,&EG(regular_list) TSRMLS_CC);
} else {
blobfilename=php_intifx_create_tmpfile(i);
bid=php_intifx_create_blob(TYPE_BLBYTE,BLMODE_INFILE, blobfilename,strlen(blobfilename),&EG(regular_list));
- locator=php_intifx_get_blobloc(bid,&EG(regular_list));
+ locator=php_intifx_get_blobloc(bid,&EG(regular_list) TSRMLS_CC);
locator->loc_oflags=LOC_WONLY;
}
EXEC SQL SET DESCRIPTOR :descrpid VALUE :i DATA = :*locator;
$ifdef HAVE_IFX_IUS;
if(fieldtype==SQLUDTFIXED) {
bid=php_intifxus_new_slob(&EG(regular_list));
- slocator=php_intifxus_get_slobloc(bid,&EG(regular_list));
+ slocator=php_intifxus_get_slobloc(bid,&EG(regular_list) TSRMLS_CC);
EXEC SQL SET DESCRIPTOR :descrpid VALUE :i DATA = :*slocator;
}
$endif;
int cursoryproc;
int argc=ZEND_NUM_ARGS();
long ifx_type;
- IFXLS_FETCH();
if(argc < 2 || zend_get_parameters_ex(argc, &query, &ifx_link, &dummy, &dummy)==FAILURE) {
WRONG_PARAM_COUNT;
EXEC SQL SET DESCRIPTOR :descrpid COUNT = :i;
}
- ifx_type=php_intifx_getType((int)(*tmp)->value.lval,&EG(regular_list));
+ ifx_type=php_intifx_getType((int)(*tmp)->value.lval,&EG(regular_list) TSRMLS_CC);
switch(ifx_type) {
case TYPE_BLTEXT:
case TYPE_BLBYTE:
- locator=php_intifx_get_blobloc((int)((*tmp)->value.lval),&EG(regular_list));
+ locator=php_intifx_get_blobloc((int)((*tmp)->value.lval),&EG(regular_list) TSRMLS_CC);
if(locator==NULL) {
IFXG(sv_sqlcode) = SQLCODE;
EXEC SQL DEALLOCATE DESCRIPTOR :descrpid;
EXEC SQL SET DESCRIPTOR :descrpid VALUE :i DATA= :*locator, TYPE=:loc_t_type;
break;
case TYPE_CHAR:
- len=php_intifx_get_char((int)((*tmp)->value.lval),&EG(regular_list),&char_tmp);
+ len=php_intifx_get_char((int)((*tmp)->value.lval),&EG(regular_list),&char_tmp TSRMLS_CC);
indicator=0;
if(char_tmp==NULL || len < 0) {
int locind;
char *blobfilename;
- IFXLS_FETCH();
if(ZEND_NUM_ARGS() != 1 || (zend_get_parameters_ex(1, &result)==FAILURE)) {
WRONG_PARAM_COUNT;
int bid = 0;
if(fieldtype==SQLTEXT) {
bid=php_intifx_create_blob(TYPE_BLTEXT,BLMODE_INMEM,"",-1,&EG(regular_list));
- locator=php_intifx_get_blobloc(bid,&EG(regular_list));
+ locator=php_intifx_get_blobloc(bid,&EG(regular_list) TSRMLS_CC);
EXEC SQL SET DESCRIPTOR :descrpid VALUE :i DATA = :*locator;
}
if(fieldtype==SQLBYTES) {
if(IFXG(blobinfile)==0) {
bid=php_intifx_create_blob(TYPE_BLBYTE,BLMODE_INMEM,"",-1,&EG(regular_list));
- locator=php_intifx_get_blobloc(bid,&EG(regular_list));
+ locator=php_intifx_get_blobloc(bid,&EG(regular_list) TSRMLS_CC);
} else {
blobfilename=php_intifx_create_tmpfile(i);
bid=php_intifx_create_blob(TYPE_BLBYTE,BLMODE_INFILE,blobfilename,strlen(blobfilename),&EG(regular_list));
- locator=php_intifx_get_blobloc(bid,&EG(regular_list));
+ locator=php_intifx_get_blobloc(bid,&EG(regular_list) TSRMLS_CC);
locator->loc_oflags=LOC_WONLY;
}
EXEC SQL SET DESCRIPTOR :descrpid VALUE :i DATA = :*locator;
$ifdef HAVE_IFX_IUS;
if(fieldtype==SQLUDTFIXED) {
bid=php_intifxus_new_slob(&EG(regular_list));
- slocator=php_intifxus_get_slobloc(bid,&EG(regular_list));
+ slocator=php_intifxus_get_slobloc(bid,&EG(regular_list) TSRMLS_CC);
EXEC SQL SET DESCRIPTOR :descrpid VALUE :i DATA = :*slocator;
}
$endif;
{
zval **ifx_link;
int id;
- IFXLS_FETCH();
switch(ZEND_NUM_ARGS()) {
case 0:
int msglen, maxmsglen;
char *ifx_errmsg;
char * returnmsg;
- IFXLS_FETCH();
switch(ZEND_NUM_ARGS()) {
case 0:
{
zval **result;
IFX_RES *Ifx_Result;
- IFXLS_FETCH();
if (ZEND_NUM_ARGS() != 1 || (zend_get_parameters_ex(1, &result))==FAILURE) {
WRONG_PARAM_COUNT;
char *blobfilename;
char *fetch_pos;
char *nullstr;
- IFXLS_FETCH();
switch(ZEND_NUM_ARGS()) {
case 1:
if( (IFXG(textasvarchar)==0 && fieldtype==SQLTEXT) ||
(IFXG(byteasvarchar)==0 && fieldtype==SQLBYTES)) {
bid_b=Ifx_Result->res_id[locind];
- bid=php_intifx_copy_blob(bid_b, &EG(regular_list));
- php_intifx_update_blob(bid,nullstr,strlen(nullstr),&EG(regular_list));
+ bid=php_intifx_copy_blob(bid_b, &EG(regular_list) TSRMLS_CC);
+ php_intifx_update_blob(bid,nullstr,strlen(nullstr),&EG(regular_list) TSRMLS_CC);
add_assoc_long(return_value,fieldname,bid);
++locind;
continue;
bid_b=Ifx_Result->res_id[locind];
add_assoc_long(return_value,fieldname,bid_b);
bid=php_intifxus_new_slob(&EG(regular_list));
- slocator=php_intifxus_get_slobloc(bid,&EG(regular_list));
+ slocator=php_intifxus_get_slobloc(bid,&EG(regular_list) TSRMLS_CC);
EXEC SQL SET DESCRIPTOR :descrpid VALUE :i DATA = :*slocator;
Ifx_Result->res_id[locind]=bid;
++locind;
case SQLBYTES :
case SQLTEXT :
bid_b=Ifx_Result->res_id[locind];
- locator_b=php_intifx_get_blobloc(bid_b,&EG(regular_list));
+ locator_b=php_intifx_get_blobloc(bid_b,&EG(regular_list) TSRMLS_CC);
++locind;
EXEC SQL GET DESCRIPTOR :descrpid VALUE :i :*locator_b = DATA;
if((IFXG(textasvarchar)==0 && fieldtype==SQLTEXT)
|| (IFXG(byteasvarchar)==0 && fieldtype==SQLBYTES)) {
bid_b=Ifx_Result->res_id[locind];
- bid=php_intifx_copy_blob(bid_b, &EG(regular_list));
- php_intifx_update_blob(bid,nullstr,strlen(nullstr),&EG(regular_list));
+ bid=php_intifx_copy_blob(bid_b, &EG(regular_list) TSRMLS_CC);
+ php_intifx_update_blob(bid,nullstr,strlen(nullstr),&EG(regular_list) TSRMLS_CC);
add_assoc_long(return_value,fieldname,bid);
break;
}
}
/* copy blob */
- bid=php_intifx_copy_blob(bid_b, &EG(regular_list));
+ bid=php_intifx_copy_blob(bid_b, &EG(regular_list) TSRMLS_CC);
/* and generate new tempfile for next row */
if(locator_b->loc_loctype==LOCFNAME) {
blobfilename=php_intifx_create_tmpfile(bid_b);
- php_intifx_update_blob(bid_b,blobfilename,strlen(blobfilename),&EG(regular_list));
+ php_intifx_update_blob(bid_b,blobfilename,strlen(blobfilename),&EG(regular_list) TSRMLS_CC);
efree(blobfilename);
EXEC SQL SET DESCRIPTOR :descrpid VALUE :i DATA= :*locator_b;
}
char *content;
long lg;
- lg=php_intifx_get_blob(bid, &EG(regular_list), &content);
+ lg=php_intifx_get_blob(bid, &EG(regular_list), &content TSRMLS_CC);
if(content == NULL || lg < 0) {
add_assoc_string(return_value,fieldname,nullstr,DUP);
} else {
add_assoc_stringl(return_value,fieldname,content,lg,DUP);
}
- php_intifx_free_blob(bid, &EG(regular_list));
+ php_intifx_free_blob(bid, &EG(regular_list) TSRMLS_CC);
break;
}
char *table_options;
int moredata;
- IFXLS_FETCH();
-
switch (ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &result)==FAILURE) {
/* if blobinbfile, too bad */
bid_b=Ifx_Result->res_id[locind];
++locind;
- locator_b=php_intifx_get_blobloc(bid_b,&EG(regular_list));
+ locator_b=php_intifx_get_blobloc(bid_b,&EG(regular_list) TSRMLS_CC);
EXEC SQL GET DESCRIPTOR :descrpid VALUE :i :*locator_b = DATA;
/* work around for ESQL/C bug with NULL values and BLOBS */
}
/* get blob contents */
- lg=php_intifx_get_blob(bid_b, &EG(regular_list), &content);
+ lg=php_intifx_get_blob(bid_b, &EG(regular_list), &content TSRMLS_CC);
if(content==NULL || lg<0) {
php_printf("<td>%s</td>", nullstr);
EXEC SQL END DECLARE SECTION;
int num_fields;
char *p;
- IFXLS_FETCH();
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &result)==FAILURE) {
WRONG_PARAM_COUNT;
int num_fields;
char string_data[256];
char *p;
- IFXLS_FETCH();
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &result)==FAILURE) {
WRONG_PARAM_COUNT;
{
zval **result;
IFX_RES *Ifx_Result;
- IFXLS_FETCH();
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &result)==FAILURE) {
WRONG_PARAM_COUNT;
Returns the sqlerrd[] fields of the sqlca struct for query resultid */
PHP_FUNCTION(ifx_getsqlca)
{
- zval **result;
+ zval **result;
IFX_RES *Ifx_Result;
char fieldname[16];
int e;
- IFXLS_FETCH();
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &result)==FAILURE) {
WRONG_PARAM_COUNT;
{
zval **result;
IFX_RES *Ifx_Result;
- IFXLS_FETCH();
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &result)==FAILURE) {
WRONG_PARAM_COUNT;
EXEC SQL END DECLARE SECTION;
int i;
- IFXLS_FETCH();
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &result)==FAILURE) {
WRONG_PARAM_COUNT;
for (i = 0; i < MAX_RESID; ++i) {
if (Ifx_Result->res_id[i]>0) {
- php_intifx2_free_blob(Ifx_Result->res_id[i],&EG(regular_list));
+ php_intifx2_free_blob(Ifx_Result->res_id[i],&EG(regular_list) TSRMLS_CC);
Ifx_Result->res_id[i]=-1;
}
}
* return -1 on error otherwise the type: TYPE_BLTEXT, TYPE_BLBYTE, TYPE_SLOB
* ----------------------------------------------------------------------
*/
-static long php_intifx_getType(long id, HashTable *list)
+static long php_intifx_getType(long id, HashTable *list TSRMLS_DC)
{
IFX_IDRES *Ifx_res;
int type;
- IFXLS_FETCH();
-
Ifx_res = (IFX_IDRES *) zend_list_find(id,&type);
if (type!=le_idresult) {
php_error(E_WARNING,"%d is not a Informix id-result index", id);
static long php_intifx_create_blob(long type, long mode, char* param, long len, HashTable *list)
{
IFX_IDRES *Ifx_blob;
- IFXLS_FETCH();
Ifx_blob=emalloc(sizeof(IFX_IDRES));
if(Ifx_blob==NULL) {
}
convert_to_long(pbid);
- newid=php_intifx_copy_blob(Z_LVAL_P(pbid),&EG(regular_list));
+ newid=php_intifx_copy_blob(Z_LVAL_P(pbid),&EG(regular_list) TSRMLS_CC);
if(newid<0) {
RETURN_FALSE;
}
* return -1 on error otherwise the new Blob-Object-id
* ----------------------------------------------------------------------
*/
-static long php_intifx_copy_blob(long bid, HashTable *list)
+static long php_intifx_copy_blob(long bid, HashTable *list TSRMLS_DC)
{
IFX_IDRES *Ifx_blob, *Ifx_blob_orig;
loc_t *locator, *locator_orig;
int type;
- IFXLS_FETCH();
Ifx_blob_orig = (IFX_IDRES *) zend_list_find(bid,&type);
if (type!=le_idresult || !(Ifx_blob_orig->type==TYPE_BLBYTE || Ifx_blob_orig->type==TYPE_BLTEXT)) {
}
convert_to_long(pid);
- ret=php_intifx_free_blob(pid->value.lval,&EG(regular_list));
+ ret=php_intifx_free_blob(pid->value.lval,&EG(regular_list) TSRMLS_CC);
if(ret<0) {
RETURN_FALSE;
}
* FREES BYTE-MEMORY WITH EFREE()
* ----------------------------------------------------------------------
*/
-static long php_intifx_free_blob(long bid, HashTable *list)
+static long php_intifx_free_blob(long bid, HashTable *list TSRMLS_DC)
{
IFX_IDRES *Ifx_blob;
int type;
- IFXLS_FETCH();
Ifx_blob = (IFX_IDRES *) zend_list_find(bid,&type);
if (type!=le_idresult && !(Ifx_blob->type==TYPE_BLTEXT || Ifx_blob->type==TYPE_BLBYTE)) {
* use this for freeing blob-source after select (in ifx_free_result)
* ----------------------------------------------------------------------
*/
-static long php_intifx2_free_blob(long bid, HashTable *list)
+static long php_intifx2_free_blob(long bid, HashTable *list TSRMLS_DC)
{
- IFX_IDRES *Ifx_blob;
+ IFX_IDRES *Ifx_blob;
int type;
- IFXLS_FETCH();
Ifx_blob = (IFX_IDRES *) zend_list_find(bid,&type);
if (type!=le_idresult && !(Ifx_blob->type==TYPE_BLTEXT || Ifx_blob->type==TYPE_BLBYTE)) {
}
convert_to_long(pbid);
- len=php_intifx_get_blob(pbid->value.lval,&EG(regular_list),&content);
+ len=php_intifx_get_blob(pbid->value.lval,&EG(regular_list),&content TSRMLS_CC);
if(content==NULL || len<0) {
RETURN_STRING(php_intifx_null(),1);
}
* returns the pointer to the content in char** content and the amount of content in bytes
* ----------------------------------------------------------------------
*/
-static long php_intifx_get_blob(long bid, HashTable *list, char** content)
+static long php_intifx_get_blob(long bid, HashTable *list, char** content TSRMLS_DC)
{
IFX_IDRES *Ifx_blob;
int type;
- IFXLS_FETCH();
Ifx_blob = (IFX_IDRES *) zend_list_find(bid,&type);
if (type!=le_idresult && !(Ifx_blob->type==TYPE_BLTEXT || Ifx_blob->type==TYPE_BLBYTE)) {
* return NULL on error or the pointer to the locator-structur
* ----------------------------------------------------------------------
*/
-static loc_t *php_intifx_get_blobloc(long bid, HashTable *list)
+static loc_t *php_intifx_get_blobloc(long bid, HashTable *list TSRMLS_DC)
{
IFX_IDRES *Ifx_blob;
int type;
- IFXLS_FETCH();
Ifx_blob = (IFX_IDRES *) zend_list_find(bid,&type);
if (type!=le_idresult && !(Ifx_blob->type==TYPE_BLTEXT || Ifx_blob->type==TYPE_BLBYTE)) {
convert_to_long(pbid);
convert_to_string(pparam);
- if(php_intifx_update_blob(Z_LVAL_P(pbid),Z_STRVAL_P(pparam),Z_STRLEN_P(pparam), &EG(regular_list)) < 0) {
+ if(php_intifx_update_blob(Z_LVAL_P(pbid),Z_STRVAL_P(pparam),Z_STRLEN_P(pparam), &EG(regular_list) TSRMLS_CC) < 0) {
RETURN_FALSE;
}
RETURN_TRUE;
* return nothing
* ----------------------------------------------------------------------
*/
-static long php_intifx_update_blob(long bid, char* param, long len, HashTable *list)
+static long php_intifx_update_blob(long bid, char* param, long len, HashTable *list TSRMLS_DC)
{
IFX_IDRES *Ifx_blob;
int type;
- IFXLS_FETCH();
Ifx_blob = (IFX_IDRES *) zend_list_find(bid,&type);
if (type!=le_idresult && !(Ifx_blob->type==TYPE_BLTEXT || Ifx_blob->type==TYPE_BLBYTE)) {
PHP_FUNCTION(ifx_blobinfile_mode)
{
zval *pmode;
- IFXLS_FETCH();
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &pmode)==FAILURE) {
WRONG_PARAM_COUNT;
PHP_FUNCTION(ifx_textasvarchar)
{
zval *pmode;
- IFXLS_FETCH();
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &pmode)==FAILURE) {
WRONG_PARAM_COUNT;
PHP_FUNCTION(ifx_byteasvarchar)
{
zval *pmode;
- IFXLS_FETCH();
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &pmode)==FAILURE) {
WRONG_PARAM_COUNT;
PHP_FUNCTION(ifx_nullformat)
{
zval *pmode;
- IFXLS_FETCH();
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &pmode)==FAILURE) {
WRONG_PARAM_COUNT;
static char* php_intifx_null()
{
char* tmp;
- IFXLS_FETCH();
-
+ TSRMLS_FETCH();
+
if(IFXG(nullformat)==0) {
tmp=IFXG(nullvalue);
} else {
static long php_intifx_create_char(char* param, long len, HashTable *list)
{
IFX_IDRES *Ifx_char;
- IFXLS_FETCH();
Ifx_char=emalloc(sizeof(IFX_IDRES));
if(Ifx_char==NULL) {
}
convert_to_long(pbid);
- len=php_intifx_get_char(Z_LVAL_P(pbid),&EG(regular_list),&content);
+ len=php_intifx_get_char(Z_LVAL_P(pbid),&EG(regular_list),&content TSRMLS_CC);
if(content==NULL || len < 0) {
RETURN_STRING("",1);
}
* returns the pointer to the content in char** content and the amount of content in bytes
* ----------------------------------------------------------------------
*/
-static long php_intifx_get_char(long bid, HashTable *list, char** content)
+static long php_intifx_get_char(long bid, HashTable *list, char** content TSRMLS_DC)
{
IFX_IDRES *Ifx_char;
int type;
- IFXLS_FETCH();
Ifx_char = (IFX_IDRES *) zend_list_find(bid,&type);
if (type!=le_idresult && !(Ifx_char->type==TYPE_CHAR)) {
}
convert_to_long(pid);
- if(php_intifx_free_char(Z_LVAL_P(pid),&EG(regular_list)) < 0) {
+ if(php_intifx_free_char(Z_LVAL_P(pid),&EG(regular_list) TSRMLS_CC) < 0) {
RETURN_FALSE;
}
RETURN_TRUE;
* return -1 on error otherwise 0
* ----------------------------------------------------------------------
*/
-static long php_intifx_free_char(long bid, HashTable *list)
+static long php_intifx_free_char(long bid, HashTable *list TSRMLS_DC)
{
IFX_IDRES *Ifx_char;
int type;
- IFXLS_FETCH();
Ifx_char = (IFX_IDRES *) zend_list_find(bid,&type);
if (type!=le_idresult && !(Ifx_char->type==TYPE_CHAR)) {
convert_to_long(pbid);
convert_to_string(pparam);
- if(php_intifx_update_char(Z_LVAL_P(pbid),Z_STRVAL_P(pparam),Z_STRLEN_P(pparam),&EG(regular_list)) < 0) {
+ if(php_intifx_update_char(Z_LVAL_P(pbid),Z_STRVAL_P(pparam),Z_STRLEN_P(pparam),&EG(regular_list) TSRMLS_CC) < 0) {
RETURN_FALSE;
}
RETURN_TRUE;
* return nothing
* ----------------------------------------------------------------------
*/
-static long php_intifx_update_char(long bid, char* param, long len, HashTable *list)
+static long php_intifx_update_char(long bid, char* param, long len, HashTable *list TSRMLS_DC)
{
IFX_IDRES *Ifx_char;
int type;
- IFXLS_FETCH();
Ifx_char = (IFX_IDRES *) zend_list_find(bid,&type);
if (type!=le_idresult && !(Ifx_char->type==TYPE_CHAR)) {
}
convert_to_long(pid);
- if(php_intifxus_free_slob(Z_LVAL_P(pid),&EG(regular_list)) < 0) {
+ if(php_intifxus_free_slob(Z_LVAL_P(pid),&EG(regular_list) TSRMLS_CC) < 0) {
RETURN_FALSE;
}
RETURN_TRUE;
* return -1 on error otherwise 0
* ----------------------------------------------------------------------
*/
-static long php_intifxus_free_slob(long bid, HashTable *list)
+static long php_intifxus_free_slob(long bid, HashTable *list TSRMLS_DC)
{
IFX_IDRES *Ifx_slob;
int type;
- IFXLS_FETCH();
- TSRMLS_FETCH();
Ifx_slob = (IFX_IDRES *) zend_list_find(bid,&type);
if (type!=le_idresult || Ifx_slob->type!=TYPE_SLOB) {
return -1;
}
- if(php_intifxus_close_slob(bid, &EG(regular_list)) < 0) {
+ if(php_intifxus_close_slob(bid, &EG(regular_list) TSRMLS_CC) < 0) {
return -1;
}
WRONG_PARAM_COUNT;
}
convert_to_long(pid);
- if(php_intifxus_close_slob(Z_LVAL_P(pid),&EG(regular_list)) < 0) {
+ if(php_intifxus_close_slob(Z_LVAL_P(pid),&EG(regular_list) TSRMLS_CC) < 0) {
RETURN_FALSE;
}
RETURN_TRUE;
* return -1 on error otherwise 0
* ----------------------------------------------------------------------
*/
-static long php_intifxus_close_slob(long bid, HashTable *list)
+static long php_intifxus_close_slob(long bid, HashTable *list TSRMLS_DC)
{
IFX_IDRES *Ifx_slob;
int type;
- IFXLS_FETCH();
Ifx_slob = (IFX_IDRES *) zend_list_find(bid,&type);
if (type!=le_idresult || Ifx_slob->type!=TYPE_SLOB) {
if((mode&32) !=0)
create_mode|=LO_NOBUFFER;
- RETURN_LONG(php_intifxus_open_slob(Z_LVAL_P(pbid),create_mode,&EG(regular_list)));
+ RETURN_LONG(php_intifxus_open_slob(Z_LVAL_P(pbid),create_mode,&EG(regular_list) TSRMLS_CC));
}
/* }}} */
* return -1 on error otherwise the new Blob-Object-id
* ----------------------------------------------------------------------
*/
-static long php_intifxus_open_slob(long bid, long create_mode, HashTable *list)
+static long php_intifxus_open_slob(long bid, long create_mode, HashTable *list TSRMLS_DC)
{
IFX_IDRES *Ifx_slob;
int errcode;
int type;
- IFXLS_FETCH();
Ifx_slob = (IFX_IDRES *) zend_list_find(bid,&type);
if (type!=le_idresult || Ifx_slob->type!=TYPE_SLOB) {
static long php_intifxus_new_slob(HashTable *list)
{
IFX_IDRES *Ifx_slob;
- IFXLS_FETCH();
Ifx_slob=emalloc(sizeof(IFX_IDRES));
if(Ifx_slob==NULL) {
* return -1 on error otherwise the new Blob-Object-id
* ----------------------------------------------------------------------
*/
-static ifx_lo_t *php_intifxus_get_slobloc(long bid, HashTable *list)
+static ifx_lo_t *php_intifxus_get_slobloc(long bid, HashTable *list TSRMLS_DC)
{
IFX_IDRES *Ifx_slob;
int type;
- IFXLS_FETCH();
Ifx_slob = (IFX_IDRES *) zend_list_find(bid,&type);
if (type!=le_idresult || Ifx_slob->type!=TYPE_SLOB) {
ifx_int8_t akt_seek_pos;
int type;
long lakt_seek_pos;
- IFXLS_FETCH();
if (ZEND_NUM_ARGS()!=1 || getParameters(ht, 1, &pbid)==FAILURE) {
WRONG_PARAM_COUNT;
IFX_IDRES *Ifx_slob;
ifx_int8_t akt_seek_pos,offset;
int type,mode;
- IFXLS_FETCH();
if (ZEND_NUM_ARGS()!=3 || getParameters(ht, 3, &pbid, &pmode, &poffset)==FAILURE) {
WRONG_PARAM_COUNT;
IFX_IDRES *Ifx_slob;
int errcode,type;
char *buffer;
- IFXLS_FETCH();
if (ZEND_NUM_ARGS()!=2 || getParameters(ht, 2, &pbid, &pnbytes)==FAILURE) {
WRONG_PARAM_COUNT;
IFX_IDRES *Ifx_slob;
int errcode,type;
char *buffer;
- IFXLS_FETCH();
if (ZEND_NUM_ARGS()!=2 || getParameters(ht, 2, &pbid, &pcontent)==FAILURE) {
WRONG_PARAM_COUNT;