abies           Tue Feb 24 10:47:39 2004 EDT

  Modified files:              
    /php-src/ext/sqlite sqlite.c 
  Log:
  More wordsize/alignment fixes
  
  
http://cvs.php.net/diff.php/php-src/ext/sqlite/sqlite.c?r1=1.123&r2=1.124&ty=u
Index: php-src/ext/sqlite/sqlite.c
diff -u php-src/ext/sqlite/sqlite.c:1.123 php-src/ext/sqlite/sqlite.c:1.124
--- php-src/ext/sqlite/sqlite.c:1.123   Mon Feb 23 11:26:34 2004
+++ php-src/ext/sqlite/sqlite.c Tue Feb 24 10:47:38 2004
@@ -17,7 +17,7 @@
    |          Marcus Boerger <[EMAIL PROTECTED]>                              |
    +----------------------------------------------------------------------+
 
-   $Id: sqlite.c,v 1.123 2004/02/23 16:26:34 abies Exp $ 
+   $Id: sqlite.c,v 1.124 2004/02/24 15:47:38 abies Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -121,15 +121,15 @@
        int curr_row;
        char **col_names;
        int alloc_rows;
-       char **table;
        int mode;
+       char **table;
 };
 
 struct php_sqlite_db {
        sqlite *db;
        int last_err_code;
        zend_bool is_persistent;
-       int rsrc_id;
+       long rsrc_id;
 
        HashTable callbacks;
 };
@@ -1054,7 +1054,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.123 2004/02/23 16:26:34 abies Exp $");
+       php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " 
$Id: sqlite.c,v 1.124 2004/02/24 15:47:38 abies 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();
@@ -1138,7 +1138,7 @@
    Opens a persistent handle to a SQLite database. Will create the database if it 
does not exist. */
 PHP_FUNCTION(sqlite_popen)
 {
-       int mode = 0666;
+       long mode = 0666;
        char *filename, *fullpath, *hashkey;
        long filename_len, hashkeylen;
        zval *errmsg = NULL;
@@ -1168,7 +1168,7 @@
                fullpath = estrndup(filename, filename_len);
        }
 
-       hashkeylen = spprintf(&hashkey, 0, "sqlite_pdb_%s:%d", fullpath, mode);
+       hashkeylen = spprintf(&hashkey, 0, "sqlite_pdb_%s:%ld", fullpath, mode);
        
        /* do we have an existing persistent connection ? */
        if (SUCCESS == zend_hash_find(&EG(persistent_list), hashkey, hashkeylen+1, 
(void*)&le)) {
@@ -1213,7 +1213,7 @@
    Opens a SQLite database. Will create the database if it does not exist. */
 PHP_FUNCTION(sqlite_open)
 {
-       int mode = 0666;
+       long mode = 0666;
        char *filename, *fullpath = NULL;
        long filename_len;
        zval *errmsg = NULL;
@@ -1267,7 +1267,7 @@
    Opens a SQLite database and creates an object for it. Will create the database if 
it does not exist. */
 PHP_FUNCTION(sqlite_factory)
 {
-       int mode = 0666;
+       long mode = 0666;
        char *filename;
        long filename_len;
        zval *errmsg = NULL;
@@ -1434,7 +1434,7 @@
 /* }}} */
 
 /* {{{ sqlite_query */
-void sqlite_query(zval *object, struct php_sqlite_db *db, char *sql, long sql_len, 
int mode, int buffered, zval *return_value, struct php_sqlite_result **prres TSRMLS_DC)
+void sqlite_query(zval *object, struct php_sqlite_db *db, char *sql, long sql_len, 
long mode, int buffered, zval *return_value, struct php_sqlite_result **prres 
TSRMLS_DC)
 {
        struct php_sqlite_result res, *rres;
        int ret;
@@ -1510,7 +1510,7 @@
        struct php_sqlite_db *db;
        char *sql;
        long sql_len;
-       int mode = PHPSQLITE_BOTH;
+       long mode = PHPSQLITE_BOTH;
        char *errtext = NULL;
        zval *object = getThis();
 
@@ -1617,7 +1617,7 @@
        struct php_sqlite_db *db;
        char *sql;
        long sql_len;
-       int mode = PHPSQLITE_BOTH;
+       long mode = PHPSQLITE_BOTH;
        char *errtext = NULL;
        zval *object = getThis();
 
@@ -1777,7 +1777,7 @@
 PHP_FUNCTION(sqlite_fetch_all)
 {
        zval *zres, *ent;
-       int mode = PHPSQLITE_BOTH;
+       long mode = PHPSQLITE_BOTH;
        zend_bool decode_binary = 1;
        struct php_sqlite_result *res;
        zval *object = getThis();
@@ -1975,7 +1975,7 @@
        struct php_sqlite_result *rres;
        char *sql;
        long sql_len;
-       int mode = PHPSQLITE_BOTH;
+       long mode = PHPSQLITE_BOTH;
        char *errtext = NULL;
        zend_bool decode_binary = 1;
        zval *object = getThis();
@@ -2187,7 +2187,7 @@
 PHP_FUNCTION(sqlite_current)
 {
        zval *zres;
-       int mode = PHPSQLITE_BOTH;
+       long mode = PHPSQLITE_BOTH;
        zend_bool decode_binary = 1;
        struct php_sqlite_result *res;
        zval *object = getThis();
@@ -2422,7 +2422,7 @@
 {
        zval *zres;
        struct php_sqlite_result *res;
-       int field;
+       long field;
        zval *object = getThis();
 
        if (object) {
@@ -2438,7 +2438,7 @@
        }
 
        if (field < 0 || field >= res->ncolumns) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "field %d out of range", 
field);
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "field %ld out of range", 
field);
                RETURN_FALSE;
        }
 
@@ -2452,7 +2452,7 @@
 {
        zval *zres;
        struct php_sqlite_result *res;
-       int row;
+       long row;
        zval *object = getThis();
 
        if (object) {
@@ -2473,7 +2473,7 @@
        }
        
        if (row < 0 || row >= res->nrows) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "row %d out of range", 
row);
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "row %ld out of range", 
row);
                RETURN_FALSE;
        }
 

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

Reply via email to