Modify the usage of ecma_string_to_utf8_string()
Parts: * Rename ecma_string_to_utf8_string() to ecma_string_copy_to_utf8_buffer. * Introduce ecma_string_to_utf8_bytes(), which wraps the usual 'function call-assertion' pair, and check strict equality of size of the string and the buffer. JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
This commit is contained in:
+1
-1
@@ -540,7 +540,7 @@ jerry_string_to_char_buffer (const jerry_string_t *string_p, /**< string descrip
|
||||
{
|
||||
jerry_assert_api_available ();
|
||||
|
||||
return ecma_string_to_utf8_string (string_p, (lit_utf8_byte_t *) buffer_p, buffer_size);
|
||||
return ecma_string_copy_to_utf8_buffer (string_p, (lit_utf8_byte_t *) buffer_p, buffer_size);
|
||||
} /* jerry_string_to_char_buffer */
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user