[PHP-CVS] cvs: CVSROOT / avail

2009-05-08 Thread Rasmus Lerdorf
rasmus  Sat May  9 03:26:40 2009 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  .
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1526&r2=1.1527&diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1526 CVSROOT/avail:1.1527
--- CVSROOT/avail:1.1526Fri May  8 09:51:11 2009
+++ CVSROOT/avail   Sat May  9 03:26:39 2009
@@ -299,7 +299,7 @@
 avail|ross|phpdoc,gd
 avail|ab|pecl/ktaglib
 avail|mabouzou|pecl/sqlanywhere
-avail|jawed|pecl/oauth
+avail|jawed,datibbaw|pecl/oauth
 avail|sean|pecl/parsekit
 avail|magicaltux|pecl/proctitle,php-src/ext/wddx
 avail|mikesul|pecl/ssh2



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



[PHP-CVS] cvs: php-src /main/streams userspace.c

2009-05-08 Thread Hannes Magnusson
bjori   Fri May  8 11:36:44 2009 UTC

  Modified files:  
/php-src/main/streams   userspace.c 
  Log:
  MFb5.3: fix comments
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/streams/userspace.c?r1=1.55&r2=1.56&diff_format=u
Index: php-src/main/streams/userspace.c
diff -u php-src/main/streams/userspace.c:1.55 
php-src/main/streams/userspace.c:1.56
--- php-src/main/streams/userspace.c:1.55   Tue Mar 31 16:25:58 2009
+++ php-src/main/streams/userspace.cFri May  8 11:36:43 2009
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: userspace.c,v 1.55 2009/03/31 16:25:58 bjori Exp $ */
+/* $Id: userspace.c,v 1.56 2009/05/08 11:36:43 bjori Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -1212,7 +1212,7 @@
add_property_null(object, "context");
}
 
-   /* call the unlink method */
+   /* call the mkdir method */
MAKE_STD_ZVAL(zfilename);
ZVAL_STRING(zfilename, url, 1);
args[0] = &zfilename;
@@ -1277,7 +1277,7 @@
add_property_null(object, "context");
}
 
-   /* call the unlink method */
+   /* call the rmdir method */
MAKE_STD_ZVAL(zfilename);
ZVAL_STRING(zfilename, url, 1);
args[0] = &zfilename;
@@ -1337,9 +1337,7 @@
add_property_null(object, "context");
}
 
-   /* call the stat_url method */
-   
-   /* call it's stream_open method - set up params first */
+   /* call it's stat_url method - set up params first */
MAKE_STD_ZVAL(zfilename);
ZVAL_STRING(zfilename, url, 1);
args[0] = &zfilename;



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main/streams userspace.c

2009-05-08 Thread Hannes Magnusson
bjori   Fri May  8 11:35:12 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main/streams   userspace.c 
  Log:
  Fix comments
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/streams/userspace.c?r1=1.31.2.3.2.7.2.9&r2=1.31.2.3.2.7.2.10&diff_format=u
Index: php-src/main/streams/userspace.c
diff -u php-src/main/streams/userspace.c:1.31.2.3.2.7.2.9 
php-src/main/streams/userspace.c:1.31.2.3.2.7.2.10
--- php-src/main/streams/userspace.c:1.31.2.3.2.7.2.9   Wed Mar 25 19:55:59 2009
+++ php-src/main/streams/userspace.cFri May  8 11:35:12 2009
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: userspace.c,v 1.31.2.3.2.7.2.9 2009/03/25 19:55:59 bjori Exp $ */
+/* $Id: userspace.c,v 1.31.2.3.2.7.2.10 2009/05/08 11:35:12 bjori Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -1212,7 +1212,7 @@
add_property_null(object, "context");
}
 
-   /* call the unlink method */
+   /* call the mkdir method */
MAKE_STD_ZVAL(zfilename);
ZVAL_STRING(zfilename, url, 1);
args[0] = &zfilename;
@@ -1277,7 +1277,7 @@
add_property_null(object, "context");
}
 
-   /* call the unlink method */
+   /* call the rmdir method */
MAKE_STD_ZVAL(zfilename);
ZVAL_STRING(zfilename, url, 1);
args[0] = &zfilename;
@@ -1337,9 +1337,7 @@
add_property_null(object, "context");
}
 
