com php-src: Merge remote-tracking branch 'origin/PHP-5.6' into str_size_and_int64_56_backport: ext/com _dotnet/com_olechar.c
ext/com_dotnet/com_variant. c ext/gmp/gmp.c ext/pdo_firebird/firebird_driver.c ext/pdo_firebird/pdo_firebird.c sapi/phpdbg/phpdbg _watch.c
| From: | Anatol Belski | Date: | Tue, 29 Apr 2014 12:05:57 +0000 |
| Subject: | com php-src: Merge remote-tracking branch 'origin/PHP-5.6' into str_size_and_int64_56_backport: ext/com _dotnet/com_olechar.c ext/com_dotnet/com_variant. c ext/gmp/gmp.c ext/pdo_firebird/firebird_driver.c ext/pdo_firebird/pdo_firebird.c sapi/phpdbg/phpdbg _watch.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-77178@lists.php.net to get a copy of this message | ||
Commit: 0f42656fed37b274dfe29c85de4298abfc6a818f
Author: Anatol Belski <ab@php.net> Tue, 29 Apr 2014 14:05:57 +0200
Parents: 047a39c94670517239e9153bfa4680b3aebacaf3 6d20c5bea80882ed2ab14ea1b7163cb91d506286
Branches: str_size_and_int64_56_backport
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0f42656fed37b274dfe29c85de4298abfc6a818f
Log:
Merge remote-tracking branch 'origin/PHP-5.6' into str_size_and_int64_56_backport
* origin/PHP-5.6:
updated NEWS
updated NEWS
Fixed bug #66431 Special Character via COM Interface (CP_UTF8)
Cleanup ZEND_MODULE_API_NO => 20050922
Fix crashes in GMP serialize/unserialize
enable gmp for tests
C89 compat
Conflicts:
ext/com_dotnet/com_variant.c
Bugs:
https://bugs.php.net/66431
Changed paths:
MM ext/com_dotnet/com_olechar.c
MM ext/com_dotnet/com_variant.c
MM ext/gmp/gmp.c
MM ext/pdo_firebird/firebird_driver.c
MM ext/pdo_firebird/pdo_firebird.c
MM sapi/phpdbg/phpdbg_watch.c
Diff:
diff --cc ext/com_dotnet/com_variant.c
index 357fd3c,3cc0571..1348c21
--- a/ext/com_dotnet/com_variant.c
+++ b/ext/com_dotnet/com_variant.c
@@@ -153,8 -153,12 +153,12 @@@ PHP_COM_DOTNET_API void php_com_variant
case IS_STRING:
V_VT(v) = VT_BSTR;
- olestring = php_com_string_to_olestring(Z_STRVAL_P(z), Z_STRLEN_P(z), codepage TSRMLS_CC);
+ olestring = php_com_string_to_olestring(Z_STRVAL_P(z), Z_STRSIZE_P(z), codepage TSRMLS_CC);
- V_BSTR(v) = SysAllocStringByteLen((char*)olestring, Z_STRSIZE_P(z) * sizeof(OLECHAR));
+ if (CP_UTF8 == codepage) {
+ V_BSTR(v) = SysAllocStringByteLen((char*)olestring, wcslen(olestring) * sizeof(OLECHAR));
+ } else {
- V_BSTR(v) = SysAllocStringByteLen((char*)olestring, Z_STRLEN_P(z) * sizeof(OLECHAR));
++ V_BSTR(v) = SysAllocStringByteLen((char*)olestring, Z_STRSIZE_P(z) * sizeof(OLECHAR));
+ }
efree(olestring);
break;