#define RETVAL_LONG(l) ZVAL_LONG(return_value, l)
#define RETVAL_DOUBLE(d) ZVAL_DOUBLE(return_value, d)
#define RETVAL_STR(s) ZVAL_STR(return_value, s)
-#define RETVAL_LONG_STR(s) ZVAL_INTERNED_STR(return_value, s)
+#define RETVAL_INTERNED_STR(s) ZVAL_INTERNED_STR(return_value, s)
#define RETVAL_NEW_STR(s) ZVAL_NEW_STR(return_value, s)
+#define RETVAL_STR_COPY(s) ZVAL_STR_COPY(return_value, s)
#define RETVAL_STRING(s) ZVAL_STRING(return_value, s)
#define RETVAL_STRINGL(s, l) ZVAL_STRINGL(return_value, s, l)
#define RETVAL_EMPTY_STRING() ZVAL_EMPTY_STRING(return_value)
#define RETURN_LONG(l) { RETVAL_LONG(l); return; }
#define RETURN_DOUBLE(d) { RETVAL_DOUBLE(d); return; }
#define RETURN_STR(s) { RETVAL_STR(s); return; }
-#define RETURN_LONG_STR(s) { RETVAL_LONG_STR(s); return; }
+#define RETURN_INTERNED_STR(s) { RETVAL_INTERNED_STR(s); return; }
#define RETURN_NEW_STR(s) { RETVAL_NEW_STR(s); return; }
+#define RETURN_STR_COPY(s) { RETVAL_STR_COPY(s); return; }
#define RETURN_STRING(s) { RETVAL_STRING(s); return; }
#define RETURN_STRINGL(s, l) { RETVAL_STRINGL(s, l); return; }
#define RETURN_EMPTY_STRING() { RETVAL_EMPTY_STRING(); return; }
if (!obj) {
if (EG(scope)) {
- RETURN_STR(zend_string_copy(EG(scope)->name));
+ RETURN_STR_COPY(EG(scope)->name);
} else {
zend_error(E_WARNING, "get_class() called without object from outside a class");
RETURN_FALSE;
}
}
- RETURN_STR(zend_string_copy(Z_OBJCE_P(obj)->name));
+ RETURN_STR_COPY(Z_OBJCE_P(obj)->name);
}
/* }}} */
}
if (EX(called_scope)) {
- RETURN_STR(zend_string_copy(EX(called_scope)->name));
+ RETURN_STR_COPY(EX(called_scope)->name);
} else if (!EG(scope)) {
zend_error(E_WARNING, "get_called_class() called from outside a class");
}
if (!ZEND_NUM_ARGS()) {
ce = EG(scope);
if (ce && ce->parent) {
- RETURN_STR(zend_string_copy(ce->parent->name));
+ RETURN_STR_COPY(ce->parent->name);
} else {
RETURN_FALSE;
}
}
if (ce && ce->parent) {
- RETURN_STR(zend_string_copy(ce->parent->name));
+ RETURN_STR_COPY(ce->parent->name);
} else {
RETURN_FALSE;
}
do {
function_name->len = snprintf(function_name->val + 1, sizeof("lambda_")+MAX_LENGTH_OF_LONG, "lambda_%d", ++EG(lambda_count)) + 1;
} while (zend_hash_add_ptr(EG(function_table), function_name, func) == NULL);
- RETURN_STR(function_name);
+ RETURN_NEW_STR(function_name);
} else {
zend_hash_str_del(EG(function_table), LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME)-1);
RETURN_FALSE;
if ((opline->extended_value & IS_CONSTANT_UNQUALIFIED) != 0) {
char *actual = (char *)zend_memrchr(Z_STRVAL_P(EX_CONSTANT(opline->op2)), '\\', Z_STRLEN_P(EX_CONSTANT(opline->op2)));
if (!actual) {
- ZVAL_STR(EX_VAR(opline->result.var), zend_string_copy(Z_STR_P(EX_CONSTANT(opline->op2))));
+ ZVAL_STR_COPY(EX_VAR(opline->result.var), Z_STR_P(EX_CONSTANT(opline->op2)));
} else {
actual++;
ZVAL_STRINGL(EX_VAR(opline->result.var),
data->len = php_stream_read(stream, data->val, data->len);
data->val[data->len] = '\0';
- RETURN_STR(data);
+ RETURN_NEW_STR(data);
}
/* }}} */
so we erealloc() the buffer to the proper size */
dest->len = dest_len;
dest->val[dest->len] = '\0';
- RETURN_STR(dest);
+ RETURN_NEW_STR(dest);
}
}
/* }}} */
if (ch->handlers->write->method == PHP_CURL_RETURN && ch->handlers->write->buf.s) {
smart_str_0(&ch->handlers->write->buf);
- RETURN_STR(zend_string_copy(ch->handlers->write->buf.s));
+ RETURN_STR_COPY(ch->handlers->write->buf.s);
}
/* flush the file handle, so any remaining data is synched to disk */
switch (option) {
case CURLINFO_HEADER_OUT:
if (ch->header.str) {
- RETURN_STR(zend_string_copy(ch->header.str));
+ RETURN_STR_COPY(ch->header.str);
} else {
RETURN_FALSE;
}
RETURN_EMPTY_STRING();
}
smart_str_0(&ch->handlers->write->buf);
- RETURN_STR(zend_string_copy(ch->handlers->write->buf.s));
+ RETURN_STR_COPY(ch->handlers->write->buf.s);
}
RETURN_NULL();
if (real_len && real_len != buf_len) {
buf = zend_string_realloc(buf, real_len, 0);
- RETURN_STR(buf);
+ RETURN_NEW_STR(buf);
}
zend_string_free(buf);
RETURN_FALSE;
abs(utc_offset / 60),
abs((utc_offset % 60)));
- RETURN_STR(tmpstr);
+ RETURN_NEW_STR(tmpstr);
}
break;
case TIMELIB_ZONETYPE_ABBR:
switch (retformat) {
case SUNFUNCS_RET_STRING:
retstr = strpprintf(0, "%02d:%02d", (int) N, (int) (60 * (N - (int) N)));
- RETURN_STR(retstr);
+ RETURN_NEW_STR(retstr);
break;
case SUNFUNCS_RET_DOUBLE:
RETURN_DOUBLE(N);
mpz_export(out_string->val, NULL, order, size, endian, 0, gmpnumber);
out_string->val[out_len] = '\0';
- RETURN_STR(out_string);
+ RETURN_NEW_STR(out_string);
}
FREE_GMP_TEMP(temp_a);
if (raw_output) {
digest->val[ops->digest_size] = 0;
- RETURN_STR(digest);
+ RETURN_NEW_STR(digest);
} else {
zend_string *hex_digest = zend_string_safe_alloc(ops->digest_size, 2, 0, 0);
php_hash_bin2hex(hex_digest->val, (unsigned char *) digest->val, ops->digest_size);
hex_digest->val[2 * ops->digest_size] = 0;
zend_string_release(digest);
- RETURN_STR(hex_digest);
+ RETURN_NEW_STR(hex_digest);
}
}
/* }}} */
if (raw_output) {
digest->val[ops->digest_size] = 0;
- RETURN_STR(digest);
+ RETURN_NEW_STR(digest);
} else {
zend_string *hex_digest = zend_string_safe_alloc(ops->digest_size, 2, 0, 0);
php_hash_bin2hex(hex_digest->val, (unsigned char *) digest->val, ops->digest_size);
hex_digest->val[2 * ops->digest_size] = 0;
zend_string_release(digest);
- RETURN_STR(hex_digest);
+ RETURN_NEW_STR(hex_digest);
}
}
/* }}} */
zend_list_close(Z_RES_P(zhash));
if (raw_output) {
- RETURN_STR(digest);
+ RETURN_NEW_STR(digest);
} else {
zend_string *hex_digest = zend_string_safe_alloc(digest_len, 2, 0, 0);
php_hash_bin2hex(hex_digest->val, (unsigned char *) digest->val, digest_len);
hex_digest->val[2 * digest_len] = 0;
zend_string_release(digest);
- RETURN_STR(hex_digest);
+ RETURN_NEW_STR(hex_digest);
}
}
/* }}} */
}
returnval->val[length] = 0;
efree(result);
- RETURN_STR(returnval);
+ RETURN_NEW_STR(returnval);
}
/* }}} */
_php_iconv_show_error(err, GENERIC_SUPERSET_NAME, charset);
if (err == PHP_ICONV_ERR_SUCCESS && str->val[0] != '\0' && retval.s != NULL) {
- RETURN_STR(retval.s);
+ RETURN_NEW_STR(retval.s);
}
smart_str_free(&retval);
RETURN_FALSE;
}
/* }}} */
-#define RETURN_SMART_STR(str) smart_str_0((str)); RETURN_STR((str)->s)
+#define RETURN_SMART_STR(str) smart_str_0((str)); RETURN_NEW_STR((str)->s)
/* {{{ proto static string Locale::composeLocale($array)
* Creates a locale by combining the parts of locale-ID passed
* }}} */
newstr->len = mysql_real_escape_string(mysql->mysql, newstr->val, escapestr, escapestr_len);
newstr = zend_string_realloc(newstr, newstr->len, 0);
- RETURN_STR(newstr);
+ RETURN_NEW_STR(newstr);
}
/* }}} */
p->key->h = str->h;
p->key->len = str->len;
memcpy(p->key->val, str->val, str->len);
- ZVAL_STR(&p->val, p->key);
+ ZVAL_INTERNED_STR(&p->val, p->key);
Z_NEXT(p->val) = ZCSG(interned_strings).arHash[nIndex];
ZCSG(interned_strings).arHash[nIndex] = idx;
zend_string_release(str);
if (PKCS5_PBKDF2_HMAC(password, (int)password_len, (unsigned char *)salt, (int)salt_len, (int)iterations, digest, (int)key_length, (unsigned char*)out_buffer->val) == 1) {
out_buffer->val[key_length] = 0;
- RETURN_STR(out_buffer);
+ RETURN_NEW_STR(out_buffer);
} else {
zend_string_release(out_buffer);
RETURN_FALSE;
/* Reallocate string and return it */
out_str = zend_string_realloc(out_str, q - out_str->val, 0);
- RETURN_STR(out_str);
+ RETURN_NEW_STR(out_str);
}
/* }}} */
smart_str s = {0}; \
smart_str_append_unsigned(&s, oid); \
smart_str_0(&s); \
- RETURN_STR(s.s); \
+ RETURN_NEW_STR(s.s); \
} \
RETURN_LONG((zend_long)oid); \
} while(0)
smart_str oidstr = {0};
smart_str_append_unsigned(&oidstr, oid);
smart_str_0(&oidstr);
- RETURN_STR(oidstr.s);
+ RETURN_NEW_STR(oidstr.s);
} else
#endif
RETURN_LONG((zend_long)oid);
smart_str s = {0};
smart_str_append_unsigned(&s, oid);
smart_str_0(&s);
- RETURN_STR(s.s);
+ RETURN_NEW_STR(s.s);
} else
#endif
{
buf->len = nbytes;
buf->val[buf->len] = '\0';
- RETURN_STR(buf);
+ RETURN_NEW_STR(buf);
}
/* }}} */
}
to = zend_string_realloc(to, to->len, 0);
- RETURN_STR(to);
+ RETURN_NEW_STR(to);
}
/* }}} */
if (fptr->type == ZEND_INTERNAL_FUNCTION) {
ZVAL_STRING(&name, ((zend_internal_arg_info*)arg_info)->name);
} else {
- ZVAL_STR(&name, zend_string_copy(arg_info->name));
+ ZVAL_STR_COPY(&name, arg_info->name);
}
} else {
ZVAL_NULL(&name);
GET_REFLECTION_OBJECT_PTR(fptr);
string_init(&str);
_function_string(&str, fptr, intern->ce, "");
- RETURN_STR(str.buf);
+ RETURN_NEW_STR(str.buf);
}
/* }}} */
}
GET_REFLECTION_OBJECT_PTR(fptr);
if (fptr->type == ZEND_USER_FUNCTION) {
- RETURN_STR(zend_string_copy(fptr->op_array.filename));
+ RETURN_STR_COPY(fptr->op_array.filename);
}
RETURN_FALSE;
}
}
GET_REFLECTION_OBJECT_PTR(fptr);
if (fptr->type == ZEND_USER_FUNCTION && fptr->op_array.doc_comment) {
- RETURN_STR(zend_string_copy(fptr->op_array.doc_comment));
+ RETURN_STR_COPY(fptr->op_array.doc_comment);
}
RETURN_FALSE;
}
if (fptr->type == ZEND_INTERNAL_FUNCTION) {
ZVAL_STRING(&name, ((zend_internal_arg_info*)arg_info)[position].name);
} else {
- ZVAL_STR(&name, zend_string_copy(arg_info[position].name));
+ ZVAL_STR_COPY(&name, arg_info[position].name);
}
} else {
ZVAL_NULL(&name);
GET_REFLECTION_OBJECT_PTR(param);
string_init(&str);
_parameter_string(&str, param->fptr, param->arg_info, param->offset, param->required, "");
- RETURN_STR(str.buf);
+ RETURN_NEW_STR(str.buf);
}
/* }}} */
precv = _reflection_param_get_default_precv(INTERNAL_FUNCTION_PARAM_PASSTHRU, param);
if (precv && Z_TYPE_P(RT_CONSTANT(¶m->fptr->op_array, precv->op2)) == IS_CONSTANT) {
- RETURN_STR(zend_string_copy(Z_STR_P(RT_CONSTANT(¶m->fptr->op_array, precv->op2))));
+ RETURN_STR_COPY(Z_STR_P(RT_CONSTANT(¶m->fptr->op_array, precv->op2)));
}
}
/* }}} */
GET_REFLECTION_OBJECT_PTR(mptr);
string_init(&str);
_function_string(&str, mptr, intern->ce, "");
- RETURN_STR(str.buf);
+ RETURN_NEW_STR(str.buf);
}
/* }}} */
GET_REFLECTION_OBJECT_PTR(ce);
string_init(&str);
_class_string(&str, ce, &intern->obj, "");
- RETURN_STR(str.buf);
+ RETURN_NEW_STR(str.buf);
}
/* }}} */
}
GET_REFLECTION_OBJECT_PTR(ce);
if (ce->type == ZEND_USER_CLASS) {
- RETURN_STR(zend_string_copy(ce->info.user.filename));
+ RETURN_STR_COPY(ce->info.user.filename);
}
RETURN_FALSE;
}
}
GET_REFLECTION_OBJECT_PTR(ce);
if (ce->type == ZEND_USER_CLASS && ce->info.user.doc_comment) {
- RETURN_STR(zend_string_copy(ce->info.user.doc_comment));
+ RETURN_STR_COPY(ce->info.user.doc_comment);
}
RETURN_FALSE;
}
GET_REFLECTION_OBJECT_PTR(ref);
string_init(&str);
_property_string(&str, &ref->prop, NULL, "");
- RETURN_STR(str.buf);
+ RETURN_NEW_STR(str.buf);
}
/* }}} */
}
GET_REFLECTION_OBJECT_PTR(ref);
if (ref->prop.doc_comment) {
- RETURN_STR(zend_string_copy(ref->prop.doc_comment));
+ RETURN_STR_COPY(ref->prop.doc_comment);
}
RETURN_FALSE;
}
GET_REFLECTION_OBJECT_PTR(module);
string_init(&str);
_extension_string(&str, module, "");
- RETURN_STR(str.buf);
+ RETURN_NEW_STR(str.buf);
}
/* }}} */
GET_REFLECTION_OBJECT_PTR(extension);
string_init(&str);
_zend_extension_string(&str, extension, "");
- RETURN_STR(str.buf);
+ RETURN_NEW_STR(str.buf);
}
/* }}} */
smart_str_0(&var);
if (sid) {
zend_string_release(Z_STR_P(sid));
- ZVAL_STR(sid, var.s);
+ ZVAL_NEW_STR(sid, var.s);
} else {
REGISTER_STRINGL_CONSTANT("SID", var.s->val, var.s->len, 0);
smart_str_free(&var);
* see: ext/session/tests/session_id_error3.phpt */
int len = strlen(PS(id)->val);
if (UNEXPECTED(len != PS(id)->len)) {
- RETVAL_STR(zend_string_init(PS(id)->val, len, 0));
+ RETVAL_NEW_STR(zend_string_init(PS(id)->val, len, 0));
} else {
- RETVAL_STR(zend_string_copy(PS(id)));
+ RETVAL_STR_COPY(PS(id));
}
} else {
RETVAL_EMPTY_STRING();
RETURN_FALSE;
}
smart_str_0(&id);
- RETVAL_STR(id.s);
+ RETVAL_NEW_STR(id.s);
smart_str_free(&id);
}
/* }}} */
return_string = zend_string_init(startaddr, bytes, 0);
- RETURN_STR(return_string);
+ RETURN_NEW_STR(return_string);
}
/* }}} */
if ((tmp = zend_hash_str_find(Z_OBJPROP_P(getThis()), "__last_request", sizeof("__last_request")-1)) != NULL &&
Z_TYPE_P(tmp) == IS_STRING) {
- RETURN_STR(zend_string_copy(Z_STR_P(tmp)));
+ RETURN_STR_COPY(Z_STR_P(tmp));
}
RETURN_NULL();
}
if ((tmp = zend_hash_str_find(Z_OBJPROP_P(getThis()), "__last_response", sizeof("__last_response")-1)) != NULL &&
Z_TYPE_P(tmp) == IS_STRING) {
- RETURN_STR(zend_string_copy(Z_STR_P(tmp)));
+ RETURN_STR_COPY(Z_STR_P(tmp));
}
RETURN_NULL();
}
if ((tmp = zend_hash_str_find(Z_OBJPROP_P(getThis()), "__last_request_headers", sizeof("__last_request_headers")-1)) != NULL &&
Z_TYPE_P(tmp) == IS_STRING) {
- RETURN_STR(zend_string_copy(Z_STR_P(tmp)));
+ RETURN_STR_COPY(Z_STR_P(tmp));
}
RETURN_NULL();
}
if ((tmp = zend_hash_str_find(Z_OBJPROP_P(getThis()), "__last_response_headers", sizeof("__last_response_headers")-1)) != NULL &&
Z_TYPE_P(tmp) == IS_STRING) {
- RETURN_STR(zend_string_copy(Z_STR_P(tmp)));
+ RETURN_STR_COPY(Z_STR_P(tmp));
}
RETURN_NULL();
}
}
if ((tmp = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "location", sizeof("location")-1)) != NULL && Z_TYPE_P(tmp) == IS_STRING) {
- RETVAL_STR(zend_string_copy(Z_STR_P(tmp)));
+ RETVAL_STR_COPY(Z_STR_P(tmp));
} else {
RETVAL_NULL();
}
tmpbuf->len = retval;
tmpbuf->val[tmpbuf->len] = '\0' ;
- RETURN_STR(tmpbuf);
+ RETURN_NEW_STR(tmpbuf);
}
/* }}} */
PHP_VAR_SERIALIZE_DESTROY(var_hash);
if (buf.s) {
- RETURN_STR(buf.s);
+ RETURN_NEW_STR(buf.s);
}
RETURN_NULL();
PHP_VAR_SERIALIZE_DESTROY(var_hash);
if (buf.s) {
- RETURN_STR(buf.s);
+ RETURN_NEW_STR(buf.s);
} else {
RETURN_NULL();
}
smart_str_appendl(&str, object->prefix[5].s->val, object->prefix[5].s->len);
smart_str_0(&str);
- RETURN_STR(str.s);
+ RETURN_NEW_STR(str.s);
}
static void spl_recursive_tree_iterator_get_entry(spl_recursive_it_object *object, zval *return_value)
return;
}
- RETURN_STR(zend_string_copy(intern->u.regex.regex));
+ RETURN_STR_COPY(intern->u.regex.regex);
} /* }}} */
/* {{{ proto bool RegexIterator::getMode()
return;
}
if (Z_TYPE(intern->u.caching.zstr) == IS_STRING) {
- RETURN_STR(zend_string_copy(Z_STR_P(&intern->u.caching.zstr)));
+ RETURN_STR_COPY(Z_STR_P(&intern->u.caching.zstr));
} else {
RETURN_NULL();
}
PHP_VAR_SERIALIZE_DESTROY(var_hash);
if (buf.s) {
- RETURN_STR(buf.s);
+ RETURN_NEW_STR(buf.s);
} else {
RETURN_NULL();
}
RETURN_TRUE;
} else {
if (str_idx) {
- RETVAL_STR(zend_string_copy(str_idx));
+ RETVAL_STR_COPY(str_idx);
} else {
RETVAL_LONG(num_idx);
}
RETURN_TRUE;
} else {
if (str_idx) {
- RETVAL_STR(zend_string_copy(str_idx));
+ RETVAL_STR_COPY(str_idx);
} else {
RETVAL_LONG(num_idx);
}
RETURN_TRUE;
} else {
if (str_idx) {
- RETVAL_STR(zend_string_copy(str_idx));
+ RETVAL_STR_COPY(str_idx);
} else {
RETVAL_LONG(num_idx);
}
RETURN_TRUE;
} else {
if (str_idx) {
- RETVAL_STR(zend_string_copy(str_idx));
+ RETVAL_STR_COPY(str_idx);
} else {
RETVAL_LONG(num_idx);
}
/* If we are returning a single result, just do it. */
if (Z_TYPE_P(return_value) != IS_ARRAY) {
if (string_key) {
- RETURN_STR(zend_string_copy(string_key));
+ RETURN_STR_COPY(string_key);
} else {
RETURN_LONG(num_key);
}
smart_str_0(&formstr);
- RETURN_STR(formstr.s);
+ RETURN_NEW_STR(formstr.s);
}
/* }}} */
smart_str_0(&implstr);
if (implstr.s) {
- RETURN_STR(implstr.s);
+ RETURN_NEW_STR(implstr.s);
} else {
smart_str_free(&implstr);
RETURN_EMPTY_STRING();
(argc == 4 && Z_TYPE_P(from) != Z_TYPE_P(len))
) {
php_error_docref(NULL, E_WARNING, "'from' and 'len' should be of same type - numerical or array ");
- RETURN_STR(zend_string_copy(Z_STR_P(str)));
+ RETURN_STR_COPY(Z_STR_P(str));
}
if (argc == 4 && Z_TYPE_P(from) == IS_ARRAY) {
if (zend_hash_num_elements(Z_ARRVAL_P(from)) != zend_hash_num_elements(Z_ARRVAL_P(len))) {
php_error_docref(NULL, E_WARNING, "'from' and 'len' should have the same number of elements");
- RETURN_STR(zend_string_copy(Z_STR_P(str)));
+ RETURN_STR_COPY(Z_STR_P(str));
}
}
}
RETURN_NEW_STR(result);
} else {
php_error_docref(NULL, E_WARNING, "Functionality of 'from' and 'len' as arrays is not implemented");
- RETURN_STR(zend_string_copy(Z_STR_P(str)));
+ RETURN_STR_COPY(Z_STR_P(str));
}
} else { /* str is array of strings */
zend_string *str_index = NULL;
if (result.s) {
smart_str_appendl(&result, str + old_pos, slen - old_pos);
smart_str_0(&result);
- RETVAL_STR(result.s);
+ RETVAL_NEW_STR(result.s);
} else {
smart_str_free(&result);
- RETVAL_STR(zend_string_copy(input));
+ RETVAL_STR_COPY(input);
}
if (pats == &str_hash) {
HashTable *pats = HASH_OF(from);
if (zend_hash_num_elements(pats) < 1) {
- RETURN_STR(zend_string_copy(str));
+ RETURN_STR_COPY(str);
} else if (zend_hash_num_elements(pats) == 1) {
zend_long num_key;
zend_string *str_key, *replace;
}
replace = zval_get_string(entry);
if (str_key->len < 1) {
- RETVAL_STR(zend_string_copy(str));
+ RETVAL_STR_COPY(str);
} else if (str_key->len == 1) {
RETVAL_STR(php_char_to_str_ex(str,
str_key->val[0],
} else {
BG(locale_string) = zend_string_init(retval, len, 0);
zend_string_release(loc);
- RETURN_STR(zend_string_copy(BG(locale_string)));
+ RETURN_STR_COPY(BG(locale_string));
}
} else if (len == loc->len && !memcmp(loc->val, retval, len)) {
RETURN_STR(loc);
smart_str_0 (&buf);
if (return_output) {
- RETURN_STR(buf.s);
+ RETURN_NEW_STR(buf.s);
} else {
PHPWRITE(buf.s->val, buf.s->len);
smart_str_free(&buf);
}
if (buf.s) {
- RETURN_STR(buf.s);
+ RETURN_NEW_STR(buf.s);
} else {
RETURN_NULL();
}
php_wddx_packet_end(packet);
smart_str_0(packet);
- RETVAL_STR(zend_string_copy(packet->s));
+ RETVAL_STR_COPY(packet->s);
php_wddx_destructor(packet);
}
/* }}} */
php_wddx_packet_end(packet);
smart_str_0(packet);
- RETVAL_STR(zend_string_copy(packet->s));
+ RETVAL_STR_COPY(packet->s);
php_wddx_destructor(packet);
}
/* }}} */
php_wddx_packet_end(packet);
smart_str_0(packet);
- RETVAL_STR(zend_string_copy(packet->s));
+ RETVAL_STR_COPY(packet->s);
zend_list_close(Z_RES_P(packet_id));
}
intern = Z_XSL_P(id);
if ((value = zend_hash_find(intern->parameter, name)) != NULL) {
convert_to_string_ex(value);
- RETURN_STR(zend_string_copy(Z_STR_P(value)));
+ RETURN_STR_COPY(Z_STR_P(value));
} else {
RETURN_FALSE;
}
if (n > 0) {
buffer->val[n] = '\0';
buffer->len = n;
- RETURN_STR(buffer);
+ RETURN_NEW_STR(buffer);
} else {
zend_string_free(buffer);
RETURN_EMPTY_STRING()
zip_fclose(zf);
buffer->val[n] = '\0';
buffer->len = n;
- RETURN_STR(buffer);
+ RETURN_NEW_STR(buffer);
}
/* }}} */