-   /* call the stat_url method */
-   
-   /* call it's stream_open method - set up params first */
+   /* call it's stat_url method - set up params first */
MAKE_STD_ZVAL(zfilename);
ZVAL_STRING(zfilename, url, 1);
args[0] = &zfilename;



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



[PHP-CVS] cvs: php-src /ext/standard file.c /ext/standard/tests/file file_variation10.phpt

2009-05-08 Thread Arnaud Le Blanc
lbarnaudFri May  8 10:01:40 2009 UTC

  Added files: 
/php-src/ext/standard/tests/filefile_variation10.phpt 

  Modified files:  
/php-src/ext/standard   file.c 
  Log:
  Fix default behavior of file() (FILE_TEXT flag is the default)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.544&r2=1.545&diff_format=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.544 php-src/ext/standard/file.c:1.545
--- php-src/ext/standard/file.c:1.544   Fri May  8 10:00:09 2009
+++ php-src/ext/standard/file.c Fri May  8 10:01:40 2009
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: file.c,v 1.544 2009/05/08 10:00:09 lbarnaud Exp $ */
+/* $Id: file.c,v 1.545 2009/05/08 10:01:40 lbarnaud Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -779,7 +779,6 @@
 
 /* {{{ proto array file(string filename [, int flags[, resource context]]) U
Read entire file into an array */
-/* UTODO: Accept unicode contents */
 PHP_FUNCTION(file)
 {
zval **ppfilename;
@@ -801,7 +800,7 @@
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z|lr!", 
&ppfilename, &flags, &zcontext) == FAILURE) {
return;
}
-   if (flags < 0 || flags > (PHP_FILE_USE_INCLUDE_PATH | 
PHP_FILE_IGNORE_NEW_LINES | PHP_FILE_SKIP_EMPTY_LINES | 
PHP_FILE_NO_DEFAULT_CONTEXT | PHP_FILE_TEXT)) {
+   if (flags < 0 || flags > (PHP_FILE_USE_INCLUDE_PATH | 
PHP_FILE_IGNORE_NEW_LINES | PHP_FILE_SKIP_EMPTY_LINES | 
PHP_FILE_NO_DEFAULT_CONTEXT | PHP_FILE_TEXT | PHP_FILE_BINARY)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "'%ld' flag is not 
supported", flags);
RETURN_FALSE;
}
@@ -809,7 +808,7 @@
use_include_path = flags & PHP_FILE_USE_INCLUDE_PATH;
include_new_line = !(flags & PHP_FILE_IGNORE_NEW_LINES);
skip_blank_lines = flags & PHP_FILE_SKIP_EMPTY_LINES;
-   text_mode = flags & PHP_FILE_TEXT;
+   text_mode = !(flags & PHP_FILE_BINARY);
 
context = php_stream_context_from_zval(zcontext, flags & 
PHP_FILE_NO_DEFAULT_CONTEXT);
if (php_stream_path_param_encode(ppfilename, &filename, &filename_len, 
REPORT_ERRORS, context) == FAILURE) {

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/file_variation10.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/file/file_variation10.phpt
+++ php-src/ext/standard/tests/file/file_variation10.phpt
--TEST--
file(): FILE_TEXT, FILE_BINARY, and default behavior
--FILE--
 "\\r", "\n" => "\\n")) . "\n";
var_dump(file($url, FILE_IGNORE_NEW_LINES));
var_dump(file($url, FILE_IGNORE_NEW_LINES|FILE_TEXT));
var_dump(file($url, FILE_IGNORE_NEW_LINES|FILE_BINARY));
}
?>
--EXPECTF--
data://text/plain,foo\nbar\n
array(2) {
  [0]=>
  unicode(3) "foo"
  [1]=>
  unicode(3) "bar"
}
array(2) {
  [0]=>
  unicode(3) "foo"
  [1]=>
  unicode(3) "bar"
}
array(2) {
  [0]=>
  string(3) "foo"
  [1]=>
  string(3) "bar"
}
data://text/plain,\nfoo\nbar\n
array(3) {
  [0]=>
  unicode(0) ""
  [1]=>
  unicode(3) "foo"
  [2]=>
  unicode(3) "bar"
}
array(3) {
  [0]=>
  unicode(0) ""
  [1]=>
  unicode(3) "foo"
  [2]=>
  unicode(3) "bar"
}
array(3) {
  [0]=>
  string(0) ""
  [1]=>
  string(3) "foo"
  [2]=>
  string(3) "bar"
}
data://text/plain,foo\nbar
array(2) {
  [0]=>
  unicode(3) "foo"
  [1]=>
  unicode(3) "bar"
}
array(2) {
  [0]=>
  unicode(3) "foo"
  [1]=>
  unicode(3) "bar"
}
array(2) {
  [0]=>
  string(3) "foo"
  [1]=>
  string(3) "bar"
}



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



