abies Sun Aug 17 12:30:15 2003 EDT
Modified files:
/php-src/ext/interbase interbase.c
Log:
Simplify previous fix
Index: php-src/ext/interbase/interbase.c
diff -u php-src/ext/interbase/interbase.c:1.151 php-src/ext/interbase/interbase.c:1.152
--- php-src/ext/interbase/interbase.c:1.151 Sun Aug 17 12:13:52 2003
+++ php-src/ext/interbase/interbase.c Sun Aug 17 12:30:15 2003
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: interbase.c,v 1.151 2003/08/17 16:13:52 abies Exp $ */
+/* $Id: interbase.c,v 1.152 2003/08/17 16:30:15 abies Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -262,7 +262,6 @@
#endif
} val;
short sqlind;
- void *allocated;
} BIND_BUF;
/* get blob identifier from argument
@@ -700,7 +699,7 @@
php_info_print_table_start();
php_info_print_table_row(2, "Interbase Support", "enabled");
- php_info_print_table_row(2, "Revision", "$Revision: 1.151 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.152 $");
#ifdef COMPILE_DL_INTERBASE
php_info_print_table_row(2, "Dynamic Module", "Yes");
#endif
@@ -1320,7 +1319,6 @@
for (i = 0; i < sqlda->sqld; var++, i++) { /* bound vars */
buf[i].sqlind = 0;
- buf[i].allocated = NULL;
var->sqlind = &buf[i].sqlind;
b_var = b_vars[i];
@@ -1486,8 +1484,8 @@
_php_ibase_error(TSRMLS_C);
return FAILURE;
}
- buf[i].allocated = var->sqldata = (void
ISC_FAR *) emalloc(sizeof(ISC_QUAD));
- *(ISC_QUAD ISC_FAR *) var->sqldata =
ib_blob.bl_qd;
+ buf[i].val.qval = ib_blob.bl_qd;
+ var->sqldata = (void ISC_FAR *)
&buf[i].val.qval;
} else {
var->sqldata = (void ISC_FAR *)
&((ibase_blob_handle *) Z_STRVAL_P(b_var))->bl_qd;
@@ -1727,17 +1725,8 @@
if (in_sqlda) {
efree(in_sqlda);
}
- if (bind_buf) {
- int i;
-
- /* free memory allocated in binding stage */
- for (i = 0; i < ib_query->in_sqlda->sqld; ++i) {
- if (bind_buf[i].allocated != NULL) {
- efree(bind_buf[i].allocated);
- }
- }
+ if (bind_buf)
efree(bind_buf);
- }
if (rv == FAILURE) {
if (IB_RESULT) {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php