Change return value of 'ecma_ref_ecma_string' to void

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
This commit is contained in:
László Langó
2016-06-14 15:00:12 +02:00
parent 0daeb2f942
commit 8453a9ade8
17 changed files with 49 additions and 40 deletions
+5 -8
View File
@@ -384,11 +384,13 @@ ecma_concat_ecma_strings (ecma_string_t *string1_p, /**< first ecma-string */
if (str1_size == 0)
{
return ecma_ref_ecma_string (string2_p);
ecma_ref_ecma_string (string2_p);
return string2_p;
}
else if (str2_size == 0)
{
return ecma_ref_ecma_string (string1_p);
ecma_ref_ecma_string (string1_p);
return string1_p;
}
const lit_utf8_size_t new_size = str1_size + str2_size;
@@ -444,11 +446,8 @@ ecma_concat_ecma_strings (ecma_string_t *string1_p, /**< first ecma-string */
/**
* Increase reference counter of ecma-string.
*
* @return pointer to same ecma-string descriptor with increased reference counter
* or the ecma-string's copy with reference counter set to 1
*/
ecma_string_t *
void
ecma_ref_ecma_string (ecma_string_t *string_p) /**< string descriptor */
{
JERRY_ASSERT (string_p != NULL);
@@ -463,8 +462,6 @@ ecma_ref_ecma_string (ecma_string_t *string_p) /**< string descriptor */
{
jerry_fatal (ERR_REF_COUNT_LIMIT);
}
return string_p;
} /* ecma_ref_ecma_string */
/**
+2 -1
View File
@@ -637,7 +637,8 @@ ecma_copy_value (ecma_value_t value) /**< value description */
}
case ECMA_TYPE_STRING:
{
return ecma_make_string_value (ecma_ref_ecma_string (ecma_get_string_from_value (value)));
ecma_ref_ecma_string (ecma_get_string_from_value (value));
return value;
}
case ECMA_TYPE_OBJECT:
{
+2 -2
View File
@@ -584,7 +584,7 @@ ecma_create_named_data_property (ecma_object_t *object_p, /**< object */
uint8_t type_and_flags = ECMA_PROPERTY_TYPE_NAMEDDATA | prop_attributes;
name_p = ecma_ref_ecma_string (name_p);
ecma_ref_ecma_string (name_p);
ecma_property_value_t value;
value.value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
@@ -610,7 +610,7 @@ ecma_create_named_accessor_property (ecma_object_t *object_p, /**< object */
uint8_t type_and_flags = ECMA_PROPERTY_TYPE_NAMEDACCESSOR | prop_attributes;
name_p = ecma_ref_ecma_string (name_p);
ecma_ref_ecma_string (name_p);
ecma_property_value_t value;
ECMA_SET_POINTER (value.getter_setter_pair.getter_p, get_p);
+1 -1
View File
@@ -169,7 +169,7 @@ extern ecma_string_t *ecma_new_ecma_string_from_lit_cp (lit_cpointer_t);
extern ecma_string_t *ecma_new_ecma_string_from_magic_string_id (lit_magic_string_id_t);
extern ecma_string_t *ecma_new_ecma_string_from_magic_string_ex_id (lit_magic_string_ex_id_t);
extern ecma_string_t *ecma_concat_ecma_strings (ecma_string_t *, ecma_string_t *);
extern ecma_string_t *ecma_ref_ecma_string (ecma_string_t *);
extern void ecma_ref_ecma_string (ecma_string_t *);
extern void ecma_deref_ecma_string (ecma_string_t *);
extern ecma_number_t ecma_string_to_number (const ecma_string_t *);
extern bool ecma_string_get_array_index (const ecma_string_t *, uint32_t *);