[PHP-CVS] cvs: php-src /ext/standard file.c

2009-05-08 Thread Arnaud Le Blanc
lbarnaudFri May  8 10:00:09 2009 UTC

  Modified files:  
/php-src/ext/standard   file.c 
  Log:
  Missing check
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.543&r2=1.544&diff_format=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.543 php-src/ext/standard/file.c:1.544
--- php-src/ext/standard/file.c:1.543   Fri May  8 09:50:11 2009
+++ php-src/ext/standard/file.c Fri May  8 10:00:09 2009
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: file.c,v 1.543 2009/05/08 09:50:11 lbarnaud Exp $ */
+/* $Id: file.c,v 1.544 2009/05/08 10:00:09 lbarnaud Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -853,7 +853,7 @@
} else {
do {
int windows_eol = 0;
-   if (eol_marker == '\n' && *(p - 1) == '\r') {
+   if (p != (UChar*)target_buf && eol_marker == 
'\n' && *(p - 1) == '\r') {
windows_eol++;
}
if (skip_blank_lines && !(p-s-windows_eol)) {



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



[PHP-CVS] cvs: CVSROOT / avail

2009-05-08 Thread Pierre-Alain Joye
pajoye  Fri May  8 09:51:11 2009 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  - give qaweb karma to bjori and myself
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1525&r2=1.1526&diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1525 CVSROOT/avail:1.1526
--- CVSROOT/avail:1.1525Thu May  7 21:26:19 2009
+++ CVSROOT/avail   Fri May  8 09:51:11 2009
@@ -55,7 +55,7 @@
 
 # The PHP Quality Assurance Team maintains their own website.
 
-avail|ericstewart,scottmac,ilia,jalal,zak,andre,lyric,jmoore,ronabop,sebastian,joey,jani,torben,hellekin,cnewbill,bate,yohgaki,jan,imajes,derick,msopacua,nohn,edink,iliaa,helly,sean,nlopess,tony2001,zoe,johannes,lsmith,stevseea,felixdv|qaweb
+avail|ericstewart,scottmac,ilia,jalal,zak,andre,lyric,jmoore,ronabop,sebastian,joey,jani,torben,hellekin,cnewbill,bate,yohgaki,jan,imajes,derick,msopacua,nohn,edink,iliaa,helly,sean,nlopess,tony2001,zoe,johannes,lsmith,stevseea,felixdv,bjori,pajoye|qaweb
 
 # Some people get only access to specific languages for phpdoc
 avail|diab,daif,salehcoder|phpdoc-ar



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/file bug44034.phpt

2009-05-08 Thread Arnaud Le Blanc
lbarnaudFri May  8 09:50:35 2009 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/standard/tests/filebug44034.phpt 
  Log:
  test for #44034
  
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/bug44034.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/file/bug44034.phpt
+++ php-src/ext/standard/tests/file/bug44034.phpt



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



[PHP-CVS] cvs: php-src /ext/standard file.c /ext/standard/tests/file bug44034.phpt

2009-05-08 Thread Arnaud Le Blanc
lbarnaudFri May  8 09:50:11 2009 UTC

  Modified files:  
/php-src/ext/standard   file.c 
/php-src/ext/standard/tests/filebug44034.phpt 
  Log:
  MFB5.3 fix for bug #44034 (FILE_IGNORE_NEW_LINES in file() does not work as
  expected when lines end in \r\n) (fixes #48175)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.542&r2=1.543&diff_format=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.542 php-src/ext/standard/file.c:1.543
--- php-src/ext/standard/file.c:1.542   Sun Apr 19 17:09:46 2009
+++ php-src/ext/standard/file.c Fri May  8 09:50:11 2009
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: file.c,v 1.542 2009/04/19 17:09:46 lbarnaud Exp $ */
+/* $Id: file.c,v 1.543 2009/05/08 09:50:11 lbarnaud Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -852,11 +852,15 @@
} while ((p = u_memchr(p, eol_marker, (e-p;
} else {
do {
-   if (skip_blank_lines && !(p-s)) {
+   int windows_eol = 0;
+   if (eol_marker == '\n' && *(p - 1) == '\r') {
+   windows_eol++;
+   }
+   if (skip_blank_lines && !(p-s-windows_eol)) {
s = ++p;
continue;
}
-   add_index_unicodel(return_value, i++, 
eustrndup(s, p-s), p-s, 0);
+   add_index_unicodel(return_value, i++, 
eustrndup(s, p-s-windows_eol), p-s-windows_eol, 0);
s = ++p;
} while ((p = u_memchr(p, eol_marker, (e-p;
}
@@ -889,11 +893,15 @@
} while ((p = memchr(p, eol_marker, (e-p;
} else {
do {
-   if (skip_blank_lines && !(p-s)) {
+   int windows_eol = 0;
+   if (p != target_buf && eol_marker == '\n' && 
*(p - 1) == '\r') {
+   windows_eol++;
+   }
+   if (skip_blank_lines && !(p-s-windows_eol)) {
s = ++p;
continue;
}
-   add_index_stringl(return_value, i++, 
estrndup(s, p-s), p-s, 0);
+   add_index_stringl(return_value, i++, 
estrndup(s, p-s-windows_eol), p-s-windows_eol, 0);
s = ++p;
} while ((p = memchr(p, eol_marker, (e-p;
}
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/bug44034.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/standard/tests/file/bug44034.phpt
diff -u /dev/null php-src/ext/standard/tests/file/bug44034.phpt:1.2
--- /dev/null   Fri May  8 09:50:11 2009
+++ php-src/ext/standard/tests/file/bug44034.phpt   Fri May  8 09:50:11 2009
@@ -0,0 +1,39 @@
+--TEST--
+Bug #44034
+--FILE--
+ "\\r", "\n" => "\\n")) . "\n";
+   var_dump(file($url, FILE_IGNORE_NEW_LINES|FILE_TEXT));
+}
+?>
+--EXPECTF--
+data://text/plain,foo\r\nbar\r\n
+array(2) {
+  [0]=>
+  %unicode|string%(3) "foo"
+  [1]=>
+  %unicode|string%(3) "bar"
+}
+data://text/plain,\r\nfoo\r\nbar\r\n
+array(3) {
+  [0]=>
+  %unicode|string%(0) ""
+  [1]=>
+  %unicode|string%(3) "foo"
+  [2]=>
+  %unicode|string%(3) "bar"
+}
+data://text/plain,foo\r\nbar
+array(2) {
+  [0]=>
+  %unicode|string%(3) "foo"
+  [1]=>
+  %unicode|string%(3) "bar"
+}



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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard file.c /ext/standard/tests/file bug44034.phpt

2009-05-08 Thread Arnaud Le Blanc
lbarnaudFri May  8 09:49:27 2009 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/filebug44034.phpt 

  Modified files:  
/php-src/ext/standard   file.c 
  Log:
  MFB5.3 fix for bug #44034 (FILE_IGNORE_NEW_LINES in file() does not work as
  expected when lines end in \r\n) (fixes #48175)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.409.2.6.2.40&r2=1.409.2.6.2.41&diff_format=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.409.2.6.2.40 
php-src/ext/standard/file.c:1.409.2.6.2.41
--- php-src/ext/standard/file.c:1.409.2.6.2.40  Sun Apr 19 17:10:52 2009
+++ php-src/ext/standard/file.c Fri May  8 09:49:27 2009
@@ -21,7 +21,7 @@
+--+
  */
 
