CVS update: php3/functions
| From: | shane | Date: | Mon, 05 Oct 1998 14:46:49 +0000 |
| Subject: | CVS update: php3/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-1676@lists.php.net to get a copy of this message | ||
Date: Monday October 5, 1998 @ 10:46
Author: shane
Update of /repository/php3/functions
In directory asf:/u2/tmp/cvs-serv12001/functions
Modified Files:
oracle.c
Added Files:
oracle_hack.c
Log Message:
a windows hack to get oracle compilable and working as a dll. Is there some other way to handle the
stuff that uses symbol_table in this extension, or should we make some regular api to handle this.
Index: php3/functions/oracle.c
diff -c php3/functions/oracle.c:1.81 php3/functions/oracle.c:1.82
*** php3/functions/oracle.c:1.81 Sun Oct 4 16:27:00 1998
--- php3/functions/oracle.c Mon Oct 5 10:46:48 1998
***************
*** 1574,1585 ****
--- 1574,1592 ----
return 1;
}
+ /* see oracle_hack.c */
+ extern PHPAPI HashTable *php3i_get_symbol_table(void);
+
int ora_set_param_values(oraCursor *cursor, int isout)
{
char *paramname;
oraParam *param;
pval *pdata;
int i, len;
+ #if (WIN32|WINNT)
+ /* see oracle_hack.c */
+ HashTable *symbol_table=php3i_get_symbol_table();
+ #endif
_php3_hash_internal_pointer_reset(cursor->params);
if(_php3_hash_num_elements(cursor->params) != cursor->nparams){
***************
*** 1601,1607 ****
--- 1608,1626 ----
if(isout){
/* XXX param->alen + 1 ?? */
if(param->type != 1 && param->alen > 0){
+ #if (WIN32|WINNT)
+ /* see oracle_hack.c */
+ {
+ pval var;
+ char *name=(paramname);
+ var.value.str.val = (param->progv);
+ var.value.str.len = (param->alen);
+ var.type = IS_STRING;
+ _php3_hash_update(symbol_table, name, strlen(name)+1, &var,
sizeof(pval),NULL);
+ }
+ #else
SET_VAR_STRINGL(paramname, param->progv, param->alen);
+ #endif
}
efree(paramname);
continue;
***************
*** 1611,1622 ****
}
/* FIXME Globals don't work in extensions on windows, have to do something
! else here */
if(_php3_hash_find(&GLOBAL(symbol_table), paramname, strlen(paramname) + 1, (void
**)&pdata) == FAILURE){
php3_error(E_WARNING, "Can't find variable for parameter");
efree(paramname);
return 0;
}
convert_to_string(pdata);
if(param->progvl <= pdata->value.str.len){
php3_error(E_NOTICE, "Input value will be truncated");
--- 1630,1649 ----
}
/* FIXME Globals don't work in extensions on windows, have to do something
! else here. See oracle_hack.c */
! #if (WIN32|WINNT)
! if(_php3_hash_find(symbol_table, paramname, strlen(paramname) + 1, (void **)&pdata) ==
FAILURE){
! php3_error(E_WARNING, "Can't find variable for parameter");
! efree(paramname);
! return 0;
! }
! #else
if(_php3_hash_find(&GLOBAL(symbol_table), paramname, strlen(paramname) + 1, (void
**)&pdata) == FAILURE){
php3_error(E_WARNING, "Can't find variable for parameter");
efree(paramname);
return 0;
}
+ #endif
convert_to_string(pdata);
if(param->progvl <= pdata->value.str.len){
php3_error(E_NOTICE, "Input value will be truncated");
--
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