georg           Wed Mar 10 04:50:07 2004 EDT

  Modified files:              
    /php-src/ext/mysqli mysqli_api.c php_mysqli.h mysqli_fe.c 
  Log:
  added new function mysql_stmt_free_result
  
  
http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli_api.c?r1=1.78&r2=1.79&ty=u
Index: php-src/ext/mysqli/mysqli_api.c
diff -u php-src/ext/mysqli/mysqli_api.c:1.78 php-src/ext/mysqli/mysqli_api.c:1.79
--- php-src/ext/mysqli/mysqli_api.c:1.78        Tue Mar  9 07:01:23 2004
+++ php-src/ext/mysqli/mysqli_api.c     Wed Mar 10 04:50:05 2004
@@ -15,7 +15,7 @@
   | Author: Georg Richter <[EMAIL PROTECTED]>                                |
   +----------------------------------------------------------------------+
 
-  $Id: mysqli_api.c,v 1.78 2004/03/09 12:01:23 georg Exp $ 
+  $Id: mysqli_api.c,v 1.79 2004/03/10 09:50:05 georg Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -1483,6 +1483,27 @@
 }
 /* }}} */
 
+#ifndef HAVE_MYSQLI_OLDAPI
+/* {{{ proto void mysqli_stmt_free_result(object stmt)
+   Free stored result memory for the given statement handle */
+PHP_FUNCTION(mysqli_stmt_free_result) 
+{
+       STMT                    *stmt;
+       zval                    *mysql_stmt;
+
+       if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", 
&mysql_stmt, mysqli_stmt_class_entry) == FAILURE) {
+               return;
+       }
+
+       MYSQLI_FETCH_RESOURCE(stmt, STMT *, &mysql_stmt, "mysqli_stmt");
+
+       mysql_stmt_free_result(stmt->stmt);
+
+       return;
+}
+/* }}} */
+#endif
+
 /* {{{ proto mixed mysqli_stmt_num_rows(object stmt)
    Return the number of rows in statements result set */
 PHP_FUNCTION(mysqli_stmt_num_rows)
http://cvs.php.net/diff.php/php-src/ext/mysqli/php_mysqli.h?r1=1.33&r2=1.34&ty=u
Index: php-src/ext/mysqli/php_mysqli.h
diff -u php-src/ext/mysqli/php_mysqli.h:1.33 php-src/ext/mysqli/php_mysqli.h:1.34
--- php-src/ext/mysqli/php_mysqli.h:1.33        Tue Mar  9 07:01:23 2004
+++ php-src/ext/mysqli/php_mysqli.h     Wed Mar 10 04:50:05 2004
@@ -15,7 +15,7 @@
   | Author: Georg Richter <[EMAIL PROTECTED]>                                |
   +----------------------------------------------------------------------+
 
-  $Id: php_mysqli.h,v 1.33 2004/03/09 12:01:23 georg Exp $ 
+  $Id: php_mysqli.h,v 1.34 2004/03/10 09:50:05 georg Exp $ 
 */
 
 /* A little hack to prevent build break, when mysql is used together with
@@ -347,6 +347,9 @@
 PHP_FUNCTION(mysqli_stmt_data_seek);
 PHP_FUNCTION(mysqli_stmt_errno);
 PHP_FUNCTION(mysqli_stmt_error);
+#ifndef HAVE_MYSQLI_OLDAPI
+PHP_FUNCTION(mysqli_stmt_free_result);
+#endif
 PHP_FUNCTION(mysqli_stmt_num_rows);
 #if MYSQL_VERSION_ID >= 40101
 PHP_FUNCTION(mysqli_stmt_sqlstate);
http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli_fe.c?r1=1.32&r2=1.33&ty=u
Index: php-src/ext/mysqli/mysqli_fe.c
diff -u php-src/ext/mysqli/mysqli_fe.c:1.32 php-src/ext/mysqli/mysqli_fe.c:1.33
--- php-src/ext/mysqli/mysqli_fe.c:1.32 Tue Mar  9 07:01:23 2004
+++ php-src/ext/mysqli/mysqli_fe.c      Wed Mar 10 04:50:05 2004
@@ -15,7 +15,7 @@
   | Author: Georg Richter <[EMAIL PROTECTED]>                                |
   +----------------------------------------------------------------------+
 
-  $Id: mysqli_fe.c,v 1.32 2004/03/09 12:01:23 georg Exp $ 
+  $Id: mysqli_fe.c,v 1.33 2004/03/10 09:50:05 georg Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -124,6 +124,9 @@
        PHP_FE(mysqli_stmt_bind_param,                                          
third_arg_force_by_ref_rest)
        PHP_FE(mysqli_stmt_bind_result,                                         
second_arg_force_by_ref_rest)
        PHP_FE(mysqli_stmt_fetch,                                                      
 NULL)
+#ifndef HAVE_MYSQLI_OLDAPI
+       PHP_FE(mysqli_stmt_free_result,                                         NULL)
+#endif
        PHP_FE(mysqli_stmt_param_count,                                         NULL)
        PHP_FE(mysqli_send_query,                                                      
 NULL)
 #ifdef HAVE_EMBEDDED_MYSQLI
@@ -267,6 +270,7 @@
        PHP_FALIAS(send_long_data,mysqli_stmt_send_long_data,NULL)
        PHP_FALIAS(stmt,mysqli_prepare,NULL)
 #ifndef HAVE_MYSQLI_OLDAPI
+       PHP_FALIAS(free_result,mysqli_stmt_free_result,NULL)
        PHP_FALIAS(prepare,mysqli_stmt_prepare, NULL)
 #endif
        PHP_FALIAS(store_result,mysqli_stmt_store_result,NULL)

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

Reply via email to