cvs: php4 /ext/sybase_ct php_sybase_ct.c
| From: | Joey Smith | Date: | Sun, 10 Sep 2000 05:24:30 +0000 |
| Subject: | cvs: php4 /ext/sybase_ct php_sybase_ct.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-1676@lists.php.net to get a copy of this message | ||
joey Sat Sep 9 22:24:30 2000 EDT
Modified files:
/php4/ext/sybase_ct php_sybase_ct.c
Log:
@- Updated sybase_ct module and its sybase_query to use high performance API.
(sybase_query) Use high performance API in sybase_query. Will work on the others later.
Index: php4/ext/sybase_ct/php_sybase_ct.c
diff -u php4/ext/sybase_ct/php_sybase_ct.c:1.28 php4/ext/sybase_ct/php_sybase_ct.c:1.29
--- php4/ext/sybase_ct/php_sybase_ct.c:1.28 Sat Sep 9 22:13:56 2000
+++ php4/ext/sybase_ct/php_sybase_ct.c Sat Sep 9 22:24:30 2000
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_sybase_ct.c,v 1.28 2000/09/10 05:13:56 joey Exp $ */
+/* $Id: php_sybase_ct.c,v 1.29 2000/09/10 05:24:30 joey Exp $ */
#include "php.h"
@@ -933,7 +933,7 @@
PHP_FUNCTION(sybase_query)
{
- pval *query,*sybase_link_index;
+ pval **query, **sybase_link_index;
int id;
sybase_link *sybase_ptr;
sybase_result *result;
@@ -947,13 +947,13 @@
switch(ZEND_NUM_ARGS()) {
case 1:
- if (getParameters(ht, 1, &query)==FAILURE) {
+ if (zend_get_parameters_ex(1, &query)==FAILURE) {
RETURN_FALSE;
}
id = sybase_globals.default_link;
break;
case 2:
- if (getParameters(ht, 2, &query, &sybase_link_index)==FAILURE) {
+ if (zend_get_parameters_ex(2, &query, &sybase_link_index)==FAILURE) {
RETURN_FALSE;
}
id = -1;
@@ -963,9 +963,9 @@
break;
}
- ZEND_FETCH_RESOURCE2(sybase_ptr, sybase_link *, &sybase_link_index, id,
"Sybase-Link", sybase_globals.le_link, sybase_globals.le_plink);
+ ZEND_FETCH_RESOURCE2(sybase_ptr, sybase_link *, sybase_link_index, id, "Sybase-Link",
sybase_globals.le_link, sybase_globals.le_plink);
- convert_to_string(query);
+ convert_to_string_ex(query);
/* Fail if we already marked this connection dead. */
@@ -983,7 +983,7 @@
/* On Solaris 11.5, ct_command() can be moved outside the
* loop, but not on Linux 11.0.
*/
- if (ct_command(sybase_ptr->cmd, CS_LANG_CMD, query->value.str.val, CS_NULLTERM,
CS_UNUSED)!=CS_SUCCEED) {
+ if (ct_command(sybase_ptr->cmd, CS_LANG_CMD, (*query)->value.str.val, CS_NULLTERM,
CS_UNUSED)!=CS_SUCCEED) {
/* If this didn't work, the connection is screwed but
* ct-lib might not set CS_CONSTAT_DEAD. So set our own
* flag. This happens sometimes when the database is restarted