-/* $Id: file.c,v 1.409.2.6.2.40 2009/04/19 17:10:52 lbarnaud Exp $ */
+/* $Id: file.c,v 1.409.2.6.2.41 2009/05/08 09:49:27 lbarnaud Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -788,16 +788,20 @@
} while ((p = memchr(p, eol_marker, (e-p;
} else {
do {
-   if (skip_blank_lines && !(p-s)) {
+   int windows_eol = 0;
+   if (p != target_buf && eol_marker == '\n' && 
*(p - 1) == '\r') {
+   windows_eol++;
+   }
+   if (skip_blank_lines && !(p-s-windows_eol)) {
s = ++p;
continue;
}
if (PG(magic_quotes_runtime)) {
/* s is in target_buf which is freed at 
the end of the function */
-   slashed = php_addslashes(s, (p-s), 
&len, 0 TSRMLS_CC);
+   slashed = php_addslashes(s, 
(p-s-windows_eol), &len, 0 TSRMLS_CC);
add_index_stringl(return_value, i++, 
slashed, len, 0);
} else {
-   add_index_stringl(return_value, i++, 
estrndup(s, p-s), p-s, 0);
+   add_index_stringl(return_value, i++, 
estrndup(s, p-s-windows_eol), p-s-windows_eol, 0);
}
s = ++p;
} while ((p = memchr(p, eol_marker, (e-p;

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/bug44034.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/file/bug44034.phpt
+++ php-src/ext/standard/tests/file/bug44034.phpt



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard file.c

2009-05-08 Thread Arnaud Le Blanc
lbarnaudFri May  8 09:44:18 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   file.c 
  Log:
  Fix invalid read
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.409.2.6.2.28.2.31&r2=1.409.2.6.2.28.2.32&diff_format=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.409.2.6.2.28.2.31 
php-src/ext/standard/file.c:1.409.2.6.2.28.2.32
--- php-src/ext/standard/file.c:1.409.2.6.2.28.2.31 Sun Apr 19 17:10:34 2009
+++ php-src/ext/standard/file.c Fri May  8 09:44:17 2009
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: file.c,v 1.409.2.6.2.28.2.31 2009/04/19 17:10:34 lbarnaud Exp $ */
+/* $Id: file.c,v 1.409.2.6.2.28.2.32 2009/05/08 09:44:17 lbarnaud Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -785,7 +785,7 @@
} else {
do {
int windows_eol = 0;
-   if (eol_marker == '\n' && *(p - 1) == '\r') {
+   if (p != target_buf && eol_marker == '\n' && 
*(p - 1) == '\r') {
windows_eol++;
}
if (skip_blank_lines && !(p-s-windows_eol)) {



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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/pdo_sqlite sqlite_statement.c

2009-05-08 Thread Antony Dovgal
Ok, so it's not a no-op, but a wrong fix for a non-existing problem.

On 08.05.2009 12:35, Matteo Beccati wrote:
> By "no-op" I meant that it's not doing anything in a broader context,
> i.e. it's not decreasing the length integer used by the caller function.
> 
> I've been pointed to the compiler warning (see bug topic of
> http://bugs.php.net/bug.php?id=48185) and propery fixed it. When I ran
> the test suite lots of test cases were failing because the output was
> truncated.
> 
> I think that this by itself is the proof that sqlite3_column_bytes() is
> not including the NULL terminator. To be sure I've also checked
> sqlite3.h and couldn't find any reference to that behaviour.
> 
> The comment is wrong and the code is not doing what the comment tells,
> so I thought that a clean up was required, both for consistency and to
> fix the compiler warning.
> 
> 
> Cheers
> --
> M.
> 


-- 
Wbr, 
Antony Dovgal

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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/pdo_sqlite sqlite_statement.c

2009-05-08 Thread Matteo Beccati
Antony Dovgal ha scritto:
> On 08.05.2009 03:29, Matteo Beccati wrote:
>>  #ifdef HAVE_CONFIG_H
>>  #include "config.h"
>> @@ -265,11 +265,6 @@
>>  case SQLITE3_TEXT:
>>  *ptr = (char*)sqlite3_column_text(S->stmt, colno);
>>  *len = sqlite3_column_bytes(S->stmt, colno);
>> -if (*len) {
>> -/* sqlite3.h says "the NUL terminator is 
>> included in the byte count
>> - * for TEXT values" */
>> -*len--;
>> -}
>>  return 1;
> 
> It doesn't look like no-op to me, but it's not clear what's being decremented.
> I'd say it should do (*len)-- if the comment in sqlite3.h is correct.

By "no-op" I meant that it's not doing anything in a broader context,
i.e. it's not decreasing the length integer used by the caller function.

I've been pointed to the compiler warning (see bug topic of
http://bugs.php.net/bug.php?id=48185) and propery fixed it. When I ran
the test suite lots of test cases were failing because the output was
truncated.

I think that this by itself is the proof that sqlite3_column_bytes() is
not including the NULL terminator. To be sure I've also checked
sqlite3.h and couldn't find any reference to that behaviour.

The comment is wrong and the code is not doing what the comment tells,
so I thought that a clean up was required, both for consistency and to
fix the compiler warning.


Cheers
--
M.

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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/pdo_sqlite sqlite_statement.c

2009-05-08 Thread Antony Dovgal
On 08.05.2009 03:29, Matteo Beccati wrote:
>  #ifdef HAVE_CONFIG_H
>  #include "config.h"
> @@ -265,11 +265,6 @@
>   case SQLITE3_TEXT:
>   *ptr = (char*)sqlite3_column_text(S->stmt, colno);
>   *len = sqlite3_column_bytes(S->stmt, colno);
> - if (*len) {
> - /* sqlite3.h says "the NUL terminator is 
> included in the byte count
> -  * for TEXT values" */
> - *len--;
> - }
>   return 1;

It doesn't look like no-op to me, but it's not clear what's being decremented.
I'd say it should do (*len)-- if the comment in sqlite3.h is correct.

-- 
Wbr, 
Antony Dovgal

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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/sqlite3 sqlite3.c

2009-05-08 Thread Antony Dovgal
tony2001Fri May  8 07:58:19 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/sqlite3sqlite3.c 
  Log:
  MFH: fix ZTS build
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite3/sqlite3.c?r1=1.1.2.37&r2=1.1.2.38&diff_format=u
Index: php-src/ext/sqlite3/sqlite3.c
diff -u php-src/ext/sqlite3/sqlite3.c:1.1.2.37 
php-src/ext/sqlite3/sqlite3.c:1.1.2.38
--- php-src/ext/sqlite3/sqlite3.c:1.1.2.37  Thu May  7 22:42:46 2009
+++ php-src/ext/sqlite3/sqlite3.c   Fri May  8 07:58:19 2009
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: sqlite3.c,v 1.1.2.37 2009/05/07 22:42:46 felipe Exp $ */
+/* $Id: sqlite3.c,v 1.1.2.38 2009/05/08 07:58:19 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -33,6 +33,7 @@
 
 #include "zend_exceptions.h"
 #include "zend_interfaces.h"
+#include "SAPI.h"
 
 ZEND_DECLARE_MODULE_GLOBALS(sqlite3)
 



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



[PHP-CVS] cvs: php-src /ext/sqlite3 sqlite3.c

2009-05-08 Thread Antony Dovgal
tony2001Fri May  8 07:58:12 2009 UTC

  Modified files:  
/php-src/ext/sqlite3sqlite3.c 
  Log:
  fix ZTS build
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite3/sqlite3.c?r1=1.41&r2=1.42&diff_format=u
Index: php-src/ext/sqlite3/sqlite3.c
diff -u php-src/ext/sqlite3/sqlite3.c:1.41 php-src/ext/sqlite3/sqlite3.c:1.42
--- php-src/ext/sqlite3/sqlite3.c:1.41  Thu May  7 22:44:37 2009
+++ php-src/ext/sqlite3/sqlite3.c   Fri May  8 07:58:12 2009
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: sqlite3.c,v 1.41 2009/05/07 22:44:37 felipe Exp $ */
+/* $Id: sqlite3.c,v 1.42 2009/05/08 07:58:12 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -34,6 +34,7 @@
 
 #include "zend_exceptions.h"
 #include "zend_interfaces.h"
+#include "SAPI.h"
 
 ZEND_DECLARE_MODULE_GLOBALS(sqlite3)
 



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