# [PATCH] VC++ / ZTS fixes, Path I

- Thread: https://externals.io/message/17850
- Original archive: https://news-web.php.net/php.internals/17850
- Started by cshmoove@bellsouth.net on 2005-08-12T04:03:12+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #17850 — cshmoove@bellsouth.net — 2005-08-12T04:03:12+00:00

URL: https://externals.io/message/17850#17850

i would commit if i had write access...

Index: ext/standard/string.c
===================================================================
RCS file: /repository/php-src/ext/standard/string.c,v
retrieving revision 1.447
diff -u -r1.447 string.c
--- ext/standard/string.c 11 Aug 2005 23:35:59 -0000 1.447
+++ ext/standard/string.c 12 Aug 2005 03:57:59 -0000
@@ -584,7 +584,7 @@
* Expands possible ranges of the form 'a..b' in input charlist,
* where a < b in code-point order
*/
-static int php_expand_u_trim_range(UChar **range, int32_t *range_len)
+static int php_expand_u_trim_range(UChar **range, int32_t *range_len 
TSRMLS_DC)
{
UChar32 *codepts, *tmp, *input, *end, c;
int32_t len, tmp_len, idx;
@@ -673,7 +673,7 @@
int32_t start = 0, end = len;
if ( what ) {
- php_expand_u_trim_range(&what, &what_len);
+ php_expand_u_trim_range(&what, &what_len TSRMLS_CC);
}
if ( mode & 1 ) {
@@ -4728,8 +4728,8 @@
int l=0;
memcpy(result, input_str, input_str_len);
s = result;
- e = result + input_str_len;
- ee = result + result_len;
+ e = (char *)result + input_str_len;
+ ee = (char *)result + result_len;
while ( e < ee ) {
l = (e-s) < (ee-e) ? (e-s) : (ee-e);

---

## #17860 — Derick Rethans — 2005-08-12T07:14:11+00:00

URL: https://externals.io/message/17850#17860 · In reply to: #17850

> i would commit if i had write access...

Please put those patches somewhere online, as they're garbled when you 
send them like this: 

> 
> Index: ext/standard/string.c
> ===================================================================
> RCS file: /repository/php-src/ext/standard/string.c,v
> retrieving revision 1.447
> diff -u -r1.447 string.c
> --- ext/standard/string.c 11 Aug 2005 23:35:59 -0000 1.447
> +++ ext/standard/string.c 12 Aug 2005 03:57:59 -0000
> @@ -584,7 +584,7 @@
> * Expands possible ranges of the form 'a..b' in input charlist,
> * where a < b in code-point order
> */
> -static int php_expand_u_trim_range(UChar **range, int32_t *range_len)
> +static int php_expand_u_trim_range(UChar **range, int32_t *range_len 
> TSRMLS_DC)
> {
> UChar32 *codepts, *tmp, *input, *end, c;
> int32_t len, tmp_len, idx;
> @@ -673,7 +673,7 @@
> int32_t start = 0, end = len;
> if ( what ) {
> - php_expand_u_trim_range(&what, &what_len);
> + php_expand_u_trim_range(&what, &what_len TSRMLS_CC);
> }
> if ( mode & 1 ) {
> @@ -4728,8 +4728,8 @@
> int l=0;
> memcpy(result, input_str, input_str_len);
> s = result;
> - e = result + input_str_len;
> - ee = result + result_len;
> + e = (char *)result + input_str_len;
> + ee = (char *)result + result_len;
> while ( e < ee ) {
> l = (e-s) < (ee-e) ? (e-s) : (ee-e); 
> 
> 

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org
