stas            Tue Mar 13 00:04:38 2007 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/odbc   php_odbc.c php_odbc_includes.h 
  Log:
  fix odbc resource handling, patch by Dave Lawson
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/php_odbc.c?r1=1.189.2.4.2.6&r2=1.189.2.4.2.7&diff_format=u
Index: php-src/ext/odbc/php_odbc.c
diff -u php-src/ext/odbc/php_odbc.c:1.189.2.4.2.6 
php-src/ext/odbc/php_odbc.c:1.189.2.4.2.7
--- php-src/ext/odbc/php_odbc.c:1.189.2.4.2.6   Sat Feb 24 02:17:25 2007
+++ php-src/ext/odbc/php_odbc.c Tue Mar 13 00:04:38 2007
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_odbc.c,v 1.189.2.4.2.6 2007/02/24 02:17:25 helly Exp $ */
+/* $Id: php_odbc.c,v 1.189.2.4.2.7 2007/03/13 00:04:38 stas Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -915,11 +915,10 @@
        } else {
                result->values = NULL;
        }
-       result->id = zend_list_insert(result, le_result);       
        zend_list_addref(conn->id);
        result->conn_ptr = conn;
        result->fetched = 0;
-       RETURN_RESOURCE(result->id);
+       ZEND_REGISTER_RESOURCE(return_value, result, le_result);  
 }
 /* }}} */
 
@@ -1335,12 +1334,10 @@
        } else {
                result->values = NULL;
        }
-       result->id = zend_list_insert(result, le_result);
        zend_list_addref(conn->id);
        result->conn_ptr = conn;
        result->fetched = 0;
-       
-       RETURN_RESOURCE(result->id);
+       ZEND_REGISTER_RESOURCE(return_value, result, le_result);
 }
 /* }}} */
 
@@ -2044,7 +2041,7 @@
                result->values = NULL;
        }
                        
-       zend_list_delete(result->id);
+       zend_list_delete(Z_LVAL_PP(pv_res));
        
        RETURN_TRUE;
 }
http://cvs.php.net/viewvc.cgi/php-src/ext/odbc/php_odbc_includes.h?r1=1.12.2.1.2.3&r2=1.12.2.1.2.4&diff_format=u
Index: php-src/ext/odbc/php_odbc_includes.h
diff -u php-src/ext/odbc/php_odbc_includes.h:1.12.2.1.2.3 
php-src/ext/odbc/php_odbc_includes.h:1.12.2.1.2.4
--- php-src/ext/odbc/php_odbc_includes.h:1.12.2.1.2.3   Mon Jan  1 09:36:04 2007
+++ php-src/ext/odbc/php_odbc_includes.h        Tue Mar 13 00:04:38 2007
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_odbc_includes.h,v 1.12.2.1.2.3 2007/01/01 09:36:04 sebastian Exp $ 
*/
+/* $Id: php_odbc_includes.h,v 1.12.2.1.2.4 2007/03/13 00:04:38 stas Exp $ */
 
 #ifndef PHP_ODBC_INCLUDES_H
 #define PHP_ODBC_INCLUDES_H
@@ -236,7 +236,6 @@
 
 typedef struct odbc_result {
        ODBC_SQL_STMT_T stmt;
-       int id;
        odbc_result_value *values;
        SWORD numcols;
        SWORD numparams;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to