cvs: pecl(PECL_4_3) /sqlite sqlite.c
| From: | Ilia Alshanetsky | Date: | Sun, 07 Mar 2004 21:58:20 +0000 |
| Subject: | cvs: pecl(PECL_4_3) /sqlite sqlite.c | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-1017@lists.php.net to get a copy of this message | ||
iliaa Sun Mar 7 16:58:20 2004 EDT
Modified files: (Branch: PECL_4_3)
/pecl/sqlite sqlite.c
Log:
MFH: Corrected string escape calculation.
http://cvs.php.net/diff.php/pecl/sqlite/sqlite.c?r1=1.62.2.17&r2=1.62.2.18&ty=u
Index: pecl/sqlite/sqlite.c
diff -u pecl/sqlite/sqlite.c:1.62.2.17 pecl/sqlite/sqlite.c:1.62.2.18
--- pecl/sqlite/sqlite.c:1.62.2.17 Thu Feb 26 19:30:45 2004
+++ pecl/sqlite/sqlite.c Sun Mar 7 16:58:19 2004
@@ -17,7 +17,7 @@
| Marcus Boerger <helly@php.net> |
+----------------------------------------------------------------------+
- $Id: sqlite.c,v 1.62.2.17 2004/02/27 00:30:45 iliaa Exp $
+ $Id: sqlite.c,v 1.62.2.18 2004/03/07 21:58:19 iliaa Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -669,7 +669,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.62.2.17 2004/02/27 00:30:45 iliaa Exp $");
+ php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id:
sqlite.c,v 1.62.2.18 2004/03/07 21:58:19 iliaa 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();
@@ -1736,7 +1736,7 @@
/* binary string */
int enclen;
- ret = emalloc( 1 + 5 + stringlen * (256 / 253) );
+ ret = emalloc( 1 + 5 + stringlen * ((float) 256 / (float) 253) );
ret[0] = '\x01';
enclen = sqlite_encode_binary((const unsigned char*)string, stringlen, ret+1);
RETVAL_STRINGL(ret, enclen+1, 0);
@@ -1941,7 +1941,7 @@
int enclen;
char *ret;
- ret = emalloc( 1 + 5 + datalen * (256 / 253) );
+ ret = emalloc( 1 + 5 + datalen * ((float) 256 / (float) 253) );
ret[0] = '\x01';
enclen = sqlite_encode_binary((const unsigned char*)data, datalen, ret+1);
RETVAL_STRINGL(ret, enclen+1, 0);