[PHP-CVS] com php-src: fixed 64 bit pass by ref: Zend/zend_object_handlers.h main/php_variables.c main/streams/memory.c win32/registry.c win32/sendmail.c

2013-11-09 Thread Anatol Belski
Commit:27a86a4402022bf5ba180a6dbb46cf86c9a05b72
Author:Anatol Belski a...@php.net Sat, 9 Nov 2013 02:09:14 +0100
Parents:   5615326e1f216ee1d8884bdab89f0b79dfb76218
Branches:  str_size_and_int64

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=27a86a4402022bf5ba180a6dbb46cf86c9a05b72

Log:
fixed 64 bit pass by ref

Changed paths:
  M  Zend/zend_object_handlers.h
  M  main/php_variables.c
  M  main/streams/memory.c
  M  win32/registry.c
  M  win32/sendmail.c


Diff:
diff --git a/Zend/zend_object_handlers.h b/Zend/zend_object_handlers.h
index be30af2..7fb6a92 100644
--- a/Zend/zend_object_handlers.h
+++ b/Zend/zend_object_handlers.h
@@ -108,7 +108,7 @@ typedef int (*zend_object_cast_t)(zval *readobj, zval 
*retval, int type TSRMLS_D
 
 /* updates *count to hold the number of elements present and returns SUCCESS.
  * Returns FAILURE if the object does not have any sense of overloaded 
dimensions */
-typedef int (*zend_object_count_elements_t)(zval *object, long *count 
TSRMLS_DC);
+typedef int (*zend_object_count_elements_t)(zval *object, zend_int_t *count 
TSRMLS_DC);
 
 typedef int (*zend_object_get_closure_t)(zval *obj, zend_class_entry **ce_ptr, 
union _zend_function **fptr_ptr, zval **zobj_ptr TSRMLS_DC);
 
diff --git a/main/php_variables.c b/main/php_variables.c
index 97d5ea1..22eae39 100644
--- a/main/php_variables.c
+++ b/main/php_variables.c
@@ -243,8 +243,7 @@ static zend_bool add_post_var(zval *arr, post_var_data_t 
*var, zend_bool eof TSR
 {
char *ksep, *vsep;
size_t klen, vlen;
-   /* FIXME: string-size_t */
-   unsigned int new_vlen;
+   zend_str_size_uint new_vlen;
 
if (var-ptr = var-end) {
return 0;
diff --git a/main/streams/memory.c b/main/streams/memory.c
index ac6e1ee..ba51136 100644
--- a/main/streams/memory.c
+++ b/main/streams/memory.c
@@ -22,7 +22,7 @@
 #include php.h
 
 PHPAPI int php_url_decode(char *str, int len);
-PHPAPI unsigned char *php_base64_decode(const unsigned char *str, int length, 
int *ret_length);
+PHPAPI unsigned char *php_base64_decode(const unsigned char *str, int length, 
zend_str_size_int *ret_length);
 
 /* Memory streams use a dynamic memory buffer to emulate a stream.
  * You can use php_stream_memory_open to create a readonly stream
diff --git a/win32/registry.c b/win32/registry.c
index e13a0fc..66ee096 100644
--- a/win32/registry.c
+++ b/win32/registry.c
@@ -100,7 +100,7 @@ static int LoadDirectory(HashTable *directories, HKEY key, 
char *path, int path_
if (parent_ht) {
HashPosition pos;
char *index;
-   uint index_len;
+   zend_str_size_uint index_len;
zend_uint_t num;
zval **tmpdata;
 
@@ -172,7 +172,7 @@ static void delete_internal_hashtable(void *data)
 void UpdateIniFromRegistry(char *path TSRMLS_DC)
 {
char *p, *orig_path;
-   int path_len;
+   zend_str_size_int path_len;
HashTable **pht;
 
if(!path) {
@@ -253,7 +253,7 @@ void UpdateIniFromRegistry(char *path TSRMLS_DC)
HashTable *ht = *pht;
HashPosition pos;
char *index;
-   uint index_len;
+   zend_str_size_uint index_len;
zend_uint_t num;
zval **data;
 
diff --git a/win32/sendmail.c b/win32/sendmail.c
index 93e68f4..da33651 100644
--- a/win32/sendmail.c
+++ b/win32/sendmail.c
@@ -157,7 +157,7 @@ static char *php_win32_mail_trim_header(char *header 
TSRMLS_DC)
 #if HAVE_PCRE || HAVE_BUNDLED_PCRE

char *result, *result2;
-   int result_len;
+   zend_str_size_int result_len;
zval *replace;
 
if (!header) {
@@ -388,7 +388,7 @@ static int SendText(char *RPath, char *Subject, char 
*mailTo, char *mailCc, char
char *server_response = NULL;
char *stripped_header  = NULL;
char *data_cln;
-   int data_cln_len;
+   zend_str_size_int data_cln_len;
 
/* check for NULL parameters */
if (data == NULL)


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



[PHP-CVS] com php-src: too much for a compare func: ext/standard/array.c

2013-11-09 Thread Anatol Belski
Commit:c2e228b77dcd015a2fc7679d6e62044100e66ce0
Author:Anatol Belski a...@php.net Sat, 9 Nov 2013 09:18:42 +0100
Parents:   27a86a4402022bf5ba180a6dbb46cf86c9a05b72
Branches:  str_size_and_int64

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=c2e228b77dcd015a2fc7679d6e62044100e66ce0

Log:
too much for a compare func

Changed paths:
  M  ext/standard/array.c


Diff:
diff --git a/ext/standard/array.c b/ext/standard/array.c
index 218df54..4363e31 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -2924,7 +2924,7 @@ static int zval_compare(zval **a, zval **b TSRMLS_DC) /* 
{{{ */
 }
 /* }}} */
 
-static php_int_t zval_user_compare(zval **a, zval **b TSRMLS_DC) /* {{{ */
+static int zval_user_compare(zval **a, zval **b TSRMLS_DC) /* {{{ */
 {
zval **args[2];
zval *retval_ptr = NULL;


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



Re: [PHP-CVS] com php-src: Sync ext/zip with pecl/zip version 1.3.2 - update libzip to version 1.11.1. We don't use any private symbol anymore - new method ZipArchive::setPassword($password) - add --w

2013-11-09 Thread Felipe Pena
Hi,

On Mon, Nov 4, 2013 at 10:23 AM, Remi Collet r...@php.net wrote:
 Commit: 5dc37b351085a7b8cdc30ef2ebb349c8e5df4e2c
 Author: Remi Collet r...@php.net Mon, 4 Nov 2013 13:23:36 +0100
 Parents: 2f555b8e606b5f09d635cef4d3fcbcd6939adae2
 Branches: master

 Link: 
 http://git.php.net/?p=php-src.git;a=commitdiff;h=5dc37b351085a7b8cdc30ef2ebb349c8e5df4e2c

 Log:
 Sync ext/zip with pecl/zip version 1.3.2
 - update libzip to version 1.11.1. We don't use any private symbol anymore
 - new method ZipArchive::setPassword($password)
 - add --with-libzip option to build with system libzip

 Changed paths:
 M ext/zip/CREDITS
 M ext/zip/config.m4
 M ext/zip/config.w32
 A ext/zip/examples/addglob.php
 A ext/zip/examples/addpattern.php
 A ext/zip/lib/mkstemp.c
 A ext/zip/lib/php_zip_config.w32.h
 M ext/zip/lib/zip.h
 M ext/zip/lib/zip_add.c
 M ext/zip/lib/zip_add_dir.c
 A ext/zip/lib/zip_add_entry.c
 M ext/zip/lib/zip_close.c
 M ext/zip/lib/zip_delete.c
 A ext/zip/lib/zip_dir_add.c
 M ext/zip/lib/zip_dirent.c
 A ext/zip/lib/zip_discard.c
 A ext/zip/lib/zip_entry.c
 D ext/zip/lib/zip_entry_free.c
 D ext/zip/lib/zip_entry_new.c
 M ext/zip/lib/zip_error.c
 M ext/zip/lib/zip_error_clear.c
 M ext/zip/lib/zip_error_get.c
 M ext/zip/lib/zip_error_get_sys_type.c
 M ext/zip/lib/zip_error_to_str.c
 A ext/zip/lib/zip_extra_field.c
 A ext/zip/lib/zip_extra_field_api.c
 M ext/zip/lib/zip_fclose.c
 M ext/zip/lib/zip_fdopen.c
 A ext/zip/lib/zip_file_add.c
 M ext/zip/lib/zip_file_error_clear.c
 M ext/zip/lib/zip_file_error_get.c
 A ext/zip/lib/zip_file_get_comment.c
 M ext/zip/lib/zip_file_get_offset.c
 A ext/zip/lib/zip_file_rename.c
 A ext/zip/lib/zip_file_replace.c
 A ext/zip/lib/zip_file_set_comment.c
 M ext/zip/lib/zip_file_strerror.c
 M ext/zip/lib/zip_filerange_crc.c
 M ext/zip/lib/zip_fopen.c
 M ext/zip/lib/zip_fopen_encrypted.c
 M ext/zip/lib/zip_fopen_index.c
 M ext/zip/lib/zip_fopen_index_encrypted.c
 M ext/zip/lib/zip_fread.c
 D ext/zip/lib/zip_free.c
 M ext/zip/lib/zip_get_archive_comment.c
 M ext/zip/lib/zip_get_archive_flag.c
 M ext/zip/lib/zip_get_compression_implementation.c
 M ext/zip/lib/zip_get_encryption_implementation.c
 M ext/zip/lib/zip_get_file_comment.c
 D ext/zip/lib/zip_get_file_extra.c
 M ext/zip/lib/zip_get_name.c
 M ext/zip/lib/zip_get_num_entries.c
 M ext/zip/lib/zip_get_num_files.c
 M ext/zip/lib/zip_memdup.c
 M ext/zip/lib/zip_name_locate.c
 M ext/zip/lib/zip_new.c
 M ext/zip/lib/zip_open.c
 M ext/zip/lib/zip_rename.c
 M ext/zip/lib/zip_replace.c
 M ext/zip/lib/zip_set_archive_comment.c
 M ext/zip/lib/zip_set_archive_flag.c
 M ext/zip/lib/zip_set_default_password.c
 M ext/zip/lib/zip_set_file_comment.c
 A ext/zip/lib/zip_set_file_compression.c
 D ext/zip/lib/zip_set_file_extra.c
 M ext/zip/lib/zip_set_name.c
 M ext/zip/lib/zip_source_buffer.c
 M ext/zip/lib/zip_source_close.c
 M ext/zip/lib/zip_source_crc.c
 M ext/zip/lib/zip_source_deflate.c
 M ext/zip/lib/zip_source_error.c
 M ext/zip/lib/zip_source_file.c
 M ext/zip/lib/zip_source_filep.c
 M ext/zip/lib/zip_source_free.c
 M ext/zip/lib/zip_source_function.c
 M ext/zip/lib/zip_source_layered.c
 M ext/zip/lib/zip_source_open.c
 M ext/zip/lib/zip_source_pkware.c
 M ext/zip/lib/zip_source_pop.c
 M ext/zip/lib/zip_source_read.c
 M ext/zip/lib/zip_source_stat.c
 A ext/zip/lib/zip_source_window.c
 M ext/zip/lib/zip_source_zip.c
 A ext/zip/lib/zip_source_zip_new.c
 M ext/zip/lib/zip_stat.c
 M ext/zip/lib/zip_stat_index.c
 M ext/zip/lib/zip_stat_init.c
 M ext/zip/lib/zip_strerror.c
 A ext/zip/lib/zip_string.c
 M ext/zip/lib/zip_unchange.c
 M ext/zip/lib/zip_unchange_all.c
 M ext/zip/lib/zip_unchange_archive.c
 M ext/zip/lib/zip_unchange_data.c
 A ext/zip/lib/zip_utf-8.c
 D ext/zip/lib/zip_win32.h
 M ext/zip/lib/zipconf.h
 M ext/zip/lib/zipint.h
 M ext/zip/php_zip.c
 M ext/zip/php_zip.h
 A ext/zip/tests/bug38943.inc
 A ext/zip/tests/bug38943_2.phpt
 A ext/zip/tests/doubleclose.phpt
 A ext/zip/tests/zip_entry_close.phpt
 M ext/zip/zip_stream.c


 Diff: Diff exceeded maximum size

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


After this change, with a clean build I got:

In file included from /home/felipe/dev/php-src/ext/zip/lib/zip_add.c:37:0:
/home/felipe/dev/php-src/ext/zip/lib/zipint.h:56:21: fatal error:
config.h: No such file or directory
compilation terminated.
make: *** [ext/zip/lib/zip_add.lo] Error 1


-- 
Regards,
Felipe Pena

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



Re: [PHP-CVS] com php-src: Fix bug #65946 - pdo_sql_parser.c permanently converts values bound to strings: ext/pdo/pdo_sql_parser.c ext/pdo/pdo_sql_parser.re ext/pdo/tests/bug65946.phpt

2013-11-09 Thread Nikita Popov
On Fri, Nov 8, 2013 at 3:05 AM, Rasmus Lerdorf ras...@php.net wrote:

 Commit:890ea8411f908ee8ab84389b42066f66d4a033e6
 Author:Rasmus Lerdorf ras...@php.net Thu, 7 Nov 2013
 18:05:08 -0800
 Parents:   8cb128159d07d80aaf751b252a94ff63d7f6ae06
 Branches:  master

 Link:
 http://git.php.net/?p=php-src.git;a=commitdiff;h=890ea8411f908ee8ab84389b42066f66d4a033e6

 Log:
 Fix bug #65946 - pdo_sql_parser.c permanently converts values bound to
 strings

 Bugs:
 https://bugs.php.net/65946

 Changed paths:
   M  ext/pdo/pdo_sql_parser.c
   M  ext/pdo/pdo_sql_parser.re
   A  ext/pdo/tests/bug65946.phpt


This commit causes three test failures on travis, see
https://s3.amazonaws.com/archive.travis-ci.org/jobs/13682707/log.txt

via [ext/pdo_mysql/tests/common.phpt]
 MySQL Bug #65946 (pdo_sql_parser.c permanently converts values bound
to strings) [ext/pdo_mysql/tests/bug65946.phpt]
via [ext/pdo_pgsql/tests/common.phpt]
 Postgres Bug #65946 (pdo_sql_parser.c permanently converts values
bound to strings) [ext/pdo_pgsql/tests/bug65946.phpt]
via [ext/pdo_sqlite/tests/common.phpt]
 SQLite Bug #65946 (pdo_sql_parser.c permanently converts values bound
to strings) [ext/pdo_sqlite/tests/bug65946.phpt]

Nikita


[PHP-CVS] com php-src: Make all code paths in json_determine_array_type() return constants.: ext/json/json.c

2013-11-09 Thread Adam Harvey
Commit:90d4ae4da8f5a81e136cad26d9612a8f78d14f2d
Author:Adam Harvey ahar...@php.net Sat, 9 Nov 2013 12:15:37 -0500
Parents:   43cb6ba7639aacf08f5e6a46428b12f5df303f6f
Branches:  master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=90d4ae4da8f5a81e136cad26d9612a8f78d14f2d

Log:
Make all code paths in json_determine_array_type() return constants.

This is a purely cosmetic change, but the current behaviour of returning
PHP_JSON_OUTPUT_ARRAY and 1 looks weird.

Changed paths:
  M  ext/json/json.c


Diff:
diff --git a/ext/json/json.c b/ext/json/json.c
index 782375e..90ca50d 100644
--- a/ext/json/json.c
+++ b/ext/json/json.c
@@ -190,10 +190,10 @@ static int json_determine_array_type(zval **val 
TSRMLS_DC) /* {{{ */
}
 
if (i == HASH_KEY_IS_STRING) {
-   return 1;
+   return PHP_JSON_OUTPUT_OBJECT;
} else {
if (index != idx) {
-   return 1;
+   return PHP_JSON_OUTPUT_OBJECT;
}
}
idx++;


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