@@ -109,7 +109,7 @@ static zend_always_inline zend_uint zend_str_delref(zend_string *s)
109
109
110
110
static zend_always_inline zend_string * zend_str_alloc (int len , int persistent )
111
111
{
112
- zend_string * ret = pemalloc (_STR_HEADER_SIZE + len + 1 , persistent );
112
+ zend_string * ret = ( zend_string * ) pemalloc (_STR_HEADER_SIZE + len + 1 , persistent );
113
113
114
114
GC_REFCOUNT (ret ) = 1 ;
115
115
#if 1
@@ -127,7 +127,7 @@ static zend_always_inline zend_string *zend_str_alloc(int len, int persistent)
127
127
128
128
static zend_always_inline zend_string * zend_str_safe_alloc (size_t n , size_t m , size_t l , int persistent )
129
129
{
130
- zend_string * ret = safe_pemalloc (n , m , _STR_HEADER_SIZE + l + 1 , persistent );
130
+ zend_string * ret = ( zend_string * ) safe_pemalloc (n , m , _STR_HEADER_SIZE + l + 1 , persistent );
131
131
132
132
GC_REFCOUNT (ret ) = 1 ;
133
133
#if 1
@@ -177,7 +177,7 @@ static zend_always_inline zend_string *zend_str_realloc(zend_string *s, int len,
177
177
ret = STR_ALLOC (len , persistent );
178
178
memcpy (ret -> val , s -> val , (len > s -> len ? s -> len : len ) + 1 );
179
179
} else if (STR_REFCOUNT (s ) == 1 ) {
180
- ret = perealloc (s , _STR_HEADER_SIZE + len + 1 , persistent );
180
+ ret = ( zend_string * ) perealloc (s , _STR_HEADER_SIZE + len + 1 , persistent );
181
181
ret -> len = len ;
182
182
STR_FORGET_HASH_VAL (ret );
183
183
} else {
@@ -196,7 +196,7 @@ static zend_always_inline zend_string *zend_str_safe_realloc(zend_string *s, siz
196
196
ret = STR_SAFE_ALLOC (n , m , l , persistent );
197
197
memcpy (ret -> val , s -> val , ((n * m ) + l > s -> len ? s -> len : ((n * m ) + l )) + 1 );
198
198
} else if (STR_REFCOUNT (s ) == 1 ) {
199
- ret = safe_perealloc (s , n , m , _STR_HEADER_SIZE + l + 1 , persistent );
199
+ ret = ( zend_string * ) safe_perealloc (s , n , m , _STR_HEADER_SIZE + l + 1 , persistent );
200
200
ret -> len = (n * m ) + l ;
201
201
STR_FORGET_HASH_VAL (ret );
202
202
} else {
0 commit comments