helly           Thu Jun 26 15:26:26 2003 EDT

  Modified files:              
    /php-src/ext/sqlite php_sqlite.h sqlite.c 
    /php-src/ext/sqlite/tests   sqlite_oo_016.phpt 
  Log:
  Rename sqlite_fetch_string() to sqlite_fetch_single() + alias
  
Index: php-src/ext/sqlite/php_sqlite.h
diff -u php-src/ext/sqlite/php_sqlite.h:1.23 php-src/ext/sqlite/php_sqlite.h:1.24
--- php-src/ext/sqlite/php_sqlite.h:1.23        Wed Jun 25 12:59:24 2003
+++ php-src/ext/sqlite/php_sqlite.h     Thu Jun 26 15:26:26 2003
@@ -17,7 +17,7 @@
    |          Marcus Boerger <[EMAIL PROTECTED]>                              |
    +----------------------------------------------------------------------+
 
-   $Id: php_sqlite.h,v 1.23 2003/06/25 16:59:24 iliaa Exp $ 
+   $Id: php_sqlite.h,v 1.24 2003/06/26 19:26:26 helly Exp $ 
 */
 
 #ifndef PHP_SQLITE_H
@@ -51,7 +51,7 @@
 PHP_FUNCTION(sqlite_single_query);
 
 PHP_FUNCTION(sqlite_fetch_array);
-PHP_FUNCTION(sqlite_fetch_string);
+PHP_FUNCTION(sqlite_fetch_single);
 PHP_FUNCTION(sqlite_fetch_all);
 PHP_FUNCTION(sqlite_current);
 PHP_FUNCTION(sqlite_column);
Index: php-src/ext/sqlite/sqlite.c
diff -u php-src/ext/sqlite/sqlite.c:1.63 php-src/ext/sqlite/sqlite.c:1.64
--- php-src/ext/sqlite/sqlite.c:1.63    Thu Jun 26 15:07:17 2003
+++ php-src/ext/sqlite/sqlite.c Thu Jun 26 15:26:26 2003
@@ -17,7 +17,7 @@
    |          Marcus Boerger <[EMAIL PROTECTED]>                              |
    +----------------------------------------------------------------------+
 
-   $Id: sqlite.c,v 1.63 2003/06/26 19:07:17 helly Exp $ 
+   $Id: sqlite.c,v 1.64 2003/06/26 19:26:26 helly Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -164,7 +164,8 @@
        PHP_FE(sqlite_array_query, NULL)
        PHP_FE(sqlite_single_query, NULL)
        PHP_FE(sqlite_fetch_array, NULL)
-       PHP_FE(sqlite_fetch_string, NULL)
+       PHP_FE(sqlite_fetch_single, NULL)
+       PHP_FALIAS(sqlite_fetch_string, sqlite_fetch_single, NULL)
        PHP_FE(sqlite_fetch_all, NULL)
        PHP_FE(sqlite_current, NULL)
        PHP_FE(sqlite_column, NULL)
@@ -214,7 +215,7 @@
 
 function_entry sqlite_funcs_query[] = {
        PHP_ME_MAPPING(fetch_array, sqlite_fetch_array, NULL)
-       PHP_ME_MAPPING(fetch_string, sqlite_fetch_string, NULL)
+       PHP_ME_MAPPING(fetch_single, sqlite_fetch_single, NULL)
        PHP_ME_MAPPING(fetch_all, sqlite_fetch_all, NULL)
        PHP_ME_MAPPING(column, sqlite_column, NULL)
        PHP_ME_MAPPING(changes, sqlite_changes, NULL)
@@ -234,7 +235,7 @@
 
 function_entry sqlite_funcs_ub_query[] = {
        PHP_ME_MAPPING(fetch_array, sqlite_fetch_array, NULL)
-       PHP_ME_MAPPING(fetch_string, sqlite_fetch_string, NULL)
+       PHP_ME_MAPPING(fetch_single, sqlite_fetch_single, NULL)
        PHP_ME_MAPPING(fetch_all, sqlite_fetch_all, NULL)
        PHP_ME_MAPPING(column, sqlite_column, NULL)
        PHP_ME_MAPPING(changes, sqlite_changes, NULL)
@@ -935,7 +936,7 @@
 {
        php_info_print_table_start();
        php_info_print_table_header(2, "SQLite support", "enabled");
-       php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " 
$Id: sqlite.c,v 1.63 2003/06/26 19:07:17 helly Exp $");
+       php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " 
$Id: sqlite.c,v 1.64 2003/06/26 19:26:26 helly Exp $");
        php_info_print_table_row(2, "SQLite Library", sqlite_libversion());
        php_info_print_table_row(2, "SQLite Encoding", sqlite_libencoding());
        php_info_print_table_end();
@@ -1698,8 +1699,8 @@
 }
 /* }}} */
 
-/* {{{ php_sqlite_fetch_string */
-static void php_sqlite_fetch_string(struct php_sqlite_result *res, zend_bool 
decode_binary, zval *return_value TSRMLS_DC)
+/* {{{ php_sqlite_fetch_single */
+static void php_sqlite_fetch_single(struct php_sqlite_result *res, zend_bool 
decode_binary, zval *return_value TSRMLS_DC)
 {
        const char **rowdata;
        char *decoded;
@@ -1805,7 +1806,7 @@
 
        while (rres->curr_row < rres->nrows) {
                MAKE_STD_ZVAL(ent);
-               php_sqlite_fetch_string(rres, decode_binary, ent TSRMLS_CC);
+               php_sqlite_fetch_single(rres, decode_binary, ent TSRMLS_CC);
 
                /* if set and we only have 1 row in the result set, return the result 
as a string. */
                if (srow) {
@@ -1830,7 +1831,7 @@
 
 /* {{{ proto string sqlite_fetch_array(resource result [, bool decode_binary])
    Fetches first column of a result set as a string */
-PHP_FUNCTION(sqlite_fetch_string)
+PHP_FUNCTION(sqlite_fetch_single)
 {
        zval *zres;
        zend_bool decode_binary = 1;
@@ -1849,7 +1850,7 @@
                ZEND_FETCH_RESOURCE(res, struct php_sqlite_result *, &zres, -1, 
"sqlite result", le_sqlite_result);
        }
 
-       php_sqlite_fetch_string(res, decode_binary, return_value TSRMLS_CC);
+       php_sqlite_fetch_single(res, decode_binary, return_value TSRMLS_CC);
 }
 /* }}} */
 
Index: php-src/ext/sqlite/tests/sqlite_oo_016.phpt
diff -u php-src/ext/sqlite/tests/sqlite_oo_016.phpt:1.1 
php-src/ext/sqlite/tests/sqlite_oo_016.phpt:1.2
--- php-src/ext/sqlite/tests/sqlite_oo_016.phpt:1.1     Sun Jun 22 13:19:46 2003
+++ php-src/ext/sqlite/tests/sqlite_oo_016.phpt Thu Jun 26 15:26:26 2003
@@ -23,12 +23,12 @@
 echo "====BUFFERED====\n";
 $r = $db->query("SELECT a, b from strings");
 while ($r->has_more()) {
-       var_dump($r->fetch_string());
+       var_dump($r->fetch_single());
 }
 echo "====UNBUFFERED====\n";
 $r = $db->unbuffered_query("SELECT a, b from strings");
 while ($r->has_more()) {
-       var_dump($r->fetch_string());
+       var_dump($r->fetch_single());
 }
 echo "DONE!\n";
 ?>



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

Reply via email to