cvs: php-src /ext/odbc php_odbc.c

From: Date: Fri, 13 Aug 2004 19:33:25 +0000
Subject: cvs: php-src /ext/odbc php_odbc.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-28337@lists.php.net to get a copy of this message
kalowsky Fri Aug 13 15:33:25 2004 EDT Modified files: /php-src/ext/odbc php_odbc.c Log: Checking in a patch by Dave Lawson (dlawson@masterytech.com) to correct some of the behavior found in the odbc_fetch_*() functions. This patch NEEDS to be tested on MS Access before a release is done with it. This submission is to get it into the daily builds for testing. http://cvs.php.net/diff.php/php-src/ext/odbc/php_odbc.c?r1=1.180&r2=1.181&ty=u Index: php-src/ext/odbc/php_odbc.c diff -u php-src/ext/odbc/php_odbc.c:1.180 php-src/ext/odbc/php_odbc.c:1.181 --- php-src/ext/odbc/php_odbc.c:1.180 Mon Jul 19 03:19:41 2004 +++ php-src/ext/odbc/php_odbc.c Fri Aug 13 15:33:24 2004 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_odbc.c,v 1.180 2004/07/19 07:19:41 andi Exp $ */ +/* $Id: php_odbc.c,v 1.181 2004/08/13 19:33:24 kalowsky Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -846,7 +846,7 @@ convert_to_string_ex(pv_query); query = Z_STRVAL_PP(pv_query); - result = (odbc_result *)emalloc(sizeof(odbc_result)); + result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); result->numparams = 0; @@ -1269,7 +1269,7 @@ convert_to_string_ex(pv_query); query = Z_STRVAL_PP(pv_query); - result = (odbc_result *)emalloc(sizeof(odbc_result)); + result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); rc = SQLAllocStmt(conn->hdbc, &(result->stmt)); if (rc == SQL_INVALID_HANDLE) { @@ -2797,7 +2797,7 @@ ZEND_FETCH_RESOURCE2(conn, odbc_connection *, pv_conn, -1, "ODBC-Link", le_conn, le_pconn); - result = (odbc_result *)emalloc(sizeof(odbc_result)); + result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); rc = SQLAllocStmt(conn->hdbc, &(result->stmt)); if (rc == SQL_INVALID_HANDLE) { @@ -2881,7 +2881,7 @@ ZEND_FETCH_RESOURCE2(conn, odbc_connection *, pv_conn, -1, "ODBC-Link", le_conn, le_pconn); - result = (odbc_result *)emalloc(sizeof(odbc_result)); + result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); rc = SQLAllocStmt(conn->hdbc, &(result->stmt)); if (rc == SQL_INVALID_HANDLE) { @@ -2961,7 +2961,7 @@ ZEND_FETCH_RESOURCE2(conn, odbc_connection *, pv_conn, -1, "ODBC-Link", le_conn, le_pconn); - result = (odbc_result *)emalloc(sizeof(odbc_result)); + result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); rc = SQLAllocStmt(conn->hdbc, &(result->stmt)); if (rc == SQL_INVALID_HANDLE) { @@ -3038,7 +3038,7 @@ fschema = Z_STRVAL_PP(pv_fschema); convert_to_string_ex(pv_ftable); ftable = Z_STRVAL_PP(pv_ftable); -#if defined(HAVE_DBMAKER) || defined (HAVE_IBMDB2) +#if defined(HAVE_DBMAKER) || defined(HAVE_IBMDB2) #define EMPTY_TO_NULL(xstr) \ if ((int)strlen((xstr)) == 0) (xstr) = NULL @@ -3055,7 +3055,7 @@ ZEND_FETCH_RESOURCE2(conn, odbc_connection *, pv_conn, -1, "ODBC-Link", le_conn, le_pconn); - result = (odbc_result *)emalloc(sizeof(odbc_result)); + result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); rc = SQLAllocStmt(conn->hdbc, &(result->stmt)); if (rc == SQL_INVALID_HANDLE) { @@ -3130,7 +3130,7 @@ ZEND_FETCH_RESOURCE2(conn, odbc_connection *, pv_conn, -1, "ODBC-Link", le_conn, le_pconn); - result = (odbc_result *)emalloc(sizeof(odbc_result)); + result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); rc = SQLAllocStmt(conn->hdbc, &(result->stmt)); if (rc == SQL_INVALID_HANDLE) { @@ -3198,7 +3198,7 @@ ZEND_FETCH_RESOURCE2(conn, odbc_connection *, pv_conn, -1, "ODBC-Link", le_conn, le_pconn); - result = (odbc_result *)emalloc(sizeof(odbc_result)); + result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); rc = SQLAllocStmt(conn->hdbc, &(result->stmt)); if (rc == SQL_INVALID_HANDLE) { @@ -3276,7 +3276,7 @@ ZEND_FETCH_RESOURCE2(conn, odbc_connection *, pv_conn, -1, "ODBC-Link", le_conn, le_pconn); - result = (odbc_result *)emalloc(sizeof(odbc_result)); + result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); rc = SQLAllocStmt(conn->hdbc, &(result->stmt)); if (rc == SQL_INVALID_HANDLE) { @@ -3354,7 +3354,7 @@ ZEND_FETCH_RESOURCE2(conn, odbc_connection *, pv_conn, -1, "ODBC-Link", le_conn, le_pconn); - result = (odbc_result *)emalloc(sizeof(odbc_result)); + result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); rc = SQLAllocStmt(conn->hdbc, &(result->stmt)); if (rc == SQL_INVALID_HANDLE) { @@ -3436,7 +3436,7 @@ ZEND_FETCH_RESOURCE2(conn, odbc_connection *, pv_conn, -1, "ODBC-Link", le_conn, le_pconn); - result = (odbc_result *)emalloc(sizeof(odbc_result)); + result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); rc = SQLAllocStmt(conn->hdbc, &(result->stmt)); if (rc == SQL_INVALID_HANDLE) { @@ -3517,7 +3517,7 @@ ZEND_FETCH_RESOURCE2(conn, odbc_connection *, pv_conn, -1, "ODBC-Link", le_conn, le_pconn); - result = (odbc_result *)emalloc(sizeof(odbc_result)); + result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); rc = SQLAllocStmt(conn->hdbc, &(result->stmt)); if (rc == SQL_INVALID_HANDLE) { @@ -3591,7 +3591,7 @@ ZEND_FETCH_RESOURCE2(conn, odbc_connection *, pv_conn, -1, "ODBC-Link", le_conn, le_pconn); - result = (odbc_result *)emalloc(sizeof(odbc_result)); + result = (odbc_result *)ecalloc(1, sizeof(odbc_result)); rc = SQLAllocStmt(conn->hdbc, &(result->stmt)); if (rc == SQL_INVALID_HANDLE) {

« previous php.cvs (#28337